Tag Archives: Profile

Module Mania

More and more, you’re seeing members of the Windows PowerShell community package their contributions into modules, myself included. Although you’ll probably still see a lot of individual functions because it is often easier to demonstrate or educate. I received a … Continue reading

Posted in PowerShell v2.0, SAPIEN Press | Tagged , , , | 6 Comments

Cool Custom Consoles

Ok, maybe this isn’t as slick as something from West Coast Customs but maybe you’d like to add a little style to your PowerShell session. I’m talking about the (by now) staid blue console. Perhaps you don’t like blue or … Continue reading

Posted in CommandLine, PowerShell | Tagged , , | Comments Off

Get Profiles

Keith Hill posted a bit of PowerShell code a few days ago that piqued my interest. I knew that in PowerShell, the $profile variable would list your current profile. PS C:\> $profile C:\Users\Jeff\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 This is handy because it makes it … Continue reading

Posted in PowerShell v2.0, Scripting | Tagged , , , , | Comments Off

Powershell: Exit Stage Left

While reviewing and revising the manuscript for Windows PowerShell v2.0: TFM 3rd ed. I had the opportunity to revisit our chapter on working with events in PowerShell. An event in Windows is when something happens like a mouse-click, a process being created or window resized. In PowerShell you can easily watch for an event of interest and then do something when it happens or fires. This is referred to as an event subscription.

PowerShell v2.0 has a few event related cmdlets you can use for creating an event subscription: Register-WMIEvent, Register-ObjectEvent and Register-EngineEvent. Today I want to show you something I think you might find helpful using the last cmdlet in the list. Continue reading

Posted in CommandLine, PowerShell v2.0, Scripting | Tagged , , , , , | 1 Comment