Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\Administrator> Get-SmbShare
Name ScopeName Path Description
---- --------- ---- -----------
ADMIN$ * C:\Windows Remote Admin
C$ * C:\ Default share
E$ * E:\ Default share
IPC$ * Remote IPC
Share01 * E:\Share01
Share02 * E:\Share02
ShareAll * E:\ShareAll
# display templates of Quota
PS C:\Users\Administrator> Get-FsrmQuotaTemplate
Description :
Name : 100 MB Limit
Size : 104857600
SoftLimit : False
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
Description :
Name : 200 MB Limit Reports to User
Size : 209715200
SoftLimit : False
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
.....
.....
# for example, set auto apply quota template with 2 GB hard limit to [Share02] folder
PS C:\Users\Administrator> New-FsrmAutoQuota -Path "E:\Share02" -Template "2 GB Limit"
Disabled : False
Path : E:\Share02
Size : 2147483648
SoftLimit : False
Template : 2 GB Limit
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
# if disable auto apply Quota temporally, set like follows
PS C:\Users\Administrator> Set-FsrmAutoQuota -Path "E:\Share02" -Disabled:$true
# if enable disabled auto apply Quota, set like follows
PS C:\Users\Administrator> Set-FsrmAutoQuota -Path "E:\Share02" -Disabled:$false
# to remove added auto apply Quota entry, set like follows
PS C:\Users\Administrator> Remove-FsrmAutoQuota -Path "E:\Share02"
Confirm
Are you sure you want to perform this action?
Operation: Delete, Object: auto-quota, Object Identifier (Path): E:\Share02
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
|