DigitalDentist Posted July 6, 2017 Share Posted July 6, 2017 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 More sharing options...
Administrators Paul Posted July 6, 2017 Administrators Share Posted July 6, 2017 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 More sharing options...
DigitalDentist Posted July 6, 2017 Author Share Posted July 6, 2017 Awesome thank you! Link to comment Share on other sites More sharing options...
DigitalDentist Posted July 10, 2017 Author Share Posted July 10, 2017 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 More sharing options...
Administrators Paul Posted July 11, 2017 Administrators Share Posted July 11, 2017 Can I have the full error message? -Paul Link to comment Share on other sites More sharing options...
DigitalDentist Posted July 11, 2017 Author Share Posted July 11, 2017 The account is an account with sufficient rights. Link to comment Share on other sites More sharing options...
Administrators Paul Posted July 11, 2017 Administrators Share Posted July 11, 2017 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 More sharing options...
DigitalDentist Posted July 11, 2017 Author Share Posted July 11, 2017 The account is domain admin on server 2012 R2. Uac disabled. Wmf 5 1 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