Powershell SDK
You can use the Commvault PowerShell module to interact with objects in your CommCell environment using PowerShell cmdlets. The cmdlets allow you to perform tasks, such as adding clients or updating client properties and a lot more, in a PowerShell scripting environment.
You can find Commvault Powershell SDKs on Gallery
Get Started on Commvault Powershell SDK
1
Install using powershell gallery
Install-Module -Name CommvaultPowerShell
2
Login To CommCell
Connect-CVServer -ServerName $serverName -UserName $userName -Password $password
3
Retrieve all clients
$clients = Get-CVClient
4
Get subclient
$subclient = Get-CVSubClient -ClientName $clientName -BackupsetName $backupsetName -SubClientName $subclientName
5
Run backup for a subclient
Backup-CVSubclient -Id 7 -BackupType Full
6
Get running jobs
Get-CVJob | Where-Object { $_.Status -like 'Running' }