Using Help in PowerShell ISE

January 31, 2009

Windows PowerShell Integrated Scripting Environment (ISE) comes with a graphical help file (chm) which contains complete help for PowerShell as well as help for using ISE. The help file is located under C:\Windows\Help\Mui\<LCID>. To invoke help, press F1: ISE’s help is also context-sensitive in terms of cmdlet names. If you press F1 while your mouse cursor is positioned inside a cmdlet name, help is displayed for the corresponding cmdlet: Note: Context sensitive help doesn’t work for aliases, more on this below. You can also disable local help and force ISE to get help directly from Technet: $psISE.Options.LocalHelp = $false Now, verify...

Windows PowerShell ISE screenshot capture

January 27, 2009

This function makes a screenshot of ISE. It sends the ALT-PRINTSCREEN keystroke to capture the active window into memory and opens MSPaint.exe so you can paste the capture into, it also registers CTRL+1 as a shortcut key. Paste the code into ISE and run it:  function Capture-ISEScreen   {       ::SendWait("%{PRTSC}")       Start-Process mspaint   }     # create shortcut key   $null = $psIse.customMenu.subMenus.add("Capture-ISEScreen",{Capture-ISEScreen},"CTRL+1")      The “Custom” menu updates and now shows the function name and shortcut key. Now simply press CTRL+1 to capture the editor window.

Active Directory Recycle Bin

January 25, 2009

Windows Server 2008 R2 has a new COOL feature: Recycle Bin. Once you turn it on (one way action!) you can restore deleted objects and all their attributes are also restored, there is no longer a need to rejoin a deleted computer account or rebuild a deleted user account groups membership. The feature has no GUI and the only way to implement it is by using PowerShell which is included by default as part of the Windows Server 2008 operating system. Click the image to watch the...
no comments

PowerGUI 1.6

January 8, 2009

PowerGUI 1.6 has been released and is available for Download. The new version is PowerShell v2 CTP3 compatible and includes some new improvements as well as bug fixes. You can read more on Dmitry's blog or go straight to the WIKI page for the full product coverage, help, video tutorials and more.
no comments


January 5, 2009

When you create WQL queries for Get-WMIObject you sometimes need to know some property values in advance. A good example is when you want to query the event logs for a specific EventType, you cant do: PS > Get-WmiObject -class Win32_NTLogEvent -filter "EventType='error'"Get-WmiObject : Invalid query It yields an error because EventType expects a numeric value:PS > Get-WmiObject -class Win32_NTLogEvent -filter "EventType=1" So, how do you know which values to use? One way is to find them on MSDN. That was my main method, but not anymore. With Get-WMIQualifierValue you will get the value names and their corresponding numeric values for...
one comment