PowerShell Team
Automating the world one-liner at a time…
Latest posts
Getting Started with AppLocker management using Powershell
Have you tried out the new AppLocker feature in Windows 7? If not, check it out here and here. Also check out the AppLocker references during TechEd here along with a related video here. AppLocker allows you to specify applications that can or cannot run on the machines in your network. AppLocker’s management tools are optimized towards creating an “allow list” of applications i.e. the list of applications that are allowed to run. Applications not on the allow list are blocked by the system. Perhaps, you have been intrigued by “allow listing” and have tried to implement this approach to get a control over t...
PowerShell 2.0 – Differences Between Win7Beta and Win7RC
Oisin Grehan, PowerShell MVP has done a diff between Powershell 2.0 that shipped with Win7 Beta and Win RC... very useful if you have moved to RC build (or planning to do so) http://www.nivot.org/2009/05/22/PowerShellV20DifferencesBetweenCTP3Win7BetaAndWin7RC.aspx. PowerShell team thanks Oisin for this useful blog post. Osama Sajid, Program Manager
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