Wrong Values from Windows Agent

Hi Marsellus,

First of all, I’d like you thank you for your help in this case, alongside with gulaschcowboy. This is a really urgent matter for me and having some feedback from you guys is awesome!

I’ve tested your script both in the plugins and in the local folder and, although the MS are still different, here are the differences:
Output of the plugin ran with LocalSystem Account Permissions:

==============
REQUEST object
==============


StatusCode        : 200
StatusDescription : OK
Content           : {50, 48, 48, 32...}
RawContent        : HTTP/1.1 200 OK
                    Strict-Transport-Security: max-age=31536000; includeSubDomains; preload; redirectHttpToHttps=true
                    X-FEServer: EXCHANGESERVER
                    Content-Length: 37
                    Date: Mon, 23 Dec 2019 10:08:10 GMT
                    S...
Headers           : {[Strict-Transport-Security, max-age=31536000; includeSubDomains; preload;
                    redirectHttpToHttps=true], [X-FEServer, EXCHANGESERVER], [Content-Length, 37], [Date, Mon, 23 Dec
                    2019 10:08:10 GMT]...}
RawContentLength  : 37

===============
RESPONSE object
===============

Ticks             : 1907668
Days              : 0
Hours             : 0
Milliseconds      : 190
Minutes           : 0
Seconds           : 0
TotalDays         : 2,20794907407407E-06
TotalHours        : 5,29907777777778E-05
TotalMilliseconds : 190,7668
TotalMinutes      : 0,00317944666666667
TotalSeconds      : 0,1907668

Output of the Agent:

<<<local>>>
==============
REQUEST object
==============
===============
RESPONSE object
===============


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 1
Milliseconds      : 145
Ticks             : 11459153
TotalDays         : 1,32629085648148E-05
TotalHours        : 0,000318309805555556
TotalMinutes      : 0,0190985883333333
TotalSeconds      : 1,1459153
TotalMilliseconds : 1145,9153

So, even tho the MS response is still different, the $request variable isn’t being printed in the Agent Output. (Keep in mind that I’m using the Local System Account to run the script directly/test the agent output).

Does this tell us anything?

Thank you very much once again.

Daniel