CODE – PowerShell shutdown-computer

Function Shutdown Computer

Synopsis: Will shutdown, Log Off or Reboot a remote or a local computer.
Description: Will shutdown, Log Off or Reboot a remote or a local computer. Force will shutdown open programs etc.
Example: Shutdown-Computer mycomputer ‘Log Off’
Will Log Off the computer mycomputer
Shutdown-Computer mycomputer ‘Shutdown’
Will Shutdown the computer mycomputer
Shutdown-Computer mycomputer ‘Reboot’
Will Reboot the computer mycomputer
Shutdown-Computer mycomputer ‘Power Off’
Will Power Off the computer mycomputer
Shutdown-Computer mycomputer ‘Log Off’ other
Will Log Off the computer mycomputer with other credentials

Comments

comments

Leave a Reply