# Get-CVLibrary

The `Get-CVLibrary` cmdlet returns the libraries, identified by client name or by an associated MediaAgent, in your CommCell environment.

If you do not provide any parameters, `Get-CVLibrary` returns all the libraries 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-CVLibrary [-Name $[String]] [-MediaAgentName $[String]] [-AllProperties] [$[CommonParameters]]

## Optional Parameters

### Commvault Parameters

Parameter | Description | Data type | Accepts pipeline input? | Accepts wildcard characters? | Type of parameter
--- | --- | --- | --- | --- | ---
–`Name` | The name of the library that you want to retrieve. | String | Yes, by: Value Property name | No | Named
`–MediaAgentName` | The name of the MediaAgent that is associated with the library that you want to retrieve. | String | Yes, by: Value Property name | No | Named
–`AllProperties` | Gets full details of library instances. | 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

A PSCustomObject that lists the storage resource library instances.

## Example: Get the Libraries in the CommCell Environment

The following example returns the name and ID of all the libraries in your CommCell environment.

    Get-CVLibrary

×

Loading...