Clear Exchange system logs from all Exchange Servers

This script will delete files from all exchange servers with an invoke command string executed against all exchange servers. It uses the exchange PS-Snapin for Exchange 2013/2016 to initiate, so needs to run from an Exchange server in current form. Set this as a scheduled task

 
 
 
 
 
(0)
349 times
Add to favorites
Exchange
10/24/2019
E-mail Twitter del.icio.us Digg Facebook
  • I got error running this
    2 Posts | Last post January 17, 2020
    • Access is denied
          + CategoryInfo          : NotSpecified: (:) [Get-ChildItem], UnauthorizedAccessException
          + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetChildItemCommand
    • There are a couple of things that need to be set up for this. You need to make sure the service account that runs the script has remote PowerShell access to the servers (and that they allow remote script execution without signing) and local admin access to the servers.