cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
624
Views
0
Helpful
1
Replies

Pull server contract info from Intersight

jskizel12
Level 1
Level 1

I am looking to pull information for all of my servers in Intersight.  I can pull the normal info with the "export" option at the top but I am wanting to know if we can pull the specific contract name, start date, end date, renewal date automatically and maybe put that into a .csv file. I am not sure if this would be an API call or not.

1 Accepted Solution

Accepted Solutions

Brian Morrissey
Cisco Employee
Cisco Employee

I haven't seen contract name or renewal dates but you can definitely get start and end dates with the Intersight Powershell SDK (https://community.cisco.com/t5/data-center-and-cloud-blogs/getting-started-with-the-intersight-powershell-sdk/ba-p/4823398)

You could try something like this to start with and add/remove fields as you see fit:

$devices = Get-IntersightAssetDeviceContractInformation -Top 1000

foreach($device in $devices.Results)
{
Write-Host $device.DeviceId $device.Product.Number $device.ContractStatus
Write-Host $device.Contract.ContractNumber $device.ServiceLevel $device.ServiceStartDate $device.ServiceEndDate
Write-Host $device.WarrantyType $device.WarrantyEndDate
Write-Host $device.LastDateOfSupport $device.LastDateOfSupport
Write-Host `n`n`n
}

This would return output like the following for each device:

FDOXYZXYZ HX-FI-6332-16UP Active
12345678 SNT 11/9/2022 12:00:00 AM 11/9/2025 12:00:00 AM
WARR-3YR-HW-90D-SW 11/05/2022 00:00:00
12/31/2028 12:00:00 AM 12/31/2028 12:00:00 AM

The mobrowser is also useful for browsing what data is available from the API:

https://intersight.com/mobrowser/list/asset/DeviceContractInformation/

View solution in original post

1 Reply 1

Brian Morrissey
Cisco Employee
Cisco Employee

I haven't seen contract name or renewal dates but you can definitely get start and end dates with the Intersight Powershell SDK (https://community.cisco.com/t5/data-center-and-cloud-blogs/getting-started-with-the-intersight-powershell-sdk/ba-p/4823398)

You could try something like this to start with and add/remove fields as you see fit:

$devices = Get-IntersightAssetDeviceContractInformation -Top 1000

foreach($device in $devices.Results)
{
Write-Host $device.DeviceId $device.Product.Number $device.ContractStatus
Write-Host $device.Contract.ContractNumber $device.ServiceLevel $device.ServiceStartDate $device.ServiceEndDate
Write-Host $device.WarrantyType $device.WarrantyEndDate
Write-Host $device.LastDateOfSupport $device.LastDateOfSupport
Write-Host `n`n`n
}

This would return output like the following for each device:

FDOXYZXYZ HX-FI-6332-16UP Active
12345678 SNT 11/9/2022 12:00:00 AM 11/9/2025 12:00:00 AM
WARR-3YR-HW-90D-SW 11/05/2022 00:00:00
12/31/2028 12:00:00 AM 12/31/2028 12:00:00 AM

The mobrowser is also useful for browsing what data is available from the API:

https://intersight.com/mobrowser/list/asset/DeviceContractInformation/

Review Cisco Networking for a $25 gift card