Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Remote administration is failing

$
0
0

I'm adding clients to a new domain using Powershell. Here are the particulars:

  • Windows 2019 with 2016 Domain level
  • Remote Management is enabled
  • Firewall is disabled
  • Logged in on domain controller as as user in the Domain and Enterprise admin groups
  • Launch PS "As Administrator"
  • Tried the following commands
    Add-Computer -Credential admin -DomainName domain.name -ComputerName 10.11.10.118 -Force
    Add-Computer -Credential admin -DomainName domain.name -ComputerName 10.11.10.118 -LocalCredential LocalAdmin
    Add-Computer -Credential domain.name\admin -DomainName domain.name -ComputerName 10.11.10.118 -LocalCredential LocalAdmin

winrm set winrm/config/client '@{TrustedHosts="10.11.10.118}"}' returns

Client
    NetworkDelayms = 5000
    URLPrefix = wsman
    AllowUnencrypted = false
    Auth
        Basic = true
        Digest = true
        Kerberos = true
        Negotiate = true
        Certificate = true
        CredSSP = false
    DefaultPorts
        HTTP = 5985
        HTTPS = 5986
    TrustedHosts = 10.11.10.118}

I get this error:

Add-Computer : Cannot establish the WMI connection to the computer '10.11.10.118' with the following error message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
At line:1 char:1
+ Add-Computer -Credential admin -DomainName domain.name -Compu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (10.11.10.118:String) [Add-Computer], InvalidOperationException
    + FullyQualifiedErrorId : AddComputerException,Microsoft.PowerShell.Commands.AddComputerCommand

On 10.11.10.118 I see a success audit in the security event log for the admin account associated to the command being run. Isn't this just supposed to work? All of the documentation and support tickets I've read say it should.

Thanks in advance fr assistance.


Viewing all articles
Browse latest Browse all 21975

Trending Articles