Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Element Query does not populate certain elements #24

Open
jjordash opened this issue Apr 21, 2023 · 1 comment
Open

Network Element Query does not populate certain elements #24

jjordash opened this issue Apr 21, 2023 · 1 comment

Comments

@jjordash
Copy link

When using the Get-IntersightNetworkElement cmdlet to filter out all Fabric Interconnects, it appears that the filter only displays 2nd, 3rd, and 4th generation systems. 5th generation Fabric Interconnects are excluded from the filter, but they can be queried directly using the -Name parameter or -moid and will be displayed. Additionally, the bug in the filter seems to not include systems in "intersight managed mode," and primarily displays systems in UCSM mode in Intersight.

Here is a code snippet of the output from running the Get-IntersightNetworkElement cmdlet with the aforementioned filter:

Get-IntersightNetworkElement | Group-Object Model | Select-Object >> @{Name='Model';Expression={$_.Name}},

@{Name='Count';Expression={$_.Count}}

The output displays the number of Fabric Interconnects for each model:

UCS-FI-6248UP - 2
UCS-FI-6296UP - 2
UCS-FI-6332-16UP - 52
UCS-FI-6454 - 44

It is important to note that no 5th generation Fabric Interconnects are displayed in this output.

@briamorr
Copy link
Contributor

briamorr commented May 19, 2023

Have you tried adding -Top 1000? By default the API will only return 100 records (which seems to be the count of your example's total).

Get-IntersightNetworkElement -Top 1000 | Select-Object -Expand Results | Group-Object Model | Select-Object @{Name='Model';Expression={$_.Name}},@{Name='Count';Expression={$_.Count}}

Model Count
N9K-C93180YC-FX 2
UCS-FI-6332-16UP 2
UCS-FI-6454 2

If there are more than 1000 objects you'll need to implement pagination or tighten up the filters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants