Windows-Server-2008-R2
使用powershell取消註冊域控制器的電腦?
據我了解,當您將電腦添加到域時,通過
Computer->Properties->Advanced system settings->System Properties->Computer Name->Network ID
,它會在域控制器中註冊。當您將機器切換回工作組時,它會從域控制器中註銷機器,從而將機器從域中刪除。
有沒有辦法使用 powershell 從域控制器中刪除/取消註冊機器?
是的,有
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>]