Philip Landreth Posted July 11, 2018 Share Posted July 11, 2018 So this simple script works on any computer. reg query HKEY_CURRENT_USER\Network /s I am testing out Pulseway right now and trying to see what its limits are for scripting. It seems Pulsway executes Batches and Powershell as a system account and not the local logged in user. I can understand batch files to add mapped drives not working but this query should not be affected by that same issue. It shows me all the mapped drives for the logged in user. What I do not understand is why Running this in Pulseway it returns this; ERROR: The system was unable to find the specified registry key or value. 0 Exit Code Link to comment Share on other sites More sharing options...
Staff Chris Posted July 12, 2018 Staff Share Posted July 12, 2018 Hi Philip, Have you tried to configure the Powershell impersonation? If you want to execute the PS script as the system, then you will need to disable this configuration from the code by setting the value for this registry key to 0: HKEY_LOCAL_MACHINE\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonation I hope this helps. Link to comment Share on other sites More sharing options...
Philip Landreth Posted July 20, 2018 Author Share Posted July 20, 2018 That seems to have fixed it, I knew I was missing something! Thanks! Link to comment Share on other sites More sharing options...
Tyson Posted April 19, 2019 Share Posted April 19, 2019 @Philip Landreth Would you mind posting the script you're using for this? Thanks! Link to comment Share on other sites More sharing options...
Staff Chris Posted May 14, 2019 Staff Share Posted May 14, 2019 @Tyson, In order to update the details for the PS impersonation you will need to use the batch script. At first we need to configure the Powershel impersonation on one of monitored systems and the copy the required values from the registry. REG ADD "HKLM\Software\MMSOFT Design\PC Monitor" /v PowerShellUserImpersonation /t REG_SZ /d value_here /f REG ADD "HKLM\Software\MMSOFT Design\PC Monitor" /v PowerShellUserImpersonationDomain /t REG_SZ /d value_here /f REG ADD "HKLM\Software\MMSOFT Design\PC Monitor" /v PowerShellUserImpersonationPassword /t REG_SZ /d value_here /f REG ADD "HKLM\Software\MMSOFT Design\PC Monitor" /v PowerShellUserImpersonationPasswordCtrl /t REG_SZ /d value_here /f REG ADD "HKLM\Software\MMSOFT Design\PC Monitor" /v PowerShellUserImpersonationUsername /t REG_SZ /d value_here /f Or simply use this command to enable or disable it by changing the value from 1- enabled to 0 - disabled REG ADD "HKLM\Software\MMSOFT Design\PC Monitor" /v PowerShellUserImpersonation /t REG_SZ /d o /f Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now