Skip to main content

Hello Community


I'm exploring options to stop Commvault Windows client services in silent mode via the command line. I have observed that the command 'GxAdmin.exe -console -stopsvcgrp All' only works when UAC (User Account Control) is disabled. otherwise, a confirmation prompt is required when UAC is enabled.

we have many servers and don't want to modify GPO each time to disable UAC, I have noticed that during the CV SP upgrade process, the Commvault services are automatically shut down in silent mode, even on servers with UAC enabled, it never prompt to confirm anything.

I'm seeking info about the specific command used during the CV SP upgrade to achieve this automatic shutdown of Commvault Wins Client services in silent mode, regardless of UAC settings.

 

thanks

@DanC 

Hi Dan,

Our processes will run as local system so that is why you aren't (or it isn't) bothered by UAC. There isn't a special switch in the command that is allowing you to bypass it. 


Out of curiosity, why the need to silently stop our services? Trying to think of a use case for this situation so if you could advise that'd be appreciated (and I can do some digging on some options you may have). 

 

Thanks, 

Chris 


@Chris Hollis

When it comes to a Linux server, one can employ the sudo command to gracefully stop the Commvault services before initiating a reboot(once OS patching complete).

Regarding Windows servers, my objective is to automate the procedure of gracefully stopping the Commvault services on multiple servers, which could be as many as a hundred, and subsequently rebooting each server after the patching process.



Start-Process -FilePath "cmd.exe" -ArgumentList "/C cd /d C:\Program Files\Commvault\ContentStore\Base\ && GxAdmin.exe -console -stopsvcgrp All"  -PassThru -NoNewWindow

 

After testing the above PS command on a single Windows client, the server's UAC feature was enabled, resulting in a prompt to authorize the execution of the command. Disabling UAC allowed the command to proceed without requiring any manual intervention.

The question at hand is how to automate stop Commvault services on a Windows client via command line without disabling UAC. 

thanks


@Chris Hollis

 

i figured it out and this works fine

 

$computers = get-content “C:\XXX\XXX.txt”

$scriptBlock = {
    Param (
        string]$Command
    )

    Start-Process -FilePath "cmd.exe" -ArgumentList "/C $Command" -NoNewWindow -Wait
}

Invoke-Command -ComputerName $computers -ScriptBlock $scriptBlock -ArgumentList 'cd /d "C:\Program Files\Commvault\ContentStore\Base\" && GxAdmin.exe -console -stopsvcgrp All'


Reply