Get-Busy.ps1 powershell script to create files on many PCs and collect metrics
- $WorkFolder = “e:\support” # Folder on each VM where test files will be created
- $MaxSpaceToUseOnDisk = 20GB # Maximum amount of disk space to be used on each VM’s $WorkFolder during testing
- $VMPrefix = “V-2012R2-LAB” # We’ll use that to scope this script (only running VMs with name matching this Prefix will be processed)
- $LocalAdmin = “administrator” # This is the local admin account on the VMs. You can also use a domain account here if you like.
The script requires 1 positional parameter to indicate whether you wish to start the testing on the VMs or stop it. For example to start:
To end the testing, use:
The script will reach out to the VMs being tested and stop the busy.ps1 script, collect the test results, and cleanup the $Workfolder on each VM.
The script generates 2 log files:
- A general log file that contains the messages displayed on the screen about each action attempted.
- A CSV file that contains the compiled test results from all the CSV files generated by each busy.ps1 script on each of the tested VMs
Here’s an example of the compiled CSV file Get-busy_20140714_071428PM.csv