Mapped Drive Freespace Conundrum

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 10 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
IanUoY
Posts: 91
Last visit: Wed Sep 20, 2023 2:44 am

Mapped Drive Freespace Conundrum

Post by IanUoY »

I can quite easily extract freespace of any mapped drives where the mapped drive is \\server\sharename. However, the particular drives I want to report on is mapped as \\server\sharename\dirname

In this case the size is fine using eg

Get-WMIObject Win32_LogicalDisk -filter "DeviceID='P:'"

However, the freespace reported is the size of the top level share by the looks of it, as it is massively more than the total size of the drive.

Unfortunately we are running Windows Server 2008 R2 and so cannot use the new fsrm cmdlets in Server 2012.

I did notice though that Windows Explorer correctly displays the freespace, which I assume it gets by looking at the quota.

So, my question - can I access the servers quota's remotely or is there a way of grabbing the information as show in Windows Explorer.

Regards

Ian
This topic is 10 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked