Get-CVStoragePolicy

Updated

The Get-CVStoragePolicy cmdlet returns information about storage policies in your CommCell environment.

If you do not provide any parameters, Get-CVStoragePolicy returns all the storage policies in your CommCell environment.

Before you can use this cmdlet, you must log on to your CommCell environment using the Connect-CVServer cmdlet. For more information, see Connecting to a CommCell Environment with PowerShell.

Syntax

Get-CVStoragePolicy [-Name <String>] [-AllProperties] [<CommonParameters>]
Get-CVStoragePolicy [-Name <String>] [-MediaAgentName <String>] [-AllProperties] [<CommonParameters>]
Get-CVStoragePolicy [-Name <String>] [-MediaAgentObject <Object>] [-AllProperties] [<CommonParameters>]

Optional Parameters

Commvault Parameters

Parameter

Description

Data type

Accepts pipeline input?

Accepts wildcard characters?

Type of parameter

Name

The name of the storage policy.

String

No

No

Named

–MediaAgentName

The name of the MediaAgent.

String

No

No

Named

–MediaAgentObject

Specify storage policy instances to become pipeline input of MediaAgentObject.

Object

Yes, by:

  • Value

  • Property name

No

Named

AllProperties

Gets all the properties for each storage policy.

SwitchParameter

No

No

Named

Microsoft PowerShell Parameters

You can use the following Microsoft PowerShell parameters:

  • Debug

  • ErrorAction

  • ErrorVariable

  • OutBuffer

  • OutVariable

  • PipelineVariable

  • Verbose

  • WarningAction

  • WarningVariable

  • Force

  • Confirm

  • WhatIf

Note: Only a few cmdlets support Force, Confirm, and WhatIf parameters.

For more information, see "About Common Parameters" in the Microsoft PowerShell documentation.

Input

This cmdlet does not support input.

Output

PSCustomObject objects that contain information about the storage policies.

Examples

Get All Storage Policies in the CommCell Environment

The following example returns all storage policies in your CommCell environment.

Get-CVStoragePolicy

Get Information for a Storage Policy

The following example returns information about storagepolicy1.

Get-CVStoragePolicy -Name storagepolicy1

Get Information for Storage Policies Associated With a MediaAgent

The following example returns all the storage policies associated with a MediaAgent in your CommCell environment.

Get-CVStoragePolicy -MediaAgentName myMA