Get-StorageQosPolicy

Retrieves a storage QoS policy from the policy manager.

Syntax

Get-StorageQosPolicy
   [-Name <String[]>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]
Get-StorageQosPolicy
   [-PolicyId <Guid[]>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]
Get-StorageQosPolicy
   [-ParentPolicy <CimInstance>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]
Get-StorageQosPolicy
   [-ChildPolicy <CimInstance>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]
Get-StorageQosPolicy
   [-Flow <CimInstance>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]

Description

The Get-StorageQosPolicy cmdlet retrieves a storage Quality of Service (QoS) policy from the storage QoS Windows Management Instrumentation (WMI) provider.

For more information about Storage QoS, see Storage Quality of Servicehttps://technet.microsoft.com/en-us/library/Mt126108 (https://technet.microsoft.com/en-us/library/Mt126108).

Examples

Example 1: Get a QoS policy by name

PS C:\>Get-StorageQosPolicy -Name "Policy01"

Name    MinimumIops MaximumIops Status

----    ----------- ----------- ------

Policy01 10          100         Ok

This command gets the QoS policy named Policy01.

Example 2: Get a parent QoS policy

PS C:\>
Get-StorageQosPolicy -ChildPolicy (Get-StorageQosPolicy -Name "Policy02")

Name    MinimumIops MaximumIops Status

----    ----------- ----------- ------

Policy01 10          100         Ok

This command gets the parent policy of the policy named Policy02. If there are hierarchical policies, the hierarchy can be traversed using -ChildPolicy and -ParentPolicy.

Parameters

-AsJob

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

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

-ChildPolicy

Specifies a child policy, for which to retrieve a parent policy. If the ChildPolicy parameter is specified, this cmdlet retrieves any parent policy associated with the input object.

Type:CimInstance
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

-Flow

Specifies a flow object. If the Flow parameter is specified, this cmdlet retrieves the policy governing the flow input object, if any.

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

-Name

Specifies the name of the policy, or a wildcard pattern.

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

-ParentPolicy

Specifies a parent policy for which to retrieve child policies. If the ParentPolicy parameter is specified, this cmdlet retrieves all of the child policies associated with the input object.

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

-PolicyId

Specifies the GUID of the policy.

Type:Guid[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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

Outputs

CimInstance

This cmdlet outputs a Common Information Model (CIM) object of type MSFT_StorageQoSPolicyhttps://msdn.microsoft.com/en-us/library/mt164592(v=vs.85).aspx (https://msdn.microsoft.com/en-us/library/mt164592(v=vs.85).aspx).

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.