Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
sturmeyp
Contributor III
Contributor III

QlikNPrinting-CLI (Powershell)

Hi All

I just wondered if anyone is using the QlikNPrinting-CLI module for powershell?

I'm trying to run a simple update user task but it's failing.  I cant find a solution after much googling

------------------------------------------------------------------------------------------------------------------------------
Connect-NPrinting -Computer https://nprinting.corp.ourdomain.com:4993 -TrustAllCerts
(this is working OK)

$Data = @{UserName = "ChangeName"}
$DataJSON = $Data|ConvertTo-Json
Invoke-NPRequest -method Put 'users/2a8db60e-1f01-454e-a4f6-93d026ee70b0' -Data $DataJSON
------------------------------------------------------------------------------------------------------------------------------
(this is failing with 'bad request' response - see below)

Invoke-NPRequest -method Put 'users/2a8db60e-1f01-454e-a4f6-93d026ee70b0' -Data $DataJSON

The remote server returned an error: (400) Bad Request.
WARNING: From: https://nprinting.corp.wheelsandstructures.com:4993/api/v1/users/2a8db60e-1f01-454e-a4f6-93d026ee70b...
Response: Bad Request

any ideas? I think my permissions are OK (Admin role on NPrinting)  - I can run Get queries and other Post methods to envoke publish tasks - but anything with an update fails

Labels (2)
1 Reply
Frank_S
Support
Support

You may or may not have seen this link but I will re-share it here for everyone's convenience.

Recheck the steps specifically in the article below and attempt again.

Also try adding the origin of the Qlik Sense hub or QlikView Access point as an NPrinting Trusted Origin. NP console>Admin>Settings>On Demand>Add Trusted Origin

 

Kind regards...

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