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
D$ * D:\ Default share
IPC$ * Remote IPC
Share01 * D:\Share01
Share02 * D:\Share02
ShareAll * D:\ShareAll
# クォータ用テンプレート確認
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 : 2 GB Limit
Size : 2147483648
SoftLimit : False
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
.....
.....
# 例として [Share02] に対して 2GB ハードリミットの自動適用クォータテンプレートを適用
PS C:\Users\Administrator> New-FsrmAutoQuota -Path "D:\Share02" -Template "2 GB Limit"
Disabled : False
Path : D:\Share02
Size : 2147483648
SoftLimit : False
Template : 2 GB Limit
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
# 一時的に自動適用クォータを無効化する場合は以下
PS C:\Users\Administrator> Set-FsrmAutoQuota -Path "D:\Share02" -Disabled:$true
# 無効な自動適用クォータを有効化するには以下
PS C:\Users\Administrator> Set-FsrmAutoQuota -Path "D:\Share02" -Disabled:$false
# 設定した自動適用クォータエントリを削除するには以下
PS C:\Users\Administrator> Remove-FsrmAutoQuota -Path "D:\Share02"
Confirm
Are you sure you want to perform this action?
Operation: Delete, Object: auto-quota, Object Identifier (Path): D:\Share02
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
|