Configuring 500 Media Agents

Last post 01-02-2019, 2:43 PM by oalexis. 6 replies.
Sort Posts: Previous Next
  • Configuring 500 Media Agents
    Posted: 07-16-2018, 9:09 PM



    We have lots of remote sites, wherein it backups locally first then AUX copy to the main DC.

    I have to configure the remote media agents (disk library, DDB, Storage policy etc) 500 times.

    Its a repeatable task but I don't want to do it manually. What's the best way to do this. One part of it is already solved, when they deploy the OS, it will include the commvault software which points to the commserve environment we have in the main DC

    commvault powershell?


  • Re: Configuring 500 Media Agents
    Posted: 07-17-2018, 9:40 AM


    I would probably go with using Workflow with XML ( you could just XML alone as well). In addition REST api calls can be used The link below shows examples on how to create a disk library and Storage policy at the same time. We have XML to handle what you need to do.

    Commandline -

    Workflow -

    hope this helps and have a good day.

    if you are interested in PS doing this that can be arranged as well.

    Gary Seibak
    Technical Account Manager - Commvault
  • Re: Configuring 500 Media Agents
    Posted: 08-10-2018, 12:03 AM


    Sorry for the late reply.

    This helped me a lot.


    Thanks again

  • Re: Configuring 500 Media Agents
    Posted: 09-10-2018, 12:41 AM

    I was able to run commands using qlogin and qoperation for the things I need to do in the DOS shell

    I want to do a bit of powershell, what's the best way to call qlogin and qoperation.

    I tried to use start-process but seems does not work.



  • Re: Configuring 500 Media Agents
    Posted: 09-10-2018, 3:31 PM

    Hi mheloy

    Are you using Commvault powershell module? you can use powershell to connect to commserv and performfew things like below. We do have limited functionality on library and storage policy side. however the current release of powershell module has enough library for you to write your own.

    In future we will be expanding functionality for Mediamanagement and other agents.


    if you need some immidiate help with something let me know. we can discuss over a call


  • Re: Configuring 500 Media Agents
    Posted: 09-19-2018, 9:30 PM


    No I'm not using powershell module. do you have a link?

    What I did is something like


    $output=qoperation execute -af "$CLILocation\SP_creation.xml" -storagePolicyName $storagepolicyname -libraryName $libraryname -mediaAgentName $new_mediaagent -maInfoList/mediaAgent/mediaAgentName $new_mediaagent -path $DDBPath -enableGlobalDeduplication 1 -hostGlobalDedupStore 1 -enableDASHFull 1 -enableDeduplication 1
    $doc = [xml]$output

    if($doc.App_CreateStoragePolicyResp.error.errorCode -eq "0")
  • Re: Configuring 500 Media Agents
    Posted: 01-02-2019, 2:43 PM

    I used this to  call qlogin within Powershell

    $ssoarg = "-sso"
    & "D:\Program Files\Commvault\ContentStore\Base\qlogin.exe" $ssoarg

    It will pass your currently logged in creds to qlogin.exe.


    To call qoperations via Powershell I do something like this


    invoke-command -ArgumentList $clientname,$instancename,$subclientname,$datastoragepolicy,$logstoragepolicy,$recoverymodel -scriptblock {&'D:\Program Files\Commvault\ContentStore\Base\qoperation.exe' execute -af create_subclient_template.xml -appname 'SQL Server' -clientname $args[0] -instancename $args[1] -subclientname $args[2] -dataBackupStoragePolicy/storagePolicyName $args[3] -logBackupStoragePolicy/storagePolicyName $args[4] -subclientRecoveryType $args[5]  -disableAutoDiscovery FALSE}


    You'd have to initialize the variables of course. But the above will create a SQL server subclient configured for certain storage policies.

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy