Jump to content
Updated Privacy Statement
  • 0

Delete Machine Catalog via Powershell


Christopher Schatz

Question

I am writing a script to delete machine Catalogs and delivery groups.

Whenever I send the command Remove-ProvScheme -ProvisioningSchemeName XXX I get an error saying "Unable to remove the provisioning scheme due to associated virtual machines remaining."

 

Everything else is deleted with the other remove commands. The machine catalog is not visable in the GUI any more.

What command am I missing to delete the associated virtual machines?

 

 

EDIT:

 

When i run the command "Get-ProvVM -ProvisioningSchemeUid XXX |Remove-ProvVM" I get a few outputs. The Taskstate is "FinishedWithErrors". Maybe this is the reason?

Where can I see what kind of error is this?

2019-03-12_10-17-15.png

Link to comment

7 answers to this question

Recommended Posts

Yes, and I provided an example of my notes.

 

Remove-AcctADAccount

Remove-AcctIdentityPool

Remove-BrokerDesktopGroup

Remove-BrokerCatalog

 

Unlock-AcctADAccount -ADAccountSid S-1-5-21-4246103433-227228850-1655860863-20840

Get-AcctADAccount -ADAccountSid "S-1-5-21-317694002-3844878815-1658337075-16607" -IdentityPoolName "ITTEST" | Remove-AcctADAccount -force

Get-AcctIdentityPool -IdentityPoolName "ittest" |Remove-AcctIdentityPool

Get-ProvScheme -ProvisioningSchemeName "ITTEST"|Remove-ProvScheme -ForgetVM

 

Link to comment

Get-AcctIdentityPool is there.

Get-AcctADAccountis not there.

 

 

Is there a certain order i need to run the remove commands?

I run the "Remove-ProvScheme" and the "Remove-ProvVM" command after I run:

 

Remove-BrokerDesktopGroup

Remove-BrokerCatalog

Remove-AcctADAccount

Remove-AcctIdentityPool (which did not work, as it seems)

 

Link to comment

so as i understand there should be no need to use "Remove-ProvVM", when I used this order and everything works fine, right?

 

 

Is there a solution how to delete the ProvVms and the ProvScheme?

I created the Machine Catalog again with the same name. But I only see 1 VM.

When I do a Get-ProvVM -ProvisioningSchemeName XXX i see like 10 VMs.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...