diff --git a/Active Directory/Join-Domain.ps1 b/Active Directory/Join-Domain.ps1 new file mode 100644 index 0000000..3e00d14 --- /dev/null +++ b/Active Directory/Join-Domain.ps1 @@ -0,0 +1,12 @@ +# Parametres Domaine +$domain = "DOMAIN" + +# Le nom d'utilisateur +$username = "$domain\USERNAME HERE" + +# Le mot de passe de l'utilisateur +$password = "PASSWORD HERE" | ConvertTo-SecureString -asPlainText -Force + +$credential = New-Object System.Management.Automation.PSCredential($username, $password) + +Add-Computer -DomainName $domain -Credential $credential \ No newline at end of file