PowervRA
PowervRA copied to clipboard
Feature: vRA Connection Profiles
@jonathanmedd Here's the first draft for connection profiles.
https://github.com/jakkulabs/PowervRA/tree/feature-profiles
Would be cool if you could review in the new year.
Examples:
# --- Create a profile
New-vRAConnectionProfile -Name "dev-lab" -Tenant "tenant01" -Server "server.vra.local" -Username "user01" -IgnoreCertRequirements -SslProtocol
# --- Retrieve a Profile
Get-vRAConnectionProfile -Name "dev-lab"
# --- Update a Profile
Set-vRAConnectionProfile -Name "dev-lab" -Tenant "Tenant02"
# --- Connect to vRA
Connect-vRAServer -ProfileName "dev-lab"
# --- Remove a Profile
Remove-vRAConnectionProfile -Name "dev-lab"
Notes
- Profiles do not store your password. You will be prompted to enter it when using
Connect-vRAServer
- Get-vRAConnectionProfile's Name param & Connect-vRAServer's ProfileName param use dynamic parameters and support tab completion
- Tested on Core & Windows
Running locally
Run the following to use locally:
.\tools\build.ps1
Remove-Module -Name PowervRA -Force
Import-Module .\Release\PowervRA\PowervRA.psd1 -Force
@chelnak Very nice - I like it a lot!
A couple of things:
- Is it possible to give it Credential object support for Connect-vRAServer ? - maybe be able to supply the name of a Credential variable to use (of course this would have to be made in the PS session before it could be used via the profile.)
- There was a minor typo in a comment in Connect-vRAServer line 117 - I've corrected it for you