Editar

Compartilhar via


New-FsrmAutoQuota

Creates an auto apply quota.

Syntax

New-FsrmAutoQuota
   [-Path] <String>
   [-Template <String>]
   [-Disabled]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-FsrmAutoQuota cmdlet creates an auto apply quota. By using auto apply quotas, you can assign a quota template to a parent volume or folder. File Server Resource Manager (FSRM) automatically generates quotas that are based on that template. The server generates quotas for each of the existing subfolders and for subfolders that you create in the future.

You can verify all automatically generated quotas by using the Get-FsrmAutoQuota cmdlet. Get-FsrmAutoQuota returns an individual quota for each subfolder and the auto apply quota profile in the parent volume or folder.

Examples

Example 1: Create an auto apply quota on a folder

PS C:\> New-FsrmAutoQuota -Path "C:\Shares\CtrShare03" -Template "250 MB Extended Limit"

This command creates an auto apply quota on the folder named C:\Shares\CtrShare03. The server generates quotas based on the "250 MB Extended Limit" template for each of the existing subfolders in C:\Shares\CtrShare03 and for subfolders that you create in C:\Shares\CtrShare03.

Example 2: Create an inactive auto apply quota

PS C:\> New-FsrmAutoQuota -Path "C:\Shares\CtrShare03" -Template "100 MB Limit" -Disabled

This command creates an auto apply quota on the folder C:\Shares\CtrShare03 and applies the "100 MB Limit" template to the quota. The command disables the auto apply quota, which means that the server does not generate quotas for subfolders in C:\Shares\CtrShare03.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet.

For more information about Windows PowerShell background jobs, see about_Jobs.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Disabled

Indicates that the server does not track quota data for the quota and does not run any action associated with quota thresholds.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Path

Specifies a valid local path to a folder. The server applies the auto apply quota to each of the subfolders (current and future) in this folder.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Template

Specifies a name of a quota template on the server.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

SwitchParameter

Outputs

Object