[[oktatas:linux:samba|< Samba]]
====== Windows tartományba léptetés ======
* **Szerző:** Sallai András
* Copyright (c) Sallai András, 2019
* [[https://creativecommons.org/licenses/by-sa/4.0/|CC Attribution-Share Alike 4.0 International]]
* Web: http://szit.hu
===== PowerShell =====
==== Beléptetés ====
$domain = "smb01"
$pass = "Titok12345" | ConvertTo-SecureString -asPlainText -Force
$user = "$domain\administrator"
$credential = New-Object System.Management.Automation.PSCredential($user,$pass)
Add-Computer -DomainName $domain -Credential $credential
Aláírás nélküli PowerShell script futtatásának engedélyezése:
Set-ExecutionPolicy RemoteSigned
Futtatás PowerShellben:
.\joinDomain.ps1
cmd-ben:
PowerShell -File joinDomain.ps1
==== Kiléptetés ====
$domain = "smb01"
$pass = "Titok12345" | ConvertTo-SecureString -asPlainText -Force
$user = "$domain\administrator"
$credential = New-Object System.Management.Automation.PSCredential($user,$pass)
Remove-computer -Credential $credential
===== Források =====
* https://superuser.com/questions/603627/powershell-script-to-fully-automate-joining-the-domain (2019)
* https://docs.microsoft.com/hu-hu/powershell/scripting/overview?view=powershell-5.1 (2019)