Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $strComputer = "."
- $colItems = get-wmiobject -class "Win32_DiskQuota" -namespace "root\CIMV2" `
- -computername $strComputer
- foreach ($objItem in $colItems) {
- [int]$diskSpaceUsedMB = [Math]::Round($objItem.DiskSpaceUsed / 2048)
- write-host "User: " $objItem.User
- write-host "Disk Space Used: " $diskSpaceUsedMB
- write-host
- }
- Read-Host "Press any key to continue...."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement