If you find a ton of boxes running vulnerable software that is no longer used you can use WMI/CIM. What’s the difference? WMI uses TCP ports 135/445/49152-65535 while CIM uses 5985/5986. CIM is slightly faster, but either way works.
WMI way. We are going to search a remote computer named Test for the FortiClient software. We will store this in the $software variable. We will then use the Uninstall() to complete the process
$software=Get-WmiObject -ComputerName Test -Namespace root\cimv2 -Class win32_product | ? name -like *forticlient*; $software.Uninstall()
CIM way. We are going to search a remote computer named Test for the FortiClient software. We will store this in the $software variable. We will then use invoke-cimmethod to complete the process
$software=Get-CimInstance -ComputerName Test -ClassName win32_product | ? name -like *forticlient*; $software | Invoke-CimMethod -MethodName uninstall