Server decommissioning GUI App

Hi, we sometimes have task to decommission server which in practical terms consists of the following steps:

  • Uninstall SCOM agent.

  • Uninstall MECM client.

  • Remove server from Veeam backup jobs.

  • Un-join server from domain.

  • If server is VM, remove it from vSphere altogether.

How would it be the best to achieve this with GUI tool (SAPIEN PS Studio 2021) - I am not very familiar with PS workflows but know they have many downsides. Is using PS DSC better way of handling these steps? Thank you very much in advance.

Even thought it can be used, DSC is not required here. A small script will do the job.
For the first 4 items, you can have a script running locally or remotely in the VM and for the last step, PowerCLI will help you.

PowerCLI has Invoke-VMScript which can be used to run first 4 steps inside a VM.

PowerCli VMware Developer Documentation

Since server will never be re-used again, can I leave first two steps for last and delete servers directly from SCOM/MECM consoles? This I have to do when colleagues forgot to unistall them locally and they are still in SCOM/MECM consoles? My main goal is to keep SCOM/MECM clean without leftovers of decommissioned servers.

Yes. But how do you remove the VMs from the console ? Manually or by using Automation ?
If using automation, then it would be better to remote into the VM post removing it from the console and remove the agents if exists.

Else create a schedule task to run until the agent is removed for those VMS.

I was thinking of writing configuration file where I would “tell” server in question to uninstall SCOM/MECM agents/clients and then un-join from the domain - I guess this is doable in DSC. Removal from Veeam backup jobs/vSphere altogether are probably not doable with DSC since that must be done on Veeam server/vCenter using Veeam PowerShell module/PowerCLI respectively.

yea. DSC can be used for that.

Can you help me out with that?

Lets discuss it here Server decommissioning using DSC - DSC - PowerShell Forums