By default, all IIS logs are stored on the C: drive. This is not recommended, however, because on the one hand this causes performance loss (depending on the configuration) and on the other hand there is a risk that the system drive will run full and the OS will crash.

Moving IIS Logs
Copy the following code into a text file (e. g. Notepad) and change the path in the second line. Save the file as PS1 by changing the file extension from filename.txt to filename.ps1. Run the file filename.ps1 as administrator on the server where you want to move the log files of all IIS sites.

By default, all SharePoint logs are stored on the C: drive. This is not recommended, however, because on the one hand this causes performance loss (depending on the configuration) and on the other hand there is a risk that the system drive will be full and the OS will crash.

Logs can be easily moved using PowerShell. The following commands must be executed on each SharePoint server in the SharePoint 2016 Management Shell.

Moving Trace Logs
The trace logs can be moved using Central Administration > Monitoring > Reporting > Configure diagnostic logging, in which the path is changed in the Trace Logs section. In my example, the new path is D: \Logs\SharePoint\TraceLogs

By default, all IIS logs are stored on the C: drive. This is not recommended, however, because on the one hand this causes performance loss (depending on the configuration) and on the other hand there is a risk that the system drive will run full and the OS will crash.

In most cases this behavior is caused by missing server side binares for features like .NET Framework. To solve this issue just run the following PowerShell command to enable the Server features required by SharePoint 2016. Replace the path to your local copy of the Windows Server 2012 R2 binaries at the end of the code (highlighted in green).

This script collects the size of each Site Collection in a SharePoint farm. The values are written in a text file and are sorted in a descending order by Site Collection size. You may easily specify a different file path ($OutputPath) or file name ($OutputFileName) by modifying the corresponding variables.

Create a Windows Task Scheduler job on one of your SharePoint servers to readout the Site Collection sizes on a regular basis. You may change the retention time by changing the $RetentionTimeDays variable. The default value is 14 days.