Jump to content

Windows 11 AD join, no longer works with the script I made for 10


Jeffrey

Recommended Posts

  • 2 months later...

@Jeffreythis PS1 script works for me:

#####################Written by Darcey S @ FileWave 3/30/2015#########################

#####Please update the below variables for your environment###############################

$user = "shirtfactory.local\adbind"

#I'm passing the password using an Enviornmental Variable.
$password = "$Env:PW"

$domain = "orgName.local"

# $ou = "ou=organizationalUnit,ou=NameGoesHere,dc=shirtfactory,dc=local"

########DON'T MODIFY BELOW THIS LINE##############################################



$pass = ConvertTo-SecureString $password -AsPlainText -Force

$DomainCred = New-Object System.Management.Automation.PSCredential $user, $pass

Add-Computer -DomainName $domain -Credential $DomainCred # -OUPath ($ou)



Remove-Item $MyINvocation.InvocationName

Restart-Computer -Force

 

 

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...