To help you check disk space remotely using PowerShell, here we provide you with two options in this post. You can choose to run the PowerShell script directly on your local computer or remotely access your remote computer and run the script on it.
“I require a PowerShell script that returns the drive letter, drive capacity, drive usage, and free space for a networked remote server. How can I accomplish this using only my local laptop?
-Question from Quora”
Here in this part, we introduce two ways to teach you how to check disk space remotely using Windows Powershell. Depending on whether you want to check disk space through a GUI interface, you can choose to use PowerShell directly from your local computer or to access your remote computer with free remote access software and then check disk space within your remote computer.
Step 1. Right-click Start, and then choose Windows PowerShell (Admin).
Step 2. Type in the following cmdlet and then press Enter, then you can see the size and free space of your disks.
Get-WmiObject Win32_LogicalDisk -ComputerName remote_computer -Filter DriveType=3 | Select-Object DeviceID, FreeSpace, Size
Replace the remote_computer with the computer name of your remote computer.
If you feel this is not intuitive enough, you can also run the following cmdlet to list the size in GB format.
Get-WmiObject Win32_LogicalDisk -ComputerName remote_computer -Filter DriveType=3 | Select-Object DeviceID, @{'Name'='Size (GB)'; 'Expression'={[math]::truncate($_.size / 1GB)}}, @{'Name'='Freespace (GB)'; 'Expression'={[math]::truncate($_.freespace / 1GB)}}
Also, remember to replace the remote_computer with the computer name of your remote computer.
The second option is to use AnyViewer, a free and simple remote desktop software that allows you to view a remote computer and operate it as if you were sitting in front of it. The procedure is separated into two stages. To begin, use AnyViewer to gain remote access to the other computer. Second, you may begin remotely checking disk space with PowerShell.
Step 1. Download, install, and launch AnyViewer on both computers.
Step 2. Go to Log in, and then click Sign up. (If you already have signed up on its official website, you can log in directly.)
Step 3. Fill in the signup information. Then you can see you successfully logged in to AnyViewer. Your device will automatically be assigned to the account you've logged in to.
Step 4 . Log in to the same AnyViewer account on the two devices, then click One-click control to achieve unattended remote access.
✍Note: If you upgrade your account to a Professional or Enterprise plan, you can connect to another computer in privacy mode, which means you can black the screen and block the mouse and keyboard of the remote computer. Then you’ll have more rights, covering assigning more computers for unattended remote access, enjoying high-quality image, and so on.
Step 6. Press Win + R, and then type in "diskmgmt.msc" to open Disk Management.
Step 7. Then you can see your disk spaces. If you want to manage disk partitions and disks more conveniently and easier, you can use get a free & secure disk management tool- AOMEI Partition Assistant Standard.
This post mainly introduces two ways to use the PowerShell command to check disk space on a remote server. If you have the need to check disk space remotely using PowerShell, you can follow the detailed steps we introduced in this post to get started. By the way, if you choose option 2, you can also do many other operations on your remote computer, not only just check disk space.