This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Logs out inactive users. | |
.DESCRIPTION | |
Note: This script was forked and modified to also count "Active" but idle users as inactive. | |
Logs out inactive users, except for specific users that | |
have been manually approved and are allowed to stay logged | |
in for indefinite periods of time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Start-Cleanup { | |
<# | |
.SYNOPSIS | |
Automate cleaning up a C:\ drive with low disk space | |
.DESCRIPTION | |
Cleans the C: drive's Window Temperary files, | |
the local users Temperary folder, IIS logs(if applicable) and empties the recycling bin. | |
All deleted files will go into a log transcript in $env:TEMP. By default this |