Simple worklet to remove all java versions and write back in activity log. Worklet is maintained on our github page: https://github.com/Dutch-Technology-eXperts/Automox/blob/main/remove_java.ps1
Evaluation code:
1 line
Exit 1Remediation code:
powershell9 lines
IF (gwmi Win32_Product -filter "name like 'Java%'")
{
[void](gwmi Win32_Product -filter "name like 'Java%'" | % { $_.Uninstall() })
if ($? -eq "True")
{ Write-Output "Java succesfully removed." }
else {Write-Output "Failed to remove Java!" }
}
ELSE {Write-Output "Java not installed."}This discussion is archived and closed to replies. Continue it in the Automox Community Slack.
Discuss on Slack