Posted July 11, 20186 yr 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
July 12, 20186 yr Staff 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.
May 14, 20195 yr Staff @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
Create an account or sign in to comment