Scripting Blog

A place to learn about PowerShell and share stories of automation

Use PowerShell to Perform an Orderly Shutdown of a Server Running Hyper-V

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to shut down all virtual machines on a server running Hyper-V prior to shutting down the server.  Hey, Scripting Guy! From time to time I need to shut down one of our servers that is running the Hyper-V role. The problem is that these servers have multiple ...

PowerTip: Turn Off PowerShell Module Autoload

Summary: Learn how to turn off Windows PowerShell module auto-loading.  I want to disable the Windows PowerShell 3.0 module automatic loading of modules. How do I do this?  Set the value of the $PSModuleAutoloadingPreference automatic variable to none, as shown here. $PSModuleAutoloadingPreference = "none" ...

Use PowerShell to Find Servers that Need a Reboot

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to find servers that need to be rebooted.   Hey, Scripting Guy! My boss is a Falstaff sort of character, but every once in a while he does actually have a good idea. When he recently logged on to a server console (don’t ask me why my boss was ...

PowerTip: Change PowerShell to Display More Info by Default

Summary: Change Windows PowerShell so that it will display more information by default.  I pipe information and select certain properties, but the information in my table is truncated. Using Autosize or Wrap does not help. How can I change Windows PowerShell so that it displays the information contained in the property?  You are...

Use a PowerShell Function to See If a Command Exists

Summary: Microsoft Scripting Guy, Ed Wilson, writes a Windows PowerShell function to see if a command exists before calling the command. Microsoft Scripting Guy, Ed Wilson, is here. This Thursday, February 21, 2013, I will be on the PowerScripting Podcast. I always enjoy talking with Jon and Hal, and while I am not sure of the actual agenda, I...

Feedback usabilla icon