發佈日期:
如何利用PowerShell指令‧退出域名及重新加入域名(Re-join domain)
# Repair computer secure channel Test-ComputerSecureChannel -Repair -Credential (Get-Credential) -Verbose # Script to unjoin and rejoin domain $computer = Get-WmiObject Win32_ComputerSystem $computer.UnjoinDomainOrWorkGroup("admin_password", "admin_login", 0) $computer.JoinDomainOrWorkGroup("domain_name", "admin_password", "admin_login", $null, 3) Restart-Computer -Force
發佈留言