Unattendedなアンインストールをしたい場合にどうぞ。
使い方はuninstall.ps1を直接実行するか、uninstall.batと同時に配信してuninstall.batを実行すると数分でアンインストールできます。
uninstall.ps1
$password = "<ここにアンインストールPWを指定>"
$cytoolPath = 'C:\Program Files\Palo Alto Networks\Traps\cytool.exe'
$processStartInfo = New-Object System.Diagnostics.ProcessStartInfo
$processStartInfo.FileName = $cytoolPath
$processStartInfo.Arguments = "protect disable"
$processStartInfo.RedirectStandardInput = $true
$processStartInfo.UseShellExecute = $false
$process = [System.Diagnostics.Process]::Start($processStartInfo)
$process.StandardInput.WriteLine($password)
$process.StandardInput.Close()
$process.WaitForExit()
(Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "*Cortex XDR*"}).Uninstall()
uninstall.bat
cd %~dp0
powershell.exe -ExecutionPolicy Bypass -File uninstall.ps1 -verb runas