Hi
I have the following powershell script which is called within a DOS batch:-
@ECHO ON
PowerShell.exe -NoProfile -Command "& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%~dpn0.ps1""' -Verb RunAs}"
I need to include error conditions in the script, if the script fails and logs these entries to a log file or eventviewer please ?
Thanks