You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
# Check Free Space PS Script
|
|
|
|
|
|
|
|
|
|
Check Free Space is a PowerShell script that allows AD Admins to check the used/max HDD space on all drives on a remote PC on the domain.
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
|
|
Before you begin, ensure you have met the following requirements:
|
|
|
|
|
- PowerShell with the [ActiveDirectory](https://docs.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps) module installed (Windows only).
|
|
|
|
|
- Proper permissions granted by your Admin.
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
### Using Check Free Space
|
|
|
|
|
|
|
|
|
|
To use Check Free Space, follow these steps:
|
|
|
|
|
|
|
|
|
|
1. Download the `check-free-space` folder and place at a location of your choosing
|
|
|
|
|
2. Open the script in a notepad program
|
|
|
|
|
3. Replace $hostname with the hostname of the target PC
|
|
|
|
|
4. Save the file
|
|
|
|
|
5. Run the script in PowerShell
|
|
|
|
|
6. The results will be printed out in the terminal
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
### Notes
|
|
|
|
|
|
|
|
|
|
Moving forward, future PowerShell versions no longer support Get-WmiObject. So if all of a sudden you see the error message like “RPC Server is unavailable”, it’s probably time to switch over to Get-CimInstance instead. The parameters are the same for Win32_LogicalDisk. Simply replace Get-WmiObject with Get-CimInstance and you are good to go.
|