Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

powershell errors

$
0
0

How does one troubleshoot syntax errors.  The window opens for about one second displays the error and then closes.  I was trying to setup a scheduled task to run a powershell script.

Everytime I tried to test run the task it would display some error for one second and disappear.  One of the errors was because the task was configured for vista and windows 2008 server.  When I changed it to windows 7 it worked.  A few other errors seem to be

Because I had a syntax error in the script.  But I had to trial and error to clear the errors.

How does one get to see the error.  I tried to use -noexit.  But no matter where I put the -noexit it would not keep the window open?

Thanks

RAC

PS This testing was all done while logged in as administrator.


Viewing all articles
Browse latest Browse all 6937

Trending Articles