MSSC_support
asked on
Schedule an exchange shell task to clear log files
I have a exchange shell script that I run manually to clear out a bunch of log files that are created by exchange which eats up storage space on our environment.
Unfortunately, I cannot get this to work as a scheduled task as it keeps failing. Can anyone guide me to help automate this?
Unfortunately, I cannot get this to work as a scheduled task as it keeps failing. Can anyone guide me to help automate this?
ASKER
Ok. At the moment I have it configured to run whether user is logged on or not and with highest privileges.
The program/script is set to:
and argument:
The error message i get is 0x0.
Hope this helps.
The program/script is set to:
C:\Windows\System32\WindowsPowerShel l\v1.0\pow ershell.ex e
and argument:
-NonInteractive -WindowStyle Hidden -command ". 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; 'C:\Purge Logs\Purge-LogFiles keep 7 days.ps1'"
The error message i get is 0x0.
Hope this helps.
a return of 0 normally means success, non zero means failure. Have you tried circular logging or getting an exchange aware backup
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This works but is slightly more risky.
Can you provide screen shots of task settings