PowervRA
PowervRA copied to clipboard
Add support for Simple Content Import/Export
Add a cmdlet to support a simple content import/export similar to the cloud client. This is useful for when you only want to import a single blueprint, property definition, etc...
#Export a blueprint by ID
Export-vRAContentSimple --Id 6d9a107e-def0-4236-9348-30301600dd3d -Path ./CentOS.yaml
#Get a vRA Blueprint by name, and then export
Get-vRABlueprint -Name CentOS | Export-vRAContentSimple -Path .
#Import a Blueprint
Import-vRAContentSimple --ContentType Composite-Blueprint --Path ./CentOS.yaml
I will be working on this
Looking closer at this it appears there is already a Get-vRAContentData which is essentially the same thing as the export just without logic to handle saving it to a file.
Which of these possible solutions would be better:
- Modify the current cmdlet to accept piping and exporting
- Create a specific import/export cmdlet as mentioned in the original post
I'd go for Export-vRAContentData as an extra function, even if it does predominantly the same thing as Get-vRAContentData, but includes the extra step to get it out to a file.
Having the extra Export function makes it easier for users IMO quickly find which function to use just by the name of it.