Adding a user to a OU thru PowerShell Gives me an Error why?

Qasim Afzal 101 Reputation points
2022-11-20T18:15:13.457+00:00

I have the path , the object and everything...

Domain is : qafzal.local

am trying to add a user to the the Instructor OU through power shell.

262243-adding-a-user-on-powershell-script-error.jpg262285-ou-path.jpg262263-part2-script-powershell.jpg

Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
393 questions
Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. JimmySalian-2011 42,511 Reputation points
    2022-11-20T18:39:52.173+00:00

    Hi Qasim,

    It seems the OU structure is incorrect in the script, there is a spelling typo "OU=Intructors" instead of "Instructors" in your script. Kindly uppdate the OU or the script to match the structure. Should be good to create the User.

    Hope this helps.
    JS

    ==
    Please Accept the answer if the information helped you. This will help us and others in the community as well.

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.