ä»æ¥ã¯PowerShellã®ãã€ãã€ã³ãã§ããPowerShellã§äœæãããå¥åŠãªã¹ã¯ãªãããã²ãŒã ã®æ代ã§ãã æ·±å»ãªã«ãŒãã³ã«ããããããŠããŠãä»ã®PowerShellã®æèœãèŠããå Žåã¯ãç«ã«æåŸ
ããŸãã
ããŒãã³ã°ã³ã³ãœãŒã«
æãã·ã³ãã«ãªãšã³ã¿ãŒãã€ã³ã¡ã³ããããŒãã³ã°ã³ã³ãœãŒã«ããå§ããŸãããã Windowsãã¡ããªã§ã¯ãé³å£°åæã€ã³ã¿ãŒãã§ã€ã¹ãé·ãéååšããŠããŸããã.Netã©ã€ãã©ãªã§ã¯System.SpeechãšåŒã°ããCOMãªããžã§ã¯ãã奜ã人ã«ã¯SAPI.SpVoiceãšåŒã°ããŸãã PowerShellã§ã¯ãäž¡æ¹ã®æ¹æ³ã䜿çšã§ããŸãã
次ã®ã¹ã¯ãªããã䜿çšããŠãã€ã³ã¿ãŒãã§ã€ã¹ã®åäœã確èªããŸãã
Add-Type -AssemblyName System.Speech $voice = New-Object System.Speech.Synthesis.SpeechSynthesizer $voice.Speak("-- â , !")
è€æ°ã®æ祚ãã·ã¹ãã ã«ã€ã³ã¹ããŒã«ã§ããŸã-ç°ãªãåœç±ã幎霢ãæ§å¥ã®ãªãã·ã§ã³ããããããããç¬èªã®ååãä»ããŠããŸãã 次ã®ã³ãã³ãã§äžè¬ãªã¹ãã衚瀺ã§ããŸãã
$voice.GetInstalledVoices().VoiceInfo
ã€ãªãŒããšãžã©ã¯æºåãã§ããŠããŸãã
è¿œå ã®ãæ¶ç©ºã®å人ãã¯ãæšæºã®Windowsã€ã³ã¿ãŒãã§ã€ã¹ãä»ããŠã Microsoft Webãµã€ããŸãã¯å€éšãœãŒã¹ããå
¥åèšèªãšãšãã«ããŠã³ããŒãã§ããŸã ã
次ã®ã³ãã³ãã§é©åãªé³å£°ãéžæã§ããŸãã
$voice.SelectVoice("")
ãã®ç¥èãããã°ããµãŒããŒã®ã¯ã©ãã·ã¥ã瀺ãç£èŠãåéãããããæ°ã«å
¥ãã®ãªã¢ãŒãã¢ã¯ã»ã¹ããŒã«ã§ååãé©ããããããããšãã§ããŸãã ç§ãã¡ã®è³æã ãªã¢ãŒãã³ã³ãã¥ãŒã¿ãŒã§ã³ãã³ããå®è¡ãã1000 ++ã®æ¹æ³ ãã䜿çšã§ããŸãã
æ¢è£œã®äŸãšããŠãããã€ãã®ãªã³ã¯ãæ®ããŸãã
ãããããã¡ãããç§ãã¡ã«äŒããæ©äŒã¯1ã€ã§ã¯ååã§ã¯ãããŸããã ã³ã³ãœãŒã«ã¯ãŸã éããŠããã¡ããã£ã§å¿æŽããŠããŸããïŒ
HelloïŒ
USERNAMEïŒ
PowerShellã«ã¯ãããã¡ã€ã«ã®æŠå¿µããããŸãã ãã®è©³çŽ°ã«ã€ããŠã¯ãTechNetã®Windows PowerShellãããã¡ã€ã«ã®èšäºãã芧ãã ããã ãããã¡ã€ã«ã®å©ããåããŠã次ã®ãšã³ãã£ãã£ãæ§æã§ããããšã«æ³šæããŠãã ããã
- ãšã€ãªã¢ã¹ããŒã ã
- ã³ã³ãœãŒã«ãŠã£ã³ããŠã®ãµã€ãºã
- è²ãšã¿ã€ãã«ããŒã
- ãŠãŒã¶ãŒãããã¡ã€ã«ã®ä»£ããã«ãã©ã«ããŒãéå§ããŸãã
- ã³ã³ãœãŒã«ãéãããšãã«ã¿ã¹ã¯ãå®è¡ããŸãã
æåŸã®ãªãã·ã§ã³ã§ã¯ãããšãã°ã誰ããPowerShellãŠã£ã³ããŠãéããã³ã«é³æ¥œãåçã§ããŸãã æºåãšããŠããŸã ååšããªãå Žåã¯ã次ã®ã³ãã³ãã䜿çšããŠãããã¡ã€ã«ãäœæããå¿
èŠããããŸãã
New-Item -path $profile -type file -force
ããã§ãPowerShell ISEãªã©ã®ä»»æã®ãšãã£ã¿ãŒã§ãããã¡ã€ã«ãå€æŽã§ããŸãã
PowerShell_ISE.exe $profile
ã¿ã¹ã¯ãéå§ããäŸãšããŠãspiceworksããŒã¿ã«ãŠãŒã¶ãŒã®ã«ãŒã¯ãã¬ãŒã¯ã次ã®ã¹ã¯ãªããã§åžåœã®è¡é²ãããããšãææ¡ããŸããã
start-job { [console]::beep(440,500) [console]::beep(440,500) [console]::beep(440,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,1000) [console]::beep(659,500) [console]::beep(659,500) [console]::beep(659,500) [console]::beep(698,350) [console]::beep(523,150) [console]::beep(415,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,1000) }
ã¿ã¹ã¯ãšããŠãåã®ã»ã¯ã·ã§ã³ã®è³æã䜿çšããŠãéå§æã®ã³ã³ãœãŒã«ãããšã話ãèªã£ãããéèŠãªããšã«ã·ã¹ãã 管çè
ãååãšæ称ã§æè¿ããããšãã§ããŸãã ãããŠã次ã®ã³ãã³ãã§DVD-ROMïŒãŸã æã£ãŠããïŒãéãããšãã§ããŸãïŒ
(New-Object -com "WMPlayer.OCX.7").cdromcollection.item(0).eject()
ããã§ã¯ããã³ãŒããŒã¹ã¿ã³ãããéãããã«ãWMPlayer.OCX.7ãªããžã§ã¯ãã䜿çšãããŸãã ãŸããé³æ¥œãåçãããšããç®çã®ããã«äœ¿çšããããšãã§ããŸãã
ã³ã³ãœãŒã«ãã¬ãŒã€ãŒã®äœæ
äœããã®çç±ã§å€ãè¯ãmpdãæ°ã«å
¥ãã ãééããªãèªè»¢è»ãçºæãããå ŽåããŸãã¯å®æããèªè»¢è»ãèŠãŠã¿ããå Žåã¯ããšã³ãžãã¢ãéçºè
ããããŠãã ãã人ã§ããPrateek Singhã ããã°ã§ Windows Media PlayerãšPowerShellã管çããããã®ã·ã¹ãã ãªããžã§ã¯ãã䜿çšããèå³æ·±ããªãã·ã§ã³ãæäŸããŸããã ãã®ã¹ã¯ãªããã®ç¹åŸŽã¯ãåçããããã©ãã¯ãããã¯ã¹ã§ããããšã§ãã
ã¹ã¯ãªãããããã«PowerShellãããã¡ã€ã«ã«è¿œå ãã1ã€ã®ã³ãã³ãã§ãã¬ãŒã€ãŒãå®è¡ã§ããŸãã
Music " "
ãã¬ãŒã€ãŒã®èµ·åã
åçãå¶åŸ¡ããã«ã¯ããã©ã¡ãŒã¿ãŒãã·ã£ããã«ïŒã·ã£ããã«ïŒãã«ãŒãïŒã«ãŒãåçïŒãããã³åæ¢ïŒåçãåæ¢ïŒã§ã³ãã³ããèµ·åããŸãã次ã®ãã©ãã¯ã«ç§»åãããšãã·ã¹ãã éç¥ãäžé
ã«è¡šç€ºãããŸãã
æ°ãããã©ãã¯ã®éå§ã®éç¥ã
å®å
šãªã¹ã¯ãªããã¯ãäœæè
ãªããžããªã§å
¥æã§ããŸã ã
Prateek Singhã®ããã°ã«ã¯ãããŸããŸãªçšåºŠã®æçšæ§ã®ããã¹ã¯ãªãããããããããã®ã§ããã®ãã¡ã®ããã€ãã«ã®ã¿ãªã³ã¯ãä»ããŸãã
- HTTPã®ãšã©ãŒãã³ãŒã ãMACã¢ãã¬ã¹ã«ãããããã¯ãŒã¯ã«ãŒãã®è£œé å
ã³ãŒããããŒãã«ãããããã³ã«ã®èª¬æãªã©ã
- å³ãäœæããããã®ã¢ãžã¥ãŒã« ã
- æ¬æ Œçãªã³ã³ãœãŒã«ã°ã©ãã£ãã¯ã¹ã«ãã倩æ°äºå ± ã
PowerShellã®å€©æ°äºå ±ã ã§ããããã
ãã«ãã¡ãã£ã¢ã«ãããããã®ã§ã3Dããªã³ããã¢ããªã³ã°ããã®ä»ã®æ¡åŒµçŸå®åãã®ãªããžã§ã¯ããäœæãããªãã·ã§ã³ã«ã€ããŠèª¬æããŸãã
ãã¯ããŠã®æãæ¹ãä»ã¯3Dã§ïŒ
1æã Cosmos Darwinã¯ã PowerShellã§è€åçŸå®ã¢ãã«ãäœæãããšããããã°æçš¿ãæçš¿ããŸãããããã¯ãPowerShellã䜿çšããŠ3Dã¢ãã«ãã¡ã€ã«ãçæããå¯èœæ§ãæ€èšããŸããã
.objãã¡ã€ã«ã解æãããšãã v ããšããè¡šèšã®ãã€ã³ãã®åº§æšãšãã fãã®æåã®äžã«ããå¹³é¢ã®åº§æšãèŠã€ããããšãã§ããŸãã ããšãã°ããã¡ã€ã«å
ã®åçŽãªãã¥ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
v 0 0 0 v 0 0 1 v 0 1 1 v 0 1 0 v 1 0 0 v 1 0 1 v 1 1 1 v 1 1 0 f 1 2 3 4 f 8 7 6 5 f 1 5 6 2 f 4 8 5 1 f 2 6 7 3 f 3 7 8 4
çµæã®ãã¡ã€ã«ãä¿åããã°ã©ãã£ã«ã«ãã¥ãŒã¢ãŒïŒããšãã°ããè€åçŸå®ãã¥ãŒã¢ãŒãïŒã§éããšããã¥ãŒããå®éã«æç»ãããŸãã
æ°ããäœæããããã¥ãŒãã
ããè€éãªæ§é ãæã€ãã¡ã€ã«ãæåã§äœæããããšã¯ããå°é£ã§ãããããæ°åŠãšPowerShellã圹ç«ã¡ãŸãã
ããšãã°ããã£ãªãã¥ãœã¹ãããã«ã¹ã®æ å
ã®ããã«ã¯ã€ã³ã®ã°ã©ã¹ãäœæã§ããŸãã ã¬ã©ã¹ã¯å転äœãªã®ã§ãã¬ã©ã¹ã®ååã ããäœæããã°ååã§ãã 次ã«ãå転äžã«ãç®çã®è¡ç®¡ãåŸãããŸãã
ãã®å³ãå転ããããšãã°ã©ã¹ãæã«å
¥ããŸãã
次ã«ãããã€ãã®è³æãè¿œå ããæ°åŠã®åŠæ ¡ã®ã³ãŒã¹ãèŠããŠãå°æ¬ã®åœ¢ã§æŽçããçŽ æŽãããã°ã©ã¹ãæã«å
¥ããŸãã
ã¬ãã£ã°ã©ã¹ã
æ¢è£œã®ã¹ã¯ãªãããšãã¯ã¹ãã£ã¯ã obj-in-powershellãããžã§ã¯ãã®äœæè
ã®GitHubã¢ã«ãŠã³ãã§å©çšã§ããŸãã 次ã«ãPowerShellãš3Dã®ããå®çšçãªäœ¿çšã«ç§»ããŸãããã
ãŠããã£ã¢ãã¿ãªã³ã°
æ³åããŠã¿ãŠãã ãããç£èŠã·ã¹ãã ã®ãªããžã§ã¯ããšãã®ã¹ããŒã¿ã¹ã衚瀺ããITãªãã£ã¹ã®å€§ç»é¢äžã®çŸãããããã ãããŠãpr玢奜ããªç®ããªããšãã¯ãããããæããããã§ã·ã³ããœã³ãºãèŠãããšãã§ããŸãã
ã«ãŒããããã€ããŒã¯ãåãZabbixãŸãã¯Fpingerã«ããããšãã§ããŸãã ããããé床ã®æ
å ±éã«ããããããã圌ãã®çŸããã¯ããŸãè¯ããããŸããã Micky Balladelliã¯ãUnityã®æ©èœãèŠèŠåã®ããã®PSUnityã¢ããªã±ãŒã·ã§ã³ã®ã»ãããšããŠé©çšããããšã«ããããã®çç¥ãä¿®æ£ããããšãçŽæããŸããã
èãæ¹ã¯ç°¡åã§ãããµãŒããŒã¯ç¹å®ã®ããŒãã§èµ·åãããPowerShellã³ãã³ãã¬ããã®ã»ããã䜿çšããŠç£èŠãªããžã§ã¯ããè¿œå ããããã¹ããŒã¿ã¹ãå€æŽãããããŸãã ã¯ã©ã€ã¢ã³ãã¯ãµãŒããŒã«æ¥ç¶ããçµæã®ç»åã衚瀺ããŸãã ãªããžã§ã¯ãã®ã¹ããŒã¿ã¹ã¯ãZabbixãSCOMãªã©ã®äœ¿ãæ
£ããç£èŠã·ã¹ãã ããååŸã§ããŸãã
ãªããžã§ã¯ããªãã§ãµãŒããŒãèµ·åãããšãã¯ãªãŒã³ãã£ãŒã«ãã§åç¬ã®R2D2ã確èªã§ããŸãã
æ¢ããŠããããã€ãã
[衚瀺]ãã¿ã³ã䜿çšããŠãã¢ãŒãïŒããŒã¿ã»ã³ã¿ãŒãææãå®å®ïŒãåãæ¿ããããšãã§ããŸãã ããªãæšãŠãããã
ç¡äººã®ç£èŠææã
PowerShellã䜿çšããŠãªããžã§ã¯ãã®è¿œå ãéå§ãããšãç¶æ³ãå€ãããŸãã
次ã®ã³ãã³ãã䜿çšããŠããµãŒããŒèªäœã«æ¥ç¶ã§ããŸãã
$Session = New-PSUnitySession -ComputerName localhost -Port 7777
Set-PSUnityServerã³ãã³ãã¬ããã䜿çšããŠãããã€ãã§ãããã«ãªããžã§ã¯ããè¿œå ã§ããŸãã
Set-PSUnityServer -Session $Session -X 0 -Y 5 -Name EXSRV1 -Role Exchange -Location Maui -Status 0 -Description "EXSRV1 has drifted its configuration."
äžèšã®ã³ãã³ãã¯ãäžåãªèª¬æãæã€ãµãŒããŒãè¿œå ããŸãã
圌ãã¯ãµãŒããŒãã«ãŒãã«è¿œå ããR2D2ã¯ãããç 究ãå§ããŸããã
ææã«éœåžãè¿œå ãããã®ã¹ããŒã¿ã¹ãå€æŽããã«ã¯ã次ã®ã³ãã³ãã䜿çšã§ããŸãã
Set-PSUnityCity -Session $Session -Name "Moscow" -Status 3 Set-PSUnityCity -Session $Session -Name "Saint Petersburg" -Status 1
2ã€ã®éœåžãè¿œå ãããŸããã
å¥ã®èå³æ·±ããã¥ãŒã¯ãä»®æ³ãã·ã³ãšãã®ã¹ããŒã¿ã¹ãåãã2ã€ã®ããŒã¿ã»ã³ã¿ãŒã§ãã ã«ããã«ãè¿œå ããŸãã
Set-PSUnityCloudInfo -Session $Session -Site 2 -Name "" -Role "" -Location " " -Status 4 Set-PSUnityCloudInfo -Session $Session -Site 1 -Name "" -Role "" -Location " " -Status 1
次ã«ãã¡ã€ã³ããŒã¿ã»ã³ã¿ãŒã«å€ãã®ä»®æ³ãã·ã³ãäœæããŸãã
$color = 4 for ($i = 0; $i -lt 1500; $i++) { Set-PSUnityCloud -Session $Session -Site 1 -Name "VM$i" -VMHost "Hostname" -Cluster "ClusterID" -Status $color -Description Running $color++; if ($color -eq 5) { $color = 0 } }
åºåã¯æ¬¡ã®çµæã«ãªããŸãã
ä»®æ³ã³ã³ãã¥ãŒã¿ãŒãå転ããŠããŸãã çŸäººïŒ
PSUnityãããžã§ã¯ãã®ãªãªãŒã¹ã»ã¯ã·ã§ã³ã«ããã¯ã©ã€ã¢ã³ããäžé£ã®ã³ãã³ãã¬ãããããã³ãµã³ãã«ã¹ã¯ãªããã䜿çšããŠããµãŒããŒèªäœãããŠã³ããŒãã§ããŸãã Unityã«çããããããã€ãã®ç°¡åãªPowerShellã²ãŒã ã®æéã§ãã
GamedevãšPowerShell
æ°å¹Žåãäžçã¯2048ãšåŒã°ããã²ãŒã ããççºããããŸããã åœåããã©ãŠã¶ããŒãžã§ã³ã¯ãã¢ãã€ã«ããã€ã¹ãå«ããå€ãã®é©å¿ãåããŸããã ãã¡ãããæ¢ã«è¿°ã¹ãMicky Balladelliã«ãã£ãŠäœæãããPowerShellã®ã¯ããŒã³ããããŸããã ãã®ã¹ã¯ãªããã¯ãèè
ã®ããã°ã®èšäº2048 en Powershellã«ãããŸãã
ã²ãŒã ã€ã³ã¿ãŒãã§ãŒã¹
2çªç®ã«äººæ°ã®ããã²ãŒã ã¯ãå
ã
ã¢ãã€ã«ããã€ã¹çšã«äœæãããFlappy Birdã§ãã ã¹ããŒããã©ã³ãæ¿æãããæªå€¢ã®ããã«ã²ãŒã ãå¿ããŠããŸã£ãå Žåã¯ãPowerShellã®ã¯ããŒã³ãšããŠæãåºããŠãã ããã
ã¯ããŒã³èªäœã¯ããšã³ãžãã¢Apoorv Vermaã® Flappy Shellãªããžããªã§å
¥æã§ããŸãã
ã²ãŒã ãèŠããŠãå£ãéããŠããã¬ãæã«å
¥ããŸãã
èšäºã®æåŸã§ãç§ã®ãæ°ã«å
¥ãã®åäŸåãã²ãŒã ã§ããSpace Invadersã®é©å¿ãžã®ãªã³ã¯ãæäŸããããšæããŸãã PowerShellãœãªã¥ãŒã·ã§ã³ã¯ã Space Invadersãšããã¿ã€ãã«ã®Adrian Millinerã®èšäºã§ããŠã³ããŒãã§ããŸãã ã¹ã¯ãªããã¯åãªãã¹ã¯ãªããã§ã¯ãªãããµãŠã³ããåããæ¬æ Œçãªã²ãŒã ã§ãã ä»äºã«ã¯æ³šæããŠãã ããã
PowerShellã«ãã¹ã¿ã«ãžãã¯ã§ããšã€ãªã¢ã³ã®äŸµç¥è
ãšæŠãã
ç¬èªã®èå³æ·±ãçããPowerShellã¹ã¯ãªãããããå Žåã¯ãäœããã¹ãããç¥ã£ãŠããŸãã