From 838d42c7311baf993867bd22a745260325aede06 Mon Sep 17 00:00:00 2001 From: Hubert Cornet Date: Wed, 6 Aug 2025 10:14:55 +0200 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"Active=20Directory"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Active Directory/Join-Domain.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Active Directory/Join-Domain.ps1 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