This script will collect data from computers in the computers.txt list, about defragmentation.
- Save your computers name in the computers.txt and save on a network share which is reachable for the clients.
- Modify the paths, to your enviromental. After run, the collected .csv will be in, the destination folder, all you have to do is import with Excel, and hip hip hurray you have a list, which clients need defragmentation.
(On Windows 7 clients bydesign not allowed the remote powershell, so you have to enable it, with a GPO. For example: https://www.techrepublic.com/article/how-to-enable-powershell-remoting-via-group-policy/)!