Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for reboot.ps

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

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

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