CiscoDevNet / intersight-powershell

Cisco Intersight PowerShell
Apache License 2.0
16 stars 4 forks source link

Does New-IntersightServerProfile support deriving from a template? #144

Closed odmattw closed 3 months ago

odmattw commented 6 months ago

I'm just getting started with this and I figured there would be a way to specify a template when generating server profiles. Does anyone know if that is supported?

briamorr commented 6 months ago

Are you looking to derive a new profile from a server profile template? If so something like this should work


$source = Get-IntersightServerProfileTemplate -Name "IMM-template"

$orgRef = Get-IntersightOrganizationOrganization -Name default

$targetProfile = Initialize-IntersightServerProfile -Name IMM-profile1 -Description "derived from template" -Organization (Get-IntersightMoMoRef -ManagedObject ($orgRef))

New-IntersightBulkMoCloner -Sources $source -Targets $targetProfile
odmattw commented 6 months ago

Thanks. I found an example where they did something similar and I got it working. I just assumed when I was browsing the available cmdlets that this one would support deriving from a template.