Closed brushenas closed 8 months ago
You're saying your command is Get-FalconHost
, but you're calling the API for Get-FalconAsset
. Which one are you trying to use? If it's Get-FalconHost
, can you try reinstalling the module? It should not be calling Discover APIs.
Uninstall-Module -Name PSFalcon -AllVersions
Install-Module -Name PSFalcon -Scope CurrentUser
Import-Module -Name PSFalcon
Is this still an issue? Did the steps above have any impact?
Is this still an issue? Did the steps above have any impact?
Disregard. I ran the Revoke-FalconToken command. The token is no longer failing. The request is processing.
Sorry I was getting the error on 'Get-FalconAsset with the option "-Detailed" without the "-Detailed" option it was working and returning the Object ID but somehow when you want to have the details it fails randomly on some host objects.
I did uninstall and re-installed the PSFalcom module and it seems like it is working now. I am hoping that I don't get this error anymore because my script was working fine until last week and somehow if started erroring out.
Regarding the function 'Get-FalconHost', I was using that along with the 'Get-FalconAsset' to test and compare what was returned and why one is working and the other one is not. Sorry for the confusion.
I ll keep monitoring the script and will update this post if the error re-occurs.
Thank you very much for your feedback and support. Behruz
Here you go again, the problem is coming back. Here is a screenshot of the 'Get-FalconAsset' command one without '-Detailed' parameter and the other one with this parameter.
PS C:\MGM\BT\BT API scripts> $filter hostname:'AL210682'
PS C:\MGM\BT\BT API scripts> Get-FalconAsset -Filter $filter a3b5c66368d547e69420c4a71e7d16dc_ATAjBFm4P6dFz7G1S1z73p_oB7-jvtTfevEVORgIOoVsPg PS C>
PS C> Get-FalconAsset -Filter $filter -Detailed
Invoke-Falcon: C:\Users\XXXXXXXXX\Documents\PowerShell\Modules\PSFalcon\2.2.6\public\discover.ps1:132:7
Line |
132 | Invoke-Falcon @Param -UserInput $PSBoundParameters
| ~~~~~~~~~~
| Cannot validate argument on parameter 'Id'. The argument
| "a3b5c66368d547e69420c4a71e7d16dc_ATAjBFm4P6dFz7G1S1z73poB7-jvtTfevEVORgIOoVsPg" does not match the "^[a-fA-F0-9]{32}\w+$"
| pattern. Supply an argument that matches "^[a-fA-F0-9]{32}_\w+$" and try the command again.
PS C:>
Describe the bug When I run the following command , it errors out on some hostnames. not on all hostnames but some. for others it returns the result.
Here is the Error I am getting:
To Reproduce Just run the command
Get-FalconHost
on different host namesExpected behavior Should not error out. either return some objects or none.
Environment (please complete the following information):
Transcript content