How to Delete Many VDI and Their Accounts by Using PowerShell Command
book
Article ID: CTX286861
calendar_today
Updated On:
Description
This article is designed to describe how to remove a machine from machine catalog as well as hypervisor through PowerShell command.
Instructions
- Run PowerShell in any DDC and load Citrix modules by the following command
asnp Citrix*
- Remove the machine from delivery group by the following command
Get-BrokerMachine -MachineName "domain\vmname" | Remove-BrokerMachine -Desktopgroup "delivery gorup name"
- Unlock the machine by the following command
Get-provvm -ProvisioningSchemeName "provisioningSchemeName" | unlock-provvm
- Delete the machine from hypervisor by the following command
Get-Provvm -vmname "vmname" | Remove-provvm
- Remove the machine from machine catalog by the following command
Get-BrokerMachine "domain\vmname" | Remove-BrokerMachine
- Get the information about AD acount by the following command
Get-AcctADAccount | select IdentityPoolName, ADAccountSid
- Delete AD account of the machine by the following command
Remove-AcctADAccount -ADAccountSid "ADAccountSID is from above step" -IdentityPoolName "Identitypoolname is from above step" -RemovalOption "delete"
feedback
Feedback
check_circle
Feedback submitted!
Was this article helpful?
thumb_up
Yes
thumb_down
No