Edward Crist
asked on
OUPath error in joining a domain
I'm trying a simple PS script that keeps throwing an error using -OUPath
It's saying 'cannot find the file specified'
If I remove the OUPath segment, it work great, just puts the computer in the default 'computer' OU
I can't find the answer to this.
Thanks
It's saying 'cannot find the file specified'
Add-Computer -DomainName "mydomain.lan" -OUPath "OU=2021,DC=mydomain,DC=lan"
If I remove the OUPath segment, it work great, just puts the computer in the default 'computer' OU
I can't find the answer to this.
Thanks
ASKER
Thanks, but no dice. Still says cannot find the file specified
Hi try the following
new-adcomputer -name 'test-pc01' -path "OU=2021,DC=mydomain,DC=lan"
Add-Computer -DomainName "mydomain.lan"
ASKER
Joe
It says 'new-adcomputer' is not a command in PS (I'm a scripting novice, myself)
It says 'new-adcomputer' is not a command in PS (I'm a scripting novice, myself)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How many different OUs will there be?
If one you can just change default computer CN to an OU
If one you can just change default computer CN to an OU
redircmp "OU=2021,DC=mydomain,DC=lan"
ASKER
Copied the path from AD and it worked. Thanks!
Open in new window