Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Sindhu92
Contributor
Contributor

How to stop qliksense services using powershell script or batchscript ?

Hi, 

We have a requirement to automate the Production backup on daily basis. we have tried this using PowerShell, we are able to take the backup of Qliksense log files, config files, but not QRS.  We are not able to stop the Qlik sense services to perform the QSR backup. Following code  being used to stop the services . But no luck . This is in central node so if some can help with correct script that would be great . 

 Suffix the Stop-Service command with "-WarningAction SilentlyContinue" to suppress warning messages when a service takes long to stop
    # Removing "-Verbose" will also reduce the amount of logging done.
    Get-Service -ComputerName $server -Name QlikSenseProxyService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseEngineService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseSchedulerService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSensePrintingService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseServiceDispatcher | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseRepositoryService | Stop-Service -Verbose
    # Enable/disable as needed depending on whether log db is still in use or not
    # Get-Service -ComputerName $server -Name QlikLoggingService | Stop-Service -Verbose

  

 

Thanks 

Sindhu 

Labels (1)
2 Replies
Frank_S
Support
Support

You may wish to use a simple batch command as follows:
However you may wish to add the /y parameter to answer yes to the other services that this will stop

 

net stop "QlikSenseRepositoryService" /y

 


Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Sindhu92
Contributor
Contributor
Author

Hi Frank,

Thanks for your reply .. I got following error upon execution. could you please advise further. 

 

 

Sindhu92_0-1656452263917.png

Thanks

Sindhu