PowerShell Team
Automating the world one-liner at a time…
Latest posts
Adding Custom Cmdlet Help for Providers
A new feature of Windows PowerShell 2.0 lets you write custom cmdlet help for Windows PowerShell providers. This blog explains how to do it. (The topic will also be covered in excruciating detail in MSDN, but we don't want you to wait.) What's a Provider? A Windows PowerShell provider is a C# program that exposes a data store to Windows PowerShell through a Windows PowerShell drive (PSDrive). When users view the PSDrive, the data in the data store appears to be organized like a file system drive. The drive has a path and users can navigate through the data store by using file system navigation commands lik...
Update-TypeData, ISE CTP3 vs ISE RC, and Teched2009 Demos
There were quite a few name changes in the ISE Object Model from CTP3 to RC Using Update-TypeData, we can achieve some parity between the two We can add aliases to the CTP3 version to make it look like the RC Version For example, <Name>System.Management.Automation.Host.PSGHost</Name> <Members> <AliasProperty> <Name>CurrentPowerShellTab</N...
Hal and Kirk on HanselMinutes
PowerShell MVPs Hal Rottenberg and Kirk Munro were interviewed for HanselMinutes audio talk show during TechEd 09 - good overview of Powershell http://www.hanselminutes.com/default.aspx?showID=180 Osama Sajid, Program Manager
Get-WindowTitle.ps1
I do this so frequently that I finally put it into a script called Get-WindowTitle.ps1 . Get-Process |where {$_.mainWindowTItle} |format-table id,name,mainwindowtitle –AutoSize Here is what it does: [4696:0]PS> Get-WindowTitle Id Name MainWindowTitle -- ---- --------------- 2448 mmc Server Manager 4696 powershell Admi...
Processing Event Logs in PowerShell
PowerShell V2 ships with two sets of cmdlets for processing event logs, one is *-EventLog set and other is Get-WinEvent. Reading Events: As you can see there are two cmdlets to GET events from event logs , Get-WinEvent and Get-EventLog. Having two cmdlets to do the same thing seems to be counter-intuitive and I will explain the difference between the two to remove the confusion. As we can see, Get-WinEvent can handle a lot more that Get-EventLog does. If you are on Vista and above, Get-WinEvent is the recommend way to read the event logs, use Get-EventLog on XP and Win2k3. A quick check on the n...
V2 Quick Tips: Finding Extra Outputs From Your Script
One of the nifty features of functions in PowerShell is that they can return as many results from as many places as you’d like. In fact, any method or cmdlet that would give you an output if you try it on the command line will also return values from a function. While this can give you a lot of powerful capabilities (like easily building functions that return a list of items), it can also be a source of pain, especially if you have a decently sized script that, every once in a while, produces an unexpected output mixed with expected output. Since you cannot restrict what types get outputted from...
PowerShell session at TechEd 2009
Ibrahim and I presented session WSV402 at TechEd last week with great attendance. Attached are the slides and demos from the talk. Dan Harman, Program Manager Dan Harman Program Manager TechEd2009-WSV402-Demos.zip
Summer Scripting Games 2009
Scripting is fun .. and it gets better when you do it as part of Scripting Games hosted by Microsoft Script Center . But wait there is more - this year Scripting Center is hosting Summer Scripting Games in collaboration with PowerShellCommunity.org and PoshCode.org .This announcement comes straight from Tech.Ed 2009. See full details here http://www.microsoft.com/technet/scriptcenter/funzone/games/games09/announcement.mspx Follow the Scripting Guys on Twitter to stay tuned. Thanks Osama Sajid , Program Manager
Updates from Tech.Ed 09
I am not attending Tech.Ed but I am getting updates from my friends. PowerShell team is very excited about the offering we have for Tech.Ed this year... frankly, what is the best way to save money on your IT Infrastructure... Use PowerShell v2 and automate you tasks. PowerShell v2 is getting good focus in the keynote addresses and demos this year A few highlights: Other Interesting stuff from Tech.Ed Pictures of PowerShell Dinner are here Scripting Guys booth at Tech.Ed was giving free T-shirts and other stuff… but not to everyone - Go to Twitter to find out And these Tech....