Skip to content

Instantly share code, notes, and snippets.

@mwrock
Created April 2, 2015 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwrock/82cbd39d3d07cb9efcd4 to your computer and use it in GitHub Desktop.
Save mwrock/82cbd39d3d07cb9efcd4 to your computer and use it in GitHub Desktop.
if(!(Test-Path "$home\test1.txt")) {
new-Item $home\test1.txt -value "hi1" -type file
write-host "reboot 1"
return Invoke-Reboot
}
if(!(Test-Path "$home\test2.txt")) {
new-Item $home\test2.txt -value "hi1" -type file
write-host "reboot 2"
return Invoke-Reboot
}
write-host "I am done"
del $home\test*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment