Guest User

Untitled

a guest
Jan 24th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. exec { schtasks /foo } #Let's send a bogus argument to the task scheduler executable
  2. write-host "This should not be output!"
  3.  
  4. Output:
  5. ERROR: Invalid argument/option - '/foo'.
  6. Type "SCHTASKS / QUERY /?" for usage.
  7. Error executing command: schtasks /foo
  8. At C:\dev\blog_post\default.ps1:11 char:8
  9. + throw <<<< $errorMessage
  10. + CategoryInfo : OperationStopped: (Error executing command: sch
  11. tasks /foo :String) [], RuntimeException
  12. + FullyQualifiedErrorId : Error executing command: schtasks /foo
Add Comment
Please, Sign In to add comment