Open chadmorrison7 opened 1 year ago
This is still an issue but I found another way to pull the date
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
``
That process shows the vnics for the server that using that my code would not show.
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
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.
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
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.