is there a way to pass the password to cytool via cmd?

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Please sign in to see details of an important advisory in our Customer Advisories area.

is there a way to pass the password to cytool via cmd?

L1 Bithead

let say I want to run protect disable on 100 computers....  I tried the following but didn't work:


C:\PSTools>psexec -i -d -s \\pc100 cmd /c echo 5Nstall22#| "c:\program files\Palo Alto Networks\Traps\cytool.exe" protect disable

5Nstalll22# is the pass....


thank you!


L1 Bithead



echo 5Nstall22#| "c:\program files\Palo Alto Networks\Traps\cytool.exe" protect disable


this works locally...

Try this:


wmic /node:"COMPUTERNAME" process call create "cmd /c echo 5Nstall22# | 'c:\program files\Palo Alto Networks\Traps\cytool.exe' protect disable"


If that doesn't work, you can try the following bat:


@echo off

echo echo 5Nstall22# ^| "c:\program files\Palo Alto Networks\Traps\cytool.exe" protect disable > c:\tmp\cytool.bat

wmic /node:"COMPUTERNAME" process call create "cmd /c c:\tmp\cytool.bat"


You also have other possibilities by running, one time, remote scheduled tasks. You have options.

thank you!  the results I got was:

Executing (Win32_Process)->Create()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
ProcessId = 5032;
ReturnValue = 0;


yet the query shows its still Enabled...


c:\PSTools>psexec -i -d -s \\9020m-77 cmd /c "c:\program files\Palo Alto Networks\Traps\cytool.exe" protect query
Connecting to 9020m-77...Protection Mode State
Process Enabled Enabled
Registry Enabled Enabled
File Enabled Enabled
Service Enabled Enabled
Starting cmd on on 9020m-77...
cmd started on 9020m-77 with process ID 5044.




Thank you though, you are right, I have other options... I decided to just use the web console to update the agents...  it was more of a challenge and if it did work, I would use it in the future in other cases where its needed.

L0 Member

You have to make sure there is no space between the end of the password and the | otherwise the space is included as part of the password.

L0 Member

You can also use a PowerShell script for that, e.g. for a list of servers, like:

[Parameter(Mandatory = $true)]
Set-Location -Path $PSScriptRoot

# Assuming $Secret:cortexpass is how you're securely storing and accessing the password
# Ensure you have a secure method to access this password in the context of the remote session
$password = $Secret:cortexpass
$cytoolPath = 'C:\Program Files\Palo Alto Networks\Traps\cytool.exe'

$scriptBlock = {
param($password, $cytoolPath)
$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)

foreach ($server in $servers) {
try {
Invoke-Command -ComputerName $server -ScriptBlock $scriptBlock -ArgumentList $password, $cytoolPath
Write-Output "Successfully disabled tamper protection on $server."
} catch {
Write-Output "Failed to disable tamper protection on $server. Error: $_"


  • 5 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!