PowerShell and Power Options

There are many useful tools that offer to Systems Administrator to set up network devices with the desired configuration starting from Group Policy to MS ConfigMgr / System Center Configuration Manager(SCCM) .

What PowerShell is bringing to the table is flexibility to check if everything is working as expected in few lines of code and even to correct issues quickly.

Imagine to check if power option settings are applied correctly to every windows os according to the configuration for the Standard Operating Environment (SOE).

This script will help us to get the power options of a remote host.

This one will set remotely the power options on the target system to High Performance.

In these scripts WinRM will be started remotely if the service is not running and than stopped. Remove this line if you want to leave it running:

There are many cmdlets that accept ComputerName as argument can perform remote actions without WinRM service running e.g:

  • Get-Process
  • Get-Service
  • Get-EventLog
  • Stop-Computer
  • Restart-Computer
  • etc.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.