Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for shutdown.ps

(view source code of shutdown.ps as plain text)

  1. if ( $HOME[0] -eq "/" ) {
  2. 	# Linux
  3. 	shutdown -P
  4. } else {
  5. 	# Windows
  6. 	( Get-WMIObject -Query "Select * From Win32_OperatingSystem Where Primary=True" ).ShutDown( )
  7. }
  8.  

page last modified: 2024-04-16; loaded in 0.0208 seconds