据我了解,当您通过 将计算机添加到域时Computer->Properties->Advanced system settings->System Properties->Computer Name->Network ID
,它会在域控制器上注册。
当您将机器切换回工作组时,它会从域控制器中取消注册该机器,并从域中删除该机器。
有没有办法使用 powershell 从域控制器中删除/取消注册机器?
答案1
是的,有Remove-Computer
powershell 命令。
请参阅 technet 了解详细信息:http://technet.microsoft.com/en-us/library/hh849816%28v=wps.620%29.aspx
Parameter Set: Local
Remove-Computer [[-UnjoinDomainCredential] <PSCredential> ] [-Force] [-PassThru] [-Restart] [-Workgroup <String> ] [ <CommonParameters>]
Parameter Set: Remote
Remove-Computer -UnjoinDomainCredential <PSCredential> [-ComputerName <String[]> ] [-Force] [-LocalCredential <PSCredential> ] [-PassThru] [-Restart] [-Workgroup <String> ] [ <CommonParameters>]