#加域
ide
Add-Computer
-ComputerName
Server01
-LocalCredential
Server01\Admin01
spa
-DomainName
Domain02
-Credential
Domain02\Admin02
-Restart
-Force
code
#退域
orm
Remove-Computer
-UnjoinDomaincredential
Domain01\Admin01
-Passthru
-Verbose
-Restart
it