PowerShell Add-Computer giving Access Denied

Marlon Mingo

I have a lab environment using Server 2016 and Windows 10 VMs. On the windows 10 machine, I’m using the Add-Computer command to join a domain (windurst.net) using the domain administrator account but get access denied. The command I have in PowerShell is

Add-Computer -DomainName "windurst.net" -OUPath "OU=Test,OU=Workstations,OU=Windurst,DC=Windurst,DC=Net"

I can join the domain manually with no issues with the domain administrator account, but it does not work if I’m using the PowerShell command. The OU folder structure is as follows: Windurst > Workstations > Test.

I know this command works on Windows 7, but I haven’t tested it in my lab environment as yet. Going to build a Win 7 machine and post the results. Thanks in advance for any help you can give.

The solution was to run PowerShell as administrator. Running PowerShell as administrator

Active Directory Users and Computers

Aameer

Please try running powershell as admin. Hope it helps :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

powershell GCI access denied

Powershell access Denied

PowerShell Unzip Access Denied

Remote Powershell Access Denied

Add document access denied

icacls is giving access denied on remote file system

.click() giving access denied in IE11

Access denied powershell moving files

remove-computer cmdlet access denied

Computer Browser service cannot start, "Access Denied"

Cloudfront to s3 redirect to subdomain giving Access denied error

Spring Custom Security With MySQL And JPA Giving 403 Access Denied

cURL giving the correct resonse but nodejs fetch redirecting to access denied

Robocopy Access Denied Error 5 From Powershell

Command Prompt: access denied when run PowerShell

PowerShell Access is denied. PSRemotingTransportException + FullyQualifiedErrorId : PSSessionStateBroken

Powershell SendKeys Access Denied When Invoked Remotely

TeamCity Remote Powershell Access Denied Suddenly

PowerShell access denied to cert:\CurrentUser\My

Access Denied installing updates remotely with Powershell

Giving a computer sole access to the Realtime Database through Rules (Pyrebase)

Nuget add packages gives access denied errors

Cordova - cordova platform add android access denied

Visual Studio - Add reference and access denied

How to add QOS to Local Computer Policy with Powershell

Access To the Path is Denied (PowerShell Rename-Item Script)

Working command in a plain Powershell prompt gives Access denied in a PSSession

'Access is denied' while i am running a command in windows powershell

Unable to set certificate friendly name through PowerShell (access is denied)