Hello @IT Department
There is no need to use script to Uninstall package or software.
You can Uninstall using GPO editor -> Edit- > Software Settings -> All Tasks, and then click Remove -> Click Immediately uninstall the software from users and computers, and then click OK.
Alternatively you can use below PowerShell script and run it from Server to Uninstall it Remotely.
$computerNames = @("ComputerName1", "rName2", "rName3")
$appName = "AnyDesk"
$yourAccount = Get-Credential
ForEach ($computerName in $computerNames) {
Invoke-Command -ComputerName $computerName -Credential $yourAccount -ScriptBlock {
Get-WmiObject Win32_product | Where {$_.name -eq $appName} | ForEach {
$_.Uninstall()
}
}
}
Hope this answers your question :)
------
--If the reply is helpful, please Upvote and Accept as answer--