共用方式為


wdsutil delete-autoadddevices

適用於:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012

從自動新增資料庫刪除擱置中、已拒絕或已核准的電腦。 此資料庫會將這些電腦的相關資訊儲存在伺服器上。

語法

wdsutil /delete-AutoaddDevices [/Server:<Servername>] /Devicetype:{PendingDevices | RejectedDevices |ApprovedDevices}

參數

參數 描述
[/Server:<Servername>] 指定伺服器的名稱。 這可以是 NetBIOS 名稱或完整網域名稱 (FQDN) 任一項。 如果未指定任何伺服器名稱,則會使用本機伺服器。
/Devicetype:{PendingDevices|RejectedDevices|ApprovedDevices} 指定要從資料庫刪除的電腦類型。 此類型可以是 PendingDevices,其會傳回資料庫中狀態為擱置中的所有電腦、RejectedDevices 會傳回資料庫中狀態為已拒絕的所有電腦、或 ApprovedDevices 會傳回資料庫中狀態為已核准的所有電腦。

範例

若要刪除所有已拒絕的電腦,請輸入:

wdsutil /delete-AutoaddDevices /Devicetype:RejectedDevices

若要刪除所有已核准的電腦,請輸入:

wdsutil /verbose /delete-AutoaddDevices /Server:MyWDSServer /Devicetype:ApprovedDevices