Hello Guys,
Actually, I need to clear the temp folder by using PS script, in C drive of target servers whenever there is a volume alert >95%. Can someone help me on this please.
Thanks
Indu.
thwack.solarwinds.com/.../118017
Hi Adam,
Thank you so much for the article. In this article, Mark mentioned about a CSV right, pls let me know that do we need to create any new CSV in our MPE server C drive.
Indu
Probably best to design your own solution off Mark's template. Stuff like credentials and network structure can change how this stuff needs to workBased off your title you probably want there to be a script that accepts an IP or hostname as an argument, and potentially another one for credentials, then does a clean on the args[0] target.Could also be valid though to try and reach out to the server on the far end with a hosted cleanme script
Or to reach out to another system to give it an OK to clear a target
My script started working clearing the temp folder when the condition met when it tested against Solarwinds primary server temp folder, However the same not working for other servers.
Below is the path that I am using in Alert action console. I tried both of these, both are working while testing it on primary server but when testing on other servers, its shows script executed successfully, but temp files not cleared.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command "C:\SolarWindsScripts\Delete-TempFiles.ps1 '${N=SwisEntity;M=Caption}'"
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy unrestricted -File "C:\SolarWindsScripts\Delete-TempFiles.ps1" "${NodeName}"
Any reason for this? or any error in the path ?
Thanks,