PowerTip: Get a GUI interface for any PowerShell cmdlet

Summary: Use the Show-Command to build PowerShell cmdlets. I ran into a problem. Some cmdlets have too many parameters to list. Is there an easy way to build a cmdlet with its parameters for the console? You’ll love this trick! Just use the Show-Command cmdlet with any PowerShell cmdlet to get a GUI interface. In…


Find ready-to-use sample PowerShell scripts in the GUI

Summary: Honorary Scripting Guy, Sean Kearney, goes over some often missed, easy-to-use PowerShell techniques for those who are starting out. I had heard a rumor that many of the management tools actually run PowerShell code in the backend. Is there any way to see what code it’s running? Honorary Scripting Guy, Sean Kearney, is here…


PowerTip: List all available CIM classes by using PowerShell

Summary: Use the Get-CimClass cmdlet to see all classes that you can query from. How can I find a list of Common Information Model (CIM) classes in Windows so that I can ask my computer useful questions? Just run the Get-CIMClass cmdlet to get a list of all available classes in the default namespace in…


Use Windows PowerShell as an administrative console

Summary: Honorary Scripting Guy, Sean Kearney, shares his early use of PowerShell as a network administrator. I have a simple but irritating task each day around lunch time. A handful of people usually lock themselves out of Active Directory. Can you help me find an easy way to deal with this? Honorary Scripting Guy, Sean…


PowerTip: List all subfolders under a target path with PowerShell

Summary: Use Get-Childitem to provide a printable list of all folders under a path. I used to use tree.com to get a list of folders on a computer. Is there something close to that in PowerShell? Maybe something I could print? If you were to use Get-Childitem combined with Select-Object, you could get a pretty…


Erase files based on date by using PowerShell

Summary: Honorary Scripting Guy, Sean Kearney, relates his first experience with PowerShell. I was curious just how difficult it is to use Windows PowerShell. For example, how difficult is it to erase files based on the current date? Honorary Scripting Guy, Sean Kearney, is here today, and I can completely relate to exactly what you’ve…


PowerTip: Use a destructive PowerShell cmdlet safely

Summary: Use the –whatif parameter with PowerShell cmdlets to test code live. I heard that PowerShell has a built-in safety switch to many of its cmdlets. Could you show me an example of it in use? No problem. You’re referring to the –whatif parameter, which is meant to show you what would happen if you…


Use Windows PowerShell to search for files

Summary: Use Get-Childitem to search the files system with PowerShell. I saved a file somewhere on my computer and can’t find it. Is there a way to use Windows PowerShell to find it? Honorary Scripting Guy, Sean Kearney, is here today to show you a cool trick I use all the time. I use PowerShell…


PowerTip: Remove trailing space from a string by using PowerShell

Summary: Use the trim() method to remove leading and trailing spaces from a string. Could you do me a huge favor and show me how to get rid of spaces before and after a string in PowerShell? No problem at all. All you need to do is apply the trim() method to remove all the…


Build a hexadecimal clock in PowerShell – Part 5

Summary: Learn to split data in a Here-String and get a console beep. Honorary Scripting Guy, Sean Kearney, is here with our final day this week to wrap up building a hexadecimal clock in PowerShell. When we finished yesterday, we ran across a snag in our output. Most of our rows kept dropping to the…