Remote PS Scripting Question/Problem BatchPatch Forums Home › Forums › BatchPatch Support Forum › Remote PS Scripting Question/Problem This topic has 4 replies, 2 voices, and was last updated 6 years, 6 months ago by doug. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts September 25, 2018 at 4:09 pm #10028 kscurlocParticipant I was able to figure this out… here’s what I did: cmd.exe /c echo . | powershell.exe -ExecutionPolicy Bypass -command “wevtutil el | Foreach-Object {Write-Host “Clearing $_”; wevtutil cl “$_”}” September 25, 2018 at 5:55 pm #10029 dougModerator Glad you got it figured out. This should also work: powershell.exe -command "wevtutil el | Foreach-Object {Write-Host "Clearing $_"; wevtutil cl "$_"}" September 25, 2018 at 8:13 pm #10030 kscurlocParticipant So that’s a good question, now that you mention it. =) In your tutorials, it says to use the “cmd.exe /c echo . | powershell.exe -ExecutionPolicy Bypass -command”. Why is this necessary, or isn’t it? Thanks again… really like this tool!!! September 25, 2018 at 10:17 pm #10031 dougModerator Some things have changed since that tutorial was written. In some cases it may be necessary to use the syntax from the tutorial whereas in other cases it might not be needed anymore. Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In