ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Error This Operation is only allowed for the Primary Domain Controller of the domain with Add-Computer

    Scheduled Pinned Locked Moved Solved IT Discussion
    powershelladd-computeractive directory
    2 Posts 1 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      When using Add-Computer in PowerShell to join to a domain, I am getting this error:

      This Operation is only allowed for the Primary Domain Controller of the domain

      But I can't see why.

      Add-Computer -DomainName "mydomain"
      
      1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        Turns out that it needed the -Credential flag, which Microsoft doesn't document as a requirement. This worked find...

        Add-Computer -DomainName "mydomain" -Credential mydomain\myusername
        
        1 Reply Last reply Reply Quote 2
        • 1 / 1
        • First post
          Last post