Hi guys,

I have been banging my head against a wall all day trying to get a powershell script to run successfully against a remote server using KACE. The powershell script is supposed to change the permissions for some registry keys to be "full control" for the Administrators group. Whenever I run it manually locally on the server it works fine. If I run it using KACE  the logs say it completes successfully but then I logon to the server and no changes have been made.

In KACE i am running an Online KScript as a domain admin where "On Success" I "run a batch file" with 2 dependencies and the following command:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command C:\ProgramData\Dell\Kace\kbots_cache\packages\kbots\59\2008RegPermissionsChanges.ps1


And the logs say it completed

However, I log into the server and the registry keys have not changed. What am I missing?

1 Comment   [ + ] Show Comment


  • I agree you may have 3 things happening:

    1.) powershell execution policy ("restricted" by default)
    2.) windows redirection (running 32-bit commands in a 64-bit OS, the classic conundrum with KACE agent on x64 OSs)
    3.) user rights (by default, powershell is invoked and executed as the user and some actions may require elevated privilege)

    What OS? If Windows 7 x64 and running these commands within the 32-bit KACE agent, you'll need to invoke Powershell via SYSNATIVE (note: other suggested parameters shown here):

    c:\windows\sysnative\WindowsPowerShell\v1.0\powershell.exe -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file "scriptname.ps1"
Please log in to comment


Have you tried using the parameter "-executionpolicy unrestricted"?  Some environments restrict powershell scripts.

Also, by default, kscripts run as localsystem.  If the change needs administrator, you would need to use the "run as" feature.
Answered 08/28/2015 by: jknox
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity