Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I want to write the backup nprinting command in the powershell automation script. I need to use the Invoke-Command command. How should I implement it? Here is the command to install NPrinting using Invoke-Command:
Invoke-Command -ScriptBlock {Start-Process -FilePath "C:\QlikNPrintingServer_x64.exe" -Verb RunAs -ArgumentList "/install /passive accept-eula=1 admin-username=$user admin-password=12345678 admin-email=npadmin@email.com service-username=$hostname\$user service-password=$qPwd database-password=12345678 /log C:\server.log" -Wait -PassThru}
Thanks!!
I dont know anything about "Invoke-Commands" so I can only relate to batch scripts currently available and working and supported...
All I know is that NPrinting backup needs to run command:
Hi,
The following PowerShell script worked in my installation:
$remoteComputerName = "ServerName"
$backupCommand = {
# Change directory to the NPrinting Manager folder
cd "C:\Program Files\NPrintingServer\Tools\Manager\"
# Execute the backup command
.\Qlik.Nprinting.Manager.exe backup -f C:\NPrintingBackups\NP_Backup.zip
}
Invoke-Command -ComputerName $remoteComputerName -ScriptBlock {
param($backupCommand)
Invoke-Expression $backupCommand
} -ArgumentList $backupCommand
I supply this code as an example without any warranty it will work in your server. I suggest to create a Qlik NPrinting backup and stere it in a safe place before testing the script.
Best Regards,
Ruggero
I dont know anything about "Invoke-Commands" so I can only relate to batch scripts currently available and working and supported...
All I know is that NPrinting backup needs to run command:
Hi @Gin009
First you do not need a password for current supported versions of NPrinting.
Also I recommend that you use the available default supported backup scripting.
For this and other backup and restore information see:
How to BackUp and Restore Qlik NPrinting Repositor... - Qlik Community - 1715863
Kind regards...
Hi,
The following PowerShell script worked in my installation:
$remoteComputerName = "ServerName"
$backupCommand = {
# Change directory to the NPrinting Manager folder
cd "C:\Program Files\NPrintingServer\Tools\Manager\"
# Execute the backup command
.\Qlik.Nprinting.Manager.exe backup -f C:\NPrintingBackups\NP_Backup.zip
}
Invoke-Command -ComputerName $remoteComputerName -ScriptBlock {
param($backupCommand)
Invoke-Expression $backupCommand
} -ArgumentList $backupCommand
I supply this code as an example without any warranty it will work in your server. I suggest to create a Qlik NPrinting backup and stere it in a safe place before testing the script.
Best Regards,
Ruggero
Hi @Frank_S
Thanks for your support, a solution has been found
Thanks for your support, a solution has been found