I have a working code to uninstall Java application from a remote server manually.
I would like to automate the task, please can i get help to fix the code.
Working code
Enter-PSSession -ComputerName pwgsascs575000g
$apps = Get-WmiObject -Query “SELECT * FROM Win32_Product Where Vendor LIKE ‘%ORACLE%’ AND Name like ‘%Java%’”
Before we proceed … When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.