Skip to content

davidseibel/intersight-powershell

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intersight - the PowerShell module for the Intersight REST API

This is Intersight REST API

This PowerShell module is automatically generated by the Swagger Codegen project:

  • API version: 0.1.0-559
  • SDK version:
  • Build date: 2018-05-23T15:27:48.771-07:00
  • Build package: io.swagger.codegen.languages.PowerShellClientCodegen

Frameworks supported

  • PowerShell 3.0 or later

Dependencies

  • C# API client generated by Swagger Codegen AND should be located in $ScriptDir\csharp\SwaggerClient as stated in Build.ps1

Installation

Run the following command to generate the DLL

  • [Windows] Build.ps1

Writing code using SDK

  1. Import module from the .\src\intersight folder
Import-Module .\src\intersight\intersight.psd1
  1. Create IntersightApiClient
New-IntersightApiClient $intersightUrl $private_key_path $api_key_id
  • $intersightUrl : URL of Intersight
    • Example : $intersightUrl = "https://intersight.com/api/v1"
  • $private_key_path : Location of .pem file saved for private key from Intersight UI
    • Example : $private_key_path="C:\\Users\\ratkv\\source\\repos\\key.pem"
  • $api_key_id : Api key id value from Intersight UI
    • Example : $api_key_id="5a61b9896736327a31bbebff/5a61b7586736327a31bbeb74/5a7c3054647339736e57b82c"
  1. Sample scripts
  • Script to create a compute blade object
$obj = New-ComputeBlade
  • Script to fetch compute blade object having serial number FCH17487NCJ
$obj = Invoke-ComputeBladeApiComputeBladesGet $false $null $null $null "Serial eq FCH17487NCJ"
  • Script to add BIOS policy
$bios_policy =  New-BiosPolicy  -Name SampleBIOSpolicy
Invoke-BiosPolicyApiBiosPoliciesPost $bios_policy

About

PowerShell modules for Cisco Intersight.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 83.3%
  • PowerShell 16.7%