A Podcast about Windows PowerShell.
Listen:
Introduction
- Big thanks to Shay and his PowerShell Radio post. 🙂
News
- PowerShell Community (powershellcommunity.org)
- "Real" non-profit organization created by corporate sponsors including Microsoft, Quest, Sapien, and ShellTools.
- Event calendar, blog hosting, forums, etc.
- Still under construction.
- PowerShell Central (powershellcentral.com)
- Hosted by BSonPosh and lots of help contributed by Jaykul.
- "All PowerShell bloggers" aggregate news feed, very cool script repository, news, etc.
- Still under construction.
Relaunch and refocus of Powershell Live (ShellTools) as well as a new developer blog. New features in development like context menus for collections and pipelines.
Resources
- New article in Technet Mag by Don Jones on working with Regular Expressions in PowerShell.
- Another regex article: Regular Expressions in PowerShell and Perl
Tips
- Get-hVm scriptfrom Hal
- Emits a PSCustomObject with properties (and perhaps later, methods) that represent every virtual machine which runs on one or more specified VMWare ESX host servers.
- Out-Excel script can be found on the article "Out-This, Out-That" article on the Pathalogical Scripter blog.
Cmdlet of the week
- Write-Verbose
- Use in parameter section of functions and combine with an If statement to enable or disable verbose logging.
Function Get-Foo {
Param ( [switch] $Verbose )
If ($Verbose) { $VerbosePreference = "Continue" }
Write-Verbose "My verbose stuff goes here
Write-Verbose "and is not seen at all unless"
Write=Verbose "I supply the -verbose switch"
}
One-Liners
- write-verbose "$(Get-Date -f 's') my log entry goes here"
Gotchas
- Problems occur when a brackets "[" are in your filenames.
- Stamp ACL onto Directory Tree thread on Powershell Community forum
- Careful with following the $_ automatic variable by a colon
- Out-Host "This $_:won't work right."
- Out-Host "This ${_}:will."
Thanks for listening! We love feedback and news tips, you can send them to [email protected]. Join our Facebook group "PowerScripting Podcast".