PowerShell: How To Stop and Start Palo Alto Cortex XDR Traps

$trapsAdminPassword='PASSWORDHERE',
$trapsBin='C:\Program Files\Palo Alto Networks\Traps'

function stopXdr{
	param(
		$trapsAdminPassword,
		$trapsBin='C:\Program Files\Palo Alto Networks\Traps'
	)
	echo $trapsAdminPassword | & "$trapsBin\cytool.exe" runtime stop
}

function startXdr{
	param(
		$trapsAdminPassword,
		$trapsBin='C:\Program Files\Palo Alto Networks\Traps'
	)
	echo $trapsAdminPassword | & "$trapsBin\cytool.exe" runtime start
}

# stopXdr $trapsAdminPassword
# startXdr $trapsAdminPassword

Leave a Reply

Your email address will not be published. Required fields are marked *