When I run this script from the SMA (either as the System user or the logged-on user) as on "Online Kscript", the log shows empty results. But I can open a Command Prompt window on the target computer (elevated or not), open Powershell, cd into the appropriate kbot directory, and run the script there and get two items (as expected). Here's part of my Kscript:

Any clues?

Thanks!

--

Kent

UPDATE:

After posting the above, I did some additional testing, which was enlightening.

I created an Online Shell Script (instead of an Online Kscript), and then called the Powershell script with this line:

Finally, I'm getting some output. But there is no "Sophos" items in the output, which is crazy, 'cause I know they're in there. So I tried running the Powershell script again directly from the Command Prompt, and got a completely different set of responses, including Sophos-related items.

This triggered a vague memory of mine where I've run into something similar to this, something about Windows changing the paths or executables or something, under the hood, and hidden from the user, when running certain types of apps (32-bit vs 64, maybe?; related to "SysWow" maybe?).

I think Nick the Ninja is hammering real close to the nail when he mentions the 32-bit client issue.

All Answers

if you run this from the cli you are using your local credentials (local admin I assume?)if you run it from KACE it is run as SYSTEM.Also the agent is 32Bit, so some additional issues may occur.You can setup the scrip to run as "special user" to fix it.

Share

This website uses cookies.
By continuing to use this site and/or clicking the "Accept" button you are providing consent
Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our
websites or when you do business with us. For more information about our
Privacy Policy and our data protection
efforts, please visit
GDPR-HQ