I’m new to BatchPatch and even more so to PowerShell scripting. So I apologize in advance for my lack of knowledge on the subject.
I’m trying to clean out all my server’s event logs. I can achieve I can run this directly on each server without issue:
wevtutil el | Foreach-Object {Write-Host “Clearing $_”; wevtutil cl “$_”}
I also know you need to put this in front of it first, with the above surrounded by double quotes.
cmd.exe /c echo . | powershell.exe -ExecutionPolicy Bypass -command
But I’m not sure what the entire syntax needs to look like when I put it into remote command 3. I think I’m having issues using double quote vs single quote, etc. Can anyone help? Thanks in advance!