How to make an uninstall script for your packaged game

Hello! The IT department at my place of employment has asked me to make an uninstall for our Unreal Engine game. I’ve done a bit of searching, but most of what I have found has been people trying to optimize their PowerShell usage. I have also looked at the uninstall scripts for a few programs on my device, but I have found them somewhat inscrutable due to my inexperience with the programming language they are written in. I was curious if anyone has ever had to write a similar script for their unreal game, and if so how they went about it. Thanks!