Closed amd-arcpatel closed 9 months ago
I suspect this is due to the default timeout value of 600 seconds during the creation of the RTR session. This is also the default length of a session, and if it waits 600 seconds to the devices to respond to the initialization request, the session dies before it's able to return the result.
For the 2.2.6 release, I modified the Invoke-FalconRtr
function to use a 30 second timeout during the initialization request, and it seems to have fixed this. Can you try modifying your local copy of $HOME\Documents\WindowsPowerShell\Modules\PSFalcon\2.2.5\public\psf-real-time-response.ps1
and modify this line from...
$Init = @{ Id = $Output.aid; Timeout = $Timeout; QueueOffline = $QueueOffline }
to...
$Init = @{ Id = $Output.aid; Timeout = 30; QueueOffline = $QueueOffline }
...and let me know if that resolves the issue for you? When you re-test, you will need to close and re-open PowerShell and re-import the module.
Spot on.. That fixed the issue!! Will thank you in person next week :)
This issue will be fixed in the 2.2.6 release. If any other users would like to apply the fix to their local version, run this command:
(Invoke-WebRequest https://raw.githubusercontent.com/CrowdStrike/psfalcon/a8defcca7aedb52caeb198c4600430ecf10d0f58/public/psf-real-time-response.ps1).Content > $HOME\WindowsPowerShell\Modules\PSFalcon\2.2.5\public\psf-real-time-response.ps1
Resolved in 2.2.6 release which has been published to GitHub and will be published on the PowerShell Gallery soon.
Describe the bug Using Invoke-FalconRtr command to run a powershell script on 200 hosts. When run the script on 3 hosts, it executes successfully, but when using larger number of hosts, there is no result. The RTR audit log shows an open session for each host with no action performed.
To Reproduce With 200+ hostids in $hosts, run the command:
Invoke-FalconRtr -Command runscript -Argument "-CloudFile='NacTest.ps1'" -HostId $hosts -QueueOffline $true
Expected behavior Upon successful execution, Powershell prompt displays metadata and RTR audit logs show the commands used.
Environment (please complete the following information):
Additional context I tested running this exact script with 3 hostids in $hosts and the execution was successful.
Transcript content