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

No vnics shown after 9 UCSx blades using get-intersightvnicethif #99

Open
chadmorrison7 opened this issue Jun 15, 2023 · 5 comments
Open

Comments

@chadmorrison7
Copy link

chadmorrison7 commented Jun 15, 2023

Describe the bug
When running Get-IntersightVnicEthIf, I get vnics returned for the first 9 UCSx blades but anything after that comes back blank. The vnics are shown in the Connectivity section of the Server Profile in the GUI with no issues.

To Reproduce
$bladename = "servername"
$server = Get-IntersightServerProfile | Where-Object Name -eq $BladeName
$SPMoid = $server.Moid
$vnics = Get-IntersightVnicEthIf | Where {$_.Profile.ActualInstance.Moid -eq $SPMoid} | Select-Object Name, MacAddress

Version used

  • Intersight PowerShell Module version? 1.0.11.11765
  • Intersight Appliance Version (if using an Intersight Appliance as target) Using Cloud

Expected behavior
Should provide a list of the VNICs witth the Name and MacAddress. It works on 9 blades but anything after 9 it comes back blank even though the vnics can be seen in the GUI for the Server Profile.

Screenshots

Additional context
Add any other context about the problem here.

@chadmorrison7
Copy link
Author

This is still an issue but I found another way to pull the date

@briamorr
Copy link

What's the value of Get-IntersightVnicEthIf -Count $true in your environment? If it's over 100 you'll need to specify a -Top parameter or do something like this to filter results on the Intersight side instead of client side:

$bladename = "IMM-FI-LOAN-Chassis1-Blade1"
$server = Get-IntersightServerProfile -Filter ("Name eq " + "'$bladename'")
$SPMoid = $server.results.Moid
$vnics = Get-IntersightVnicEthIf -Filter ("Profile/Moid eq " + "'$SPMoid'") | Select-Object -Expand Results | Select Name,MacAddress
$vnics

Name  MacAddress
----  ----------
vnicB 00:25:B5:D3:33:36
vnicA 00:25:B5:D3:33:37

``

@chadmorrison7
Copy link
Author

That process shows the vnics for the server that using that my code would not show.

@wgjhstt247
Copy link

Here's another way to get the same information without copying the MoId:

# One Intersight API call
$results = Get-IntersightVnicEthIf -Top 1000 -Select 'Name,MacAddress,Profile' -Expand 'Profile($select=Name)' | Select-Object -ExpandProperty Results
$results | Select-Object @{n='Profile';e={$_.Profile.ActualInstance.Name}},Name,MacAddress

@davidstanaway
Copy link

Here's another way to get the same information without copying the MoId:

# One Intersight API call
$results = Get-IntersightVnicEthIf -Top 1000 -Select 'Name,MacAddress,Profile' -Expand 'Profile($select=Name)' | Select-Object -ExpandProperty Results
$results | Select-Object @{n='Profile';e={$_.Profile.ActualInstance.Name}},Name,MacAddress

THis would be great to put into examples/server . Not at all obvious how to get to the connections data, and this is important for any automated provisioning.

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

4 participants