Varying Property Count when using get-falconhost #90
-
Using psfalcon 2.0.8. Some hosts in my environment don't have values for some of their properties. It appears that the returned object is defined based on the first host returned. Here are successive run of get-falconhost: PS C:> (get-falconhost -Detailed -All -Limit 5000 | gm | where-object{$_.MemberType -eq "NoteProperty"}).count PS C:> (get-falconhost -Detailed -All -Limit 5000 | gm | where-object{$_.MemberType -eq "NoteProperty"}).count PS C:> (get-falconhost -Detailed -All -Limit 5000 | gm | where-object{$_.MemberType -eq "NoteProperty"}).count PS C:> (get-falconhost -Detailed -All -Limit 5000 | gm | where-object{$_.MemberType -eq "NoteProperty"}).count Property Comparison - Properties Missing Limited ResultsPS C:> PS C:> Compare-Object -ReferenceObject $g1.name -DifferenceObject $g2.name InputObject SideIndicator local_ip => Need help to get consistent results... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is not something PSFalcon is doing, it's a combination of how the API works and how you're looking for the properties. The APIs will not return various properties for an object if they're not present. For example, in my testing environment, none of my devices are joined to a domain and the The way you're counting makes it look like properties are missing, too. You need to check the members of each item in the array, not the array itself:
|
Beta Was this translation helpful? Give feedback.
This is not something PSFalcon is doing, it's a combination of how the API works and how you're looking for the properties.
The APIs will not return various properties for an object if they're not present. For example, in my testing environment, none of my devices are joined to a domain and the
machine_domain
,ou
andsite_name
properties do not show up in aGet-FalconHost
result.The way you're counting makes it look like properties are missing, too. You need to check the members of each item in the array, not the array itself: