Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. $prefix_path = "C:SharesUsers"
  2. $path = $prefixo_path+$chosen_username
  3.  
  4. if($Quota){
  5. invoke-command -computername $servername {Set-FsrmQuota -path $path -Size $Quota+"GB"}
  6. }
  7.  
  8. if((invoke-command -computername $servername {Get-FsrmQuota -path $path} | select @{n='QuotaSize'; e={$_.Size / 1gb -as [int]}}).QuotaSize -eq $Quota){
  9. return "Success."
  10. } else {
  11. return "Failed."
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement