Jump to content

Configure Powershell Impersonation remotely


DigitalDentist

Recommended Posts

Is there anyway to configure powershell impersonation remotely? I am trying to run a few different powershell scripts and I'm getting access denied. I assume BC it's running as system. Is there a way around this ? Or a way to configure this option remotely?

This is the script I'm trying to run. It runs fine under my account.

Import-Module ActiveDirectory
Get-ADComputer -Filter {OperatingSystem -Like "Windows 7*"} | foreach {restart-computer $_.name -force}

 

Thanks in advance

 

 

Link to comment
Share on other sites

  • Administrators

Copy the encrypted values from the registry from a configured system and set them via an automation script.

HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonation
HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonationDomain
HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonationPassword
HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonationPasswordCtrl
HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonationUsername

-Paul

Link to comment
Share on other sites

On 7/6/2017 at 3:05 AM, Paul said:

Copy the encrypted values from the registry from a configured system and set them via an automation script.


HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonation
HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonationDomain
HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonationPassword
HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonationPasswordCtrl
HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\PowerShellUserImpersonationUsername

-Paul

Ok so I do this, then the window update script fails with an error can't call a null expression...the reboot script works however. Is there a way to have both work?

Link to comment
Share on other sites

  • Administrators

Apparently it doesn't... Try using the built-in administrator account. With Windows 10 "Administrator" accounts don't have the same access level as the built-in administrator account.

-Paul

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...