DCSIMG
CTP2 - Shay Levy

Shay Levy

If you repeat it, PowerShell it!

Browse by Tags

All Tags » CTP2 (RSS)
Do you know your aliases?
This little PowerShell script you can check how familiar you are with all the built-in aliases in PowerShell V2 CTP2. For each alias there are 7 cmdlet names to choose from. There are 10 questions, and at the end of the quiz you can review your results and optionally run the quiz again. You need to have PowerShell V2 CTP2 installed for the script to run. Good luck :)
Close Encounters of the PowerShell Kind
Five tones: $notes = 900,1000,800,400,600 $duration = 400,400,400,400,1600 0..($notes.length-1) | % {[console]::beep($notes[$_],$duration[$_]) } Spaceship Siren: 1..10 | % { 370..470 | % { [console]::beep($_,5) }} Talking alien :) 900,500,1000,800,400,600,1200,300,200,500,1100,300 | % {[console]::beep($_,100)} CTP2 Alien: 1..20 | foreach { $rnd = (Get-Random -min 0 -max 20)*100 if ($rnd -eq 0) { sleep -m 10 } else { [console]::beep($rnd,100) } }
CTP2 - Get Process/Service from remote computers
One major change to the Get-Process/Get-Service cmdlets in CTP2 is the ability to get objects from remote computers via a new parameter, computerName (or -c for short). You can map process/service objects to their computer by the machineName member. PS > Get-Service s* -c computer1,computer2 | select name,machineName Name MachineName ---- ----------- sacsvr computer2 SamSs computer1 SCardSvr computer1 Schedule computer1 seclogon computer1 SENS computer1 ServeRAIDManagerAgent computer2 (...) PS...