Jump to content
Philip Landreth

reg query HKEY_CURRENT_USER\Network /s

Recommended Posts

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

Share this post


Link to post
Share on other sites

Hi Philip,

Have you tried to configure the Powershell impersonation?

image.png.cdfaee9afb295efd11f5ba69dc217c89.png

 

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.

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...