"Run" or "Run In Console"

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
davidc
Posts: 5190
Joined: Thu Aug 18, 2011 4:56 am

Re: "Run" or "Run In Console"

Post by davidc » Thu May 17, 2018 1:41 pm

For testing purposes, what happens if you use Invoke-WebRequest instead? Does it also produce the same error?
David
SAPIEN Technologies, Inc.

User avatar
Kilsgaard
Posts: 11
Joined: Fri Feb 10, 2017 3:15 am

Re: "Run" or "Run In Console"

Post by Kilsgaard » Thu May 17, 2018 1:42 pm

Hi David

Thanks, to reproduce you would need a odata source or something like that where you should send ex. a username formated as [domain]\[User] it looks like it is what gives the problem.

I have tried with STA on/off = no changes, still fails with "Run" and "Run in Console"

Powershell V5 64/32bit = no changes, still fails with "Run" and "Run in Console"

PowerShell 2, the Invoke-RestMethod does not exist in PowerShell V2.

Best Regards
/Graves

User avatar
Kilsgaard
Posts: 11
Joined: Fri Feb 10, 2017 3:15 am

Re: "Run" or "Run In Console"

Post by Kilsgaard » Thu May 17, 2018 1:49 pm

With Invoke-WebRequest, it is exactly the same.

have attached two files where one is failing, it has [Domain]\[Username] and one that is not failing, it has a username without a \.
Joust as before :-(

/Graves
Attachments
Invoke-Webrequest - with out backslash gives no error.png
Invoke-Webrequest - with out backslash gives no error.png (22.43 KiB) Viewed 63 times
Invoke-Webrequest - with backslash gives error.png
Invoke-Webrequest - with backslash gives error.png (33.8 KiB) Viewed 63 times