Jump to content
DigitalDentist

Configure Powershell Impersonation remotely

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

 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

  • Similar Content

    • By ethorup
      This script will download the small online installer, generate the silent install cfg file and run the installer.  The timer near the end is set for 3 minutes as it has to download the full installer first and Java takes a while to install anyway.  If you want to get the latest version just go to https://java.com/en/download/win10.jsp and copy the link from the button that says "Agree and start free download".  Then past this link into the $source variable.  I find that this installer works on both windows 7 and windows 10.
       
      # Download and silent install Java Runtime Environement
      # working directory path
      $workd = "c:\temp"
      # Check if work directory exists if not create it
      If (!(Test-Path -Path $workd -PathType Container))

      New-Item -Path $workd  -ItemType directory 
      }
      #create config file for silent install
      $text = '
      INSTALL_SILENT=Enable
      AUTO_UPDATE=Enable
      SPONSORS=Disable
      REMOVEOUTOFDATEJRES=1
      '
      $text | Set-Content "$workd\jreinstall.cfg"
          
      #download executable, this is the small online installer
      $source = "http://javadl.oracle.com/webapps/download/AutoDL?BundleId=230511_2f38c3b165be4555a1fa6e98c45e0808"
      $destination = "$workd\jreInstall.exe"
      $client = New-Object System.Net.WebClient
      $client.DownloadFile($source, $destination)
      #install silently
      Start-Process -FilePath "$workd\jreInstall.exe" -ArgumentList INSTALLCFG="$workd\jreinstall.cfg"
      # Wait 120 Seconds for the installation to finish
      Start-Sleep -s 180
      # Remove the installer
      rm -Force $workd\jre*
    • By Hugo
      How would I get a ticket status to change to "client responded" when a client responds to a "completed" ticket
    • By MattK
      Hi,
      This might be related to this topic, but over the last week I'm seeing notifications for all updates, not just Windows Defender.
      If I delete the notification it comes back again, checking the server shows "26 optional updates are available" (note "optional")
      Pulseway setting: Notifications > Status > "Send a notification when critical or important updates are available with priority" = Automatic
      My notification on my mobile is reading "26 important updates are available..."
      Clicking into the mobile app and checking the Windows Updates it's reporting them as "important" when they aren't.
      For example the server itself lists KB2386667 as recommended but it's listed as important in Pulseway.
       
       
    • By Andy Raybould
      Is it possible to change the date format for Notifications in the Windows 10 app to UK (currently set to US)
    • By Antoine Dumont
      Hi,
      I recently installed Pulseway Dashboard 5.1.2 version on my Windows 10 Pro computer but now I want to logout my account. 
      I don't see any button to do that. 
      Best regards, 
×