Connecting and Using the Get-CVJob Cmdlet:
Get-CVJob –ClientName <TestName> -First 5
I'm trying to build a powershell script that will list info on the last five jobs of *any* server in our environment. I get back the correct info for any server that is in CommVault, but when the server is not in CommVault, I get the following:
INFO: Get-CVClient: client not found having name [<TestName>]
An object is also returned containing information about jobs that don't belong to <TestName>.
I'm not sure why this is happening. I guess it is returning output from a sub CmdLet, but I'm not sure how to address it to error out and return nothing, so I can try and catch and see that the client isn't there.