Advertisement
Guest User

Untitled

a guest
Jul 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $strComputer = "."
  2.  
  3. $colItems = get-wmiobject -class "Win32_DiskQuota" -namespace "root\CIMV2" `
  4. -computername $strComputer
  5.  
  6. $colItems | Format-Table @{Expression={$_.User};Label="User"}, `
  7.               @{Expression={[Math]::Round(($_.DiskSpaceUsed / 1048576), 2)};Label="Diskspace used (MB)"} -auto
  8.  
  9. Read-Host "Press any key to continue...."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement