Skip to content

Commit

Permalink
Update psf-sensors.ps1
Browse files Browse the repository at this point in the history
Set command line text as optional for `Invoke-TagScript` to ensure it's only sent when a tag and/or token is provided
  • Loading branch information
bk-cs committed Mar 7, 2024
1 parent fc6d81e commit 7188fcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/psf-sensors.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ function Invoke-TagScript {
$Script = Get-Content $ScriptFile -Raw
$Param = @{
Command = 'runscript'
Argument = '-Raw=```{0}``` -CommandLine=```{1}```' -f $Script,$CmdLine
Argument = '-Raw=```{0}```' -f $Script
HostId = $i.device_id
QueueOffline = if ($QueueOffline) { $QueueOffline } else { $false }
}
if ($CmdLine) { $Param.Argument += (' -CommandLine=```{0}```' -f $CmdLine) }
@(Invoke-FalconRtr @Param).foreach{
$Output.tags = if ($_.errors) {
$_.errors
Expand Down

0 comments on commit 7188fcc

Please sign in to comment.