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

525 times
Add to favorites
E-mail Twitter 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.