-1

To disable FSRM quota with PowerShell is command below.

Set-FsrmQuota D:\test -Disabled

Please tell me how to enable with PowerShell.

Best regards,

3
  • 1
    From the MS Docs site learn.microsoft.com/en-us/powershell/module/… I copied this example Set-FsrmQuota -Path "C:\Shares" -Description "limit usage to 1.5 GB" -Size 1.5GB Feb 26, 2019 at 5:26
  • 1
    What do you mean by how to enable in powershell? Are you asking how to open powershell and run the command ? Feb 26, 2019 at 5:43
  • Sorry, as my English skill is poor, I was not able to share what I would like to say to you. I would like to re-enable a quota which was disabled, but Set-FsrmQuota command cannot enable a quota.
    – Hello3389
    Feb 28, 2019 at 0:53

1 Answer 1

2

I think you know how to open PowerShell. The command you gave is quite similar, but if you add "-Disabled" you basically just set a switch to tell the template to be disabled. You could use the switch in case you want to set a certain template, but do not want to have it enabled yet. Or just to disable it. To enable, first check the exact name of the template.

Run:

Get-FsrmQuotaTemplate

After that use the command Gert Jan gave you, with the exact name of the template you choose from the previous command, and run it:

Reset-FsrmQuota -Path "D:\Test" -Template "5 GB Limit"

Please note that "5 GB Limit" is the exact template name found with the first command.

Now the template is set for the folder you chose.

If you want to set on a series of Homefolders for instance, you could do something like.

$homefolders = Get-ChildItem -Path "D:\home"
foreach($folder in $homefolders){
    Reset-FsrmQuota -Path "D:\Test\$($folder.name)" -Template "5 GB Limit"
}

I hope this helps!

3
  • Thank you for your answer. But Size parameter requires type of UInt64, not String.
    – Hello3389
    Feb 28, 2019 at 0:55
  • I've edited my answer, and tested it. This should work. I used Set but actually ment to use Reset-FSRMQuota. Hope this helps! Feb 28, 2019 at 11:21
  • Have you tried using the Reset-FSRMQuota? Let me know if it works :) Mar 1, 2019 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.