This project is written in PowerShell to assist the System Admins to clean up boot drive for Windows patching.
- Script will check on the Windows OS version and the C free space available.
- If the OS version and the amount of free space complied with each other,script will not do anything further but logging.
- If the above doesn't complied, script will proceed to clean up the predefined path which was pre determined not affecting the OS and also applications.
- Upon cleaned up, script will again check for compliancy.
- If above doesnt yet to yield compliancy, script will report how much more space required for compliancy. Proceed to logging.
- Logging is saved as csv format(sample attached).Under the column 'Remedied',the abbreviation meaning is as per item 7:
- YES- Succesfully cleaned to have enough space NR- Not required. Server has enough space. NO- Unsuccesful cleaning. Some or no content deleted. Free space not ample. UTC- Unable to check.
Project is created with:
- PowerShell 5.1
- Access to WMI Objects
- Access to Active Directory Objects
- Run the script on a reliable jump machine with well defined DNS suffixes.
- Create a text file and named it as 'computers.txt' on the desktop.
- Paste the computer name line by line in the above text file.
- Run the script with either ISE or PowerShell console.