** Have created a small script for Exchange 2010 to help clean out the IIS Log files, you can find the link to the gallery at the end of the article**
**Update** Tested the script on Exchange Server 2019 Public Preview and it clears the logs without any error.
In your Exchange 2013/2016 and now Exchange 2019 Environment you may be wondering why the space on your C:\ drive where Exchange is installed is filling up so quickly.
This is due to the amount of logging Exchange 2013/2016/2019 does by default. Microsoft turned this on to assist them with more rapid assistance with customers instead of waiting for logs.
From CU6 for Exchange 2013, .etl files were created. With the current build Exchange 2013 creates 50mb files at a time with a maximum of 100 files. For smaller business this is not ideal.
The other feature that logs weekly and daily files is the Diagnostic logs (Health explorer). This will generate files up to 5GB over a week/month. Some of you might want that space because you are limited with the current hardware you have.
The other player here is IIS logs. These can generate quite a bit and at 500MB+ a log file you can run out of space rather quickly.
Lastly, another set of logs that could be filling up is the Http Proxy log. This log will fill up in most cases when you have issues and will create an hourly file from 4MB onwards.
In this article I will go through each of the following logs below and explain how you can maintain them or turn them off:
Diagnostic logs (Health Manager)
ETL Files
IIS Logs
Lastly, A PowerShell script is available to run to clean up this without having to go into each folder.
Diagnostic Logs
Health Manager runs and collects information about the health of the system. If you have ample space this is fine but if you have an 80GB C:\ drive your drive is going to fill up in less than a few days. If you need to disable this feature you can do so as follows:
Open up Services.msc,
<img data-attachment-id=”3819″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/hm1/” data-orig-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM1.png?fit=861%2C696&ssl=1″ data-orig-size=”861,696″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”HM1″ data-image-description=”” data-medium-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM1.png?fit=300%2C243&ssl=1″ data-large-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM1.png?fit=861%2C696&ssl=1″ class=”aligncenter wp-image-3819 size-full” src=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM1.png?resize=861%2C696&ssl=1″ alt=”” width=”861″ height=”696″ srcset=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM1.png?w=861&ssl=1 861w, https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM1.png?resize=300%2C243&ssl=1 300w, https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM1.png?resize=768%2C621&ssl=1 768w” sizes=”(max-width: 861px) 100vw, 861px” data-recalc-dims=”1″ />
Locate the Microsoft Exchange Health Manager Service.
Double click the service and change the startup to disabled.
Stop the service if it is running.
<img data-attachment-id=”3820″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/hm2/” data-orig-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM2.png?fit=860%2C696&ssl=1″ data-orig-size=”860,696″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”HM2″ data-image-description=”” data-medium-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM2.png?fit=300%2C243&ssl=1″ data-large-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM2.png?fit=860%2C696&ssl=1″ class=”aligncenter size-full wp-image-3820″ src=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM2.png?resize=860%2C696&ssl=1″ alt=”” width=”860″ height=”696″ srcset=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM2.png?w=860&ssl=1 860w, https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM2.png?resize=300%2C243&ssl=1 300w, https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM2.png?resize=768%2C622&ssl=1 768w” sizes=”(max-width: 860px) 100vw, 860px” data-recalc-dims=”1″ />
The next service to locate is the Microsoft Exchange Diagnostics Service.
Follow the same steps as above to stop and disable the service.
The next thing to stop/disable is the Task that runs. Open up Task Scheduler.
<img data-attachment-id=”3821″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/hm3/” data-orig-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM3.png?fit=1050%2C749&ssl=1″ data-orig-size=”1050,749″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”HM3″ data-image-description=”” data-medium-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM3.png?fit=300%2C214&ssl=1″ data-large-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM3.png?fit=1024%2C730&ssl=1″ class=”aligncenter size-full wp-image-3821″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM3.png?resize=1050%2C749&ssl=1″ alt=”” width=”1050″ height=”749″ srcset=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM3.png?w=1050&ssl=1 1050w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM3.png?resize=300%2C214&ssl=1 300w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM3.png?resize=768%2C548&ssl=1 768w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM3.png?resize=1024%2C730&ssl=1 1024w” sizes=”(max-width: 1050px) 100vw, 1050px” data-recalc-dims=”1″ />
In Task Scheduler, expand Microsoft -> Windows and then click on PLA.
You will see 2 tasks, first stop them if they running and then disable them.
The next step is to clear out the logs created by Diagnostics. Open up Explorer.
<img data-attachment-id=”3822″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/hm4/” data-orig-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM4.png?fit=806%2C596&ssl=1″ data-orig-size=”806,596″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”HM4″ data-image-description=”” data-medium-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM4.png?fit=300%2C222&ssl=1″ data-large-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM4.png?fit=806%2C596&ssl=1″ class=”aligncenter size-full wp-image-3822″ src=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM4.png?resize=806%2C596&ssl=1″ alt=”” width=”806″ height=”596″ srcset=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM4.png?w=806&ssl=1 806w, https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM4.png?resize=300%2C222&ssl=1 300w, https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM4.png?resize=768%2C568&ssl=1 768w” sizes=”(max-width: 806px) 100vw, 806px” data-recalc-dims=”1″ />
Navigate to C:\Program Files\Microsoft\Exchange Server\V15\Logging\Diagnostic.
In there you will have to folders, one called DailyPerformanceLogs and the other PerformanceLogsToBeProcessed.
You can delete all the log files located in these 2. The logs to be processed will contain 20MB files while the daily logs will be +- 1GB.
ETL Files
These files are generated almost every hour and are about 50MB in size. The default registry entry for this is to keep 100 files. I will show you how to adjust this value further down.
To locate these files go to the following location:
C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\ETLTraces
<img data-attachment-id=”3823″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/hm5/” data-orig-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM5.png?fit=806%2C598&ssl=1″ data-orig-size=”806,598″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”HM5″ data-image-description=”” data-medium-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM5.png?fit=300%2C223&ssl=1″ data-large-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM5.png?fit=806%2C598&ssl=1″ class=”aligncenter size-full wp-image-3823″ src=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM5.png?resize=806%2C598&ssl=1″ alt=”” width=”806″ height=”598″ srcset=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM5.png?w=806&ssl=1 806w, https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM5.png?resize=300%2C223&ssl=1 300w, https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM5.png?resize=768%2C570&ssl=1 768w” sizes=”(max-width: 806px) 100vw, 806px” data-recalc-dims=”1″ />
As shown above, there are alot of files logged. You can highlight all of them and delete them without a problem. this will free up a few GB.
Within the Diagnostics folder there is another folder that is logging. Here is the location:
C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\Logs
<img data-attachment-id=”3824″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/hm6/” data-orig-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM6.png?fit=806%2C597&ssl=1″ data-orig-size=”806,597″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”HM6″ data-image-description=”” data-medium-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM6.png?fit=300%2C222&ssl=1″ data-large-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM6.png?fit=806%2C597&ssl=1″ class=”aligncenter size-full wp-image-3824″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM6.png?resize=806%2C597&ssl=1″ alt=”” width=”806″ height=”597″ srcset=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM6.png?w=806&ssl=1 806w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM6.png?resize=300%2C222&ssl=1 300w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM6.png?resize=768%2C569&ssl=1 768w” sizes=”(max-width: 806px) 100vw, 806px” data-recalc-dims=”1″ />
As you can see above, alot of log files, you can delete these text files.
Registry Change
You can change the default value of 100 files to a number you want by changing the following registry key:
Key: MaxTraceFileCount
Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\16.0\Search\Diagnostics\Tracing
IIS Log Files
IIS Log files write to the C:\inetpub directory by default, you can change this to another drive etc. These files can be 200mb+ and overtime will use up space on the drive. To delete them open up the following location:
<img data-attachment-id=”3825″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/hm7/” data-orig-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM7.png?fit=806%2C597&ssl=1″ data-orig-size=”806,597″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”HM7″ data-image-description=”” data-medium-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM7.png?fit=300%2C222&ssl=1″ data-large-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM7.png?fit=806%2C597&ssl=1″ class=”aligncenter size-full wp-image-3825″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM7.png?resize=806%2C597&ssl=1″ alt=”” width=”806″ height=”597″ srcset=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM7.png?w=806&ssl=1 806w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM7.png?resize=300%2C222&ssl=1 300w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM7.png?resize=768%2C569&ssl=1 768w” sizes=”(max-width: 806px) 100vw, 806px” data-recalc-dims=”1″ />
Inside this folder you will have 2 other folders namely W3SVC1 and W3SVC2. Inside these are log files you can delete as well.
You can also look in the following folder for the same set of folders: C:\Program Files\Microsoft\Exchange Server\V15\Logging\RpcHttp
<img data-attachment-id=”3826″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/hm8/” data-orig-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM8.png?fit=808%2C597&ssl=1″ data-orig-size=”808,597″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”HM8″ data-image-description=”” data-medium-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM8.png?fit=300%2C222&ssl=1″ data-large-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM8.png?fit=808%2C597&ssl=1″ class=”aligncenter size-full wp-image-3826″ src=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM8.png?resize=808%2C597&ssl=1″ alt=”” width=”808″ height=”597″ srcset=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM8.png?w=808&ssl=1 808w, https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM8.png?resize=300%2C222&ssl=1 300w, https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/HM8.png?resize=768%2C567&ssl=1 768w” sizes=”(max-width: 808px) 100vw, 808px” data-recalc-dims=”1″ />
Here you can also delete these files.
HTTP Proxy Logs
The last place you can look as well for log files is in this location:
C:\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy
Located in each of the folders some files can be 10MB in size and generate quite a few. These logs will tell you if you have errors in your environment especially the RpcHttp folder.
Conclusion
You should be able to free up a few GB’s of space.
PowerShell Script
I created a script which you can use in conjunction with Task Scheduler to clear files when you need to, you can find the script here:
Exchange 2010 Log File PowerShell Script:
For those that would like to see how to do the Task Scheduler I have put together some screenshots as there have been a number of requests for it:
<img data-attachment-id=”3861″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/task1/” data-orig-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task1.png?fit=645%2C486&ssl=1″ data-orig-size=”645,486″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”Task1″ data-image-description=”” data-medium-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task1.png?fit=300%2C226&ssl=1″ data-large-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task1.png?fit=645%2C486&ssl=1″ class=”aligncenter size-full wp-image-3861″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task1.png?resize=645%2C486&ssl=1″ alt=”” width=”645″ height=”486″ srcset=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task1.png?w=645&ssl=1 645w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task1.png?resize=300%2C226&ssl=1 300w” sizes=”(max-width: 645px) 100vw, 645px” data-recalc-dims=”1″ />
<img class=”aligncenter size-full wp-image-3003″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2015/05/Task1.png?resize=645%2C486&ssl=1″ alt=”” width=”645″ height=”486″ data-recalc-dims=”1″ />
Open up Task Schedular and Select New Task. The above window will show. Enter the following:
Name
You can change the User to one that has full Exchange access or leave it with the user currently logged in if it has rights.
Run whether the user is logged on or not
Run with the highest privileges (tick the box)
Configure for :- Windows Server 2012 R2
<img data-attachment-id=”3862″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/task2/” data-orig-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task2.png?fit=644%2C485&ssl=1″ data-orig-size=”644,485″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”Task2″ data-image-description=”” data-medium-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task2.png?fit=300%2C226&ssl=1″ data-large-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task2.png?fit=644%2C485&ssl=1″ class=”aligncenter size-full wp-image-3862″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task2.png?resize=644%2C485&ssl=1″ alt=”” width=”644″ height=”485″ srcset=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task2.png?w=644&ssl=1 644w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task2.png?resize=300%2C226&ssl=1 300w” sizes=”(max-width: 644px) 100vw, 644px” data-recalc-dims=”1″ />
<img class=”aligncenter size-full wp-image-3004″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2015/05/Task2.png?resize=644%2C485&ssl=1″ alt=”” width=”644″ height=”485″ data-recalc-dims=”1″ />
Next step, click on the Triggers Tab as show above and then click New…
<img data-attachment-id=”3864″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/task3/” data-orig-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task3.png?fit=603%2C521&ssl=1″ data-orig-size=”603,521″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”Task3″ data-image-description=”” data-medium-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task3.png?fit=300%2C259&ssl=1″ data-large-file=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task3.png?fit=603%2C521&ssl=1″ class=”aligncenter size-full wp-image-3864″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task3.png?resize=603%2C521&ssl=1″ alt=”” width=”603″ height=”521″ srcset=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task3.png?w=603&ssl=1 603w, https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task3.png?resize=300%2C259&ssl=1 300w” sizes=”(max-width: 603px) 100vw, 603px” data-recalc-dims=”1″ />
<img class=”aligncenter size-full wp-image-3006″ src=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2015/05/Task3.png?resize=603%2C521&ssl=1″ alt=”” width=”603″ height=”521″ data-recalc-dims=”1″ />
The above window will show, choose your schedule and then click OK.
<img class=”aligncenter size-full wp-image-3005″ src=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2015/05/Task2a.png?resize=644%2C485&ssl=1″ alt=”” width=”644″ height=”485″ data-recalc-dims=”1″ />
Once you have created the Trigger, it will show as above.
<img class=”aligncenter size-full wp-image-3007″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2015/05/Task4.png?resize=645%2C485&ssl=1″ alt=”” width=”645″ height=”485″ data-recalc-dims=”1″ />
Next step is to click on the Actions Tab and then on the New… Button.
<img data-attachment-id=”3865″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/task4/” data-orig-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4.png?fit=645%2C485&ssl=1″ data-orig-size=”645,485″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”Task4″ data-image-description=”” data-medium-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4.png?fit=300%2C226&ssl=1″ data-large-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4.png?fit=645%2C485&ssl=1″ class=”aligncenter size-full wp-image-3865″ src=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4.png?resize=645%2C485&ssl=1″ alt=”” width=”645″ height=”485″ srcset=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4.png?w=645&ssl=1 645w, https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4.png?resize=300%2C226&ssl=1 300w” sizes=”(max-width: 645px) 100vw, 645px” data-recalc-dims=”1″ />
<img class=”aligncenter size-full wp-image-3008″ src=”https://i1.wp.com/www.collaborationpro.com/wp-content/uploads/2015/05/Task4a.png?resize=465%2C506&ssl=1″ alt=”” width=”465″ height=”506″ data-recalc-dims=”1″ />
<img data-attachment-id=”3866″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/task4a/” data-orig-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4a.png?fit=465%2C506&ssl=1″ data-orig-size=”465,506″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”Task4a” data-image-description=”” data-medium-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4a.png?fit=276%2C300&ssl=1″ data-large-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4a.png?fit=465%2C506&ssl=1″ class=”aligncenter size-full wp-image-3866″ src=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4a.png?resize=465%2C506&ssl=1″ alt=”” width=”465″ height=”506″ srcset=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4a.png?w=465&ssl=1 465w, https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task4a.png?resize=276%2C300&ssl=1 276w” sizes=”(max-width: 465px) 100vw, 465px” data-recalc-dims=”1″ />
The window above will show, here you will configure the following:
Action – Start a program
Program/script :- You can paste the below in or browse to the directory listed and choose Powershell.exe:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
In the Add arguments (Optional) section, enter in the following:
-NonInteractive -WindowStyle Hidden -command “& ‘C:\Program Files\Microsoft\Exchange\V15\Scripts\Clearlogs.ps1′”
I put the script in the Scripts folder where Exchange is installed, if you have it in another location then just change the path.
When you done, click the OK button.
<img data-attachment-id=”3867″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/task5/” data-orig-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task5.png?fit=645%2C484&ssl=1″ data-orig-size=”645,484″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”Task5″ data-image-description=”” data-medium-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task5.png?fit=300%2C225&ssl=1″ data-large-file=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task5.png?fit=645%2C484&ssl=1″ class=”aligncenter size-full wp-image-3867″ src=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task5.png?resize=645%2C484&ssl=1″ alt=”” width=”645″ height=”484″ srcset=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task5.png?w=645&ssl=1 645w, https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task5.png?resize=300%2C225&ssl=1 300w” sizes=”(max-width: 645px) 100vw, 645px” data-recalc-dims=”1″ />
<img class=”aligncenter size-full wp-image-3009″ src=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2015/05/Task5.png?resize=645%2C484&ssl=1″ alt=”” width=”645″ height=”484″ data-recalc-dims=”1″ />
Once complete you will see the action as shown above. Click the OK button to finish.
<img data-attachment-id=”3868″ data-permalink=”https://www.collaborationpro.com/exchange-2013-logging/task6/” data-orig-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task6.png?fit=336%2C267&ssl=1″ data-orig-size=”336,267″ data-comments-opened=”1″ data-image-meta=”{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}” data-image-title=”Task6″ data-image-description=”” data-medium-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task6.png?fit=300%2C238&ssl=1″ data-large-file=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task6.png?fit=336%2C267&ssl=1″ class=”aligncenter size-full wp-image-3868″ src=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task6.png?resize=336%2C267&ssl=1″ alt=”” width=”336″ height=”267″ srcset=”https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task6.png?w=336&ssl=1 336w, https://i0.wp.com/www.collaborationpro.com/wp-content/uploads/2018/12/Task6.png?resize=300%2C238&ssl=1 300w” sizes=”(max-width: 336px) 100vw, 336px” data-recalc-dims=”1″ />
<img class=”aligncenter size-full wp-image-3010″ src=”https://i2.wp.com/www.collaborationpro.com/wp-content/uploads/2015/05/Task6.png?resize=336%2C267&ssl=1″ alt=”” width=”336″ height=”267″ data-recalc-dims=”1″ />
A window will popup confirming the Task, enter in the credentials of the user specified in the beginning.
Hope it helps.