Apologies for those who read my weekly PowerShell Tips, but the past two months have been quite busy – polishing up some books (yes plural) as well as moving my blog to www.POWERSHELLGEEK.com as well as moving this site from WIX to Bluehost. Now, on to the tip.
This tip is a short one, but one I find rather useful now that I’ve run into it. The tip revolves around the use of the ‘-ShowWindow’ switch in PowerShell help. What this switch provides is a windows, totally separate from the current PowerShell window you are running that lists the complete PowerShell help file. How is that useful? Well, if you are using the Get-Help to show examples, parameters and more, the ShowWindow will provide a side by side reference that allows you to work in your PowerShell window with the help visible:
If we scroll down in the window to the right we can find appropriate examples that we can use to connect to the AZ Service (Azure):
The above screenshots were taken on a Windows 10 laptop. If we do a bit of digging, we find that the ShowWindow switch does not always provide detailed help, as seen in the screenshot below:
Keep this in mind as you may get some unexpected results from this switch.
PowerShell Help -ShowWindow
Categories: