Hello All. I’m attempting to write a script to disable a subclient. We have hundreds that we don’t require the backup of the File System, so I’d like to disable them.
However when I attempt to disable the subclient with this command it fails.
Disable-CVBackupSubclient -SubclientId 4777 Disable-CVBackupSubclient : Invalid URI: The format of the URI could not be determined. At line:1 char:1 + Disable-CVBackupSubclient -SubclientId 4777 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) rDisable-CVBackupSubclient_Disable], UriFormatException + FullyQualifiedErrorId : Commvault.Powershell.Cmdlets.DisableCVBackupSubclient_Disable
I wonder if there is another way to disable these subclients via Powershell?
Also, I wonder if I can use another PowerShell command to disable the subclient vs. using Disable-CVSubclient. Can one of these do the job? Backup-CVsubclient or Set-CVsubclient?
Thanks,
Dan
Hello @dgzagm4q4cv
I believe you are looking to disable the activity control for a specific sub client, like this:
I tested it in my lab as well and it works fine. For disabling the backup, you would have to use -si 0 in the end.
Let me know if that helps.
Best,
Rajiv Singal
oh! this is getting good. I’m able to run the qoperation execute script for one client manually. Now to figure out how to perform a Powershell foreach loop to execute the qoperation execute for multiple servers.
Hello @dgzagm4q4cv
You could try to copy and paste the same command in a notepad line by line, change the required values, make a script of it (.bat) and place it under the path (C:\ProgramFiles\Content Store\Base\DBUpgrade\Commserver\MainUpgrade\DBStoredProcedure) and run the script like this:
Since the values like default backup set name, sub client name, IDA agent type can change, you can easily change it in the script before running it, that would reduce a bit of task for you.
Best,
Rajiv Singal
Your idea works just fine; use a bit of Excel magic to get all the server names in and it’s good to go.
Because I wanted to use Powershell and use a foreach loop I did this…
I’m sure there are ways to make this more efficient, but I’m not a powershell expert. :-)
@dgzagm4q4cv Your script looks far better than mine of course since I am also not an expert on power shell. I am glad you found a way out for now to get going, its far better than doing it manually one by one.
Do let us know if you need any further assistance.
Best,
Rajiv Singal
Has anyone tried making a similar script for disabling client activity on VM’s? We tried taking the script above and replacing the a=Q_FILESYSTEM with a=Q_VIRTUAL_SERVER but it does not work.
Has anyone tried making a similar script for disabling client activity on VM’s? We tried taking the script above and replacing the a=Q_FILESYSTEM with a=Q_VIRTUAL_SERVER but it does not work.
We were able to resolve this today. We don’t use SSO so the script was silently failing. We reviewed the qcommand.log file on the server and found that the script errored out on SSO.
By removing -ArgumentList “-sso” from the script it now prompts for username and password at each run. It now works to disable VM activity without error.
I don’t want to delete the subclient, just disable it. I’m attempting to stay within PowerShell, if possible.
Disable-CVSubclient doesn’t have -ClientName as an option.
Here’s the syntax for the command, which shows some URI stuff the error shows. How do I form the command to make this disable the client?
Also, I wonder if I can use another PowerShell command to disable the subclient vs. using Disable-CVSubclient. Can one of these do the job? Backup-CVsubclient or Set-CVsubclient?
Thanks,
Dan
clear
414 / 5.000
I'm not sure if this is exactly what you're looking for, but using the Disable-CVBackupSubclient command I was able to disable several subclients under the same Virtual Center Client.
# Get subclients $subclients = Get-CVSubclient -ClientName "VCenter_Client"
# Disable l'Activity Control on specific Subclient foreach ($subclient in $subclients) { if ($subclient.SubclientName -like "*Specific_Subclient"){ Disable-CVBackupSubclient -SubclientId $subclient.subclientId -Confirm:$false } }