- 02 Feb 2024
- 1 読む分
- 印刷する
- PDF
Fetch Drive Information of Windows devices
- 更新日 02 Feb 2024
- 1 読む分
- 印刷する
- PDF
The following PowerShell script helps the IT Admins to remotely get the information about Drive(s) like the size, list of the contents stored on it, etc. on their managed Windows devices.
Create a file on your desktop, for example, fetch_drive_info.ps1 and open it in a text editor like notepad++
Copy the contents below to the file or click here to download the file.
The details that are fetched are:
Name: It lists the name of the drive.
Used (GB): It lists the memory usage (in GB) by the drive.
Free (GB): It lists the available memory space (in GB) in the drive.
Provider: It lists the provider of the drive, which defines the logic that is used to access, navigate, and edit the drive to the computer.
Root: It lists the root directory of the drive.
CurrentLocation: It lists the path location at which the drive is stored on the device.
Get-PSDrive
You will be able to see the information in the Output tab in View Status report on the Scalefusion dashboard.
Follow our guide to upload & publish the PowerShell script using Scalefusion Dashboard.
You can also fetch details of a specific drive by mentioning the drive name. For example, if you would like to fetch information about the C drive, you can use the following script.
Copy the contents below to the file or click here to download the file.
Set-Location C:\
Get-ChildItem
Please note that to use the PowerShell scripts, the Scalefusion MDM Agent Application must be installed on the device(s). Please follow our guide to publish and install the Scalefusion MDM Agent Application.
Notes:
The scripts and their contents are sourced from various albeit authenticated Microsoft sources and forums.
Please validate the scripts on a test machine before deploying them on all your managed devices.
Scalefusion has tested these scripts, however, Scalefusion will not be responsible for any loss of data or system malfunction that may arise due to the incorrect usage of these scripts.