Posted in : Citrix, Powershell Av Stina Perbo Utas Översätt med Google ⟶

5 years ago

While working with the Citrix Cloud monitor service is amazing, it is also quite unpredictable and we often experience bugs without any notice.

The latest one is related to paging, where the nextLink is presented as http instead of https, which breaks recursive searches. Now this is not the hardest one to fix, but the message can throw you off a bit.

The error states ”Authroization or Customer header is unavailable.” (before you ask, yes the error message is misspelled). And when built into a recursive function It’s not the easiest to spot.

Invoke-WebRequest : Access denied to query Monitor objects : Authorization or Customer header is unavailable.
At line:1 char:1
+ Invoke-WebRequest -Uri 'http://{customerId}.xendesktop.net/Citrix/Mon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

The solution is simple, just replace http:// with https:// and everything will start working again.

Personlig rådgivning

Vi erbjuder personlig rådgivning med författaren för 1400 SEK per timme. Anmäl ditt intresse i här så återkommer vi så snart vi kan.

Add comment

Your comment will be revised by the site if needed.