powershell-module-for-vmware-cloud-foundation
powershell-module-for-vmware-cloud-foundation copied to clipboard
feat: add pscredential and securestring
Summary
Enhanced Request-VCFToken and Connect-CloudBuilder by adding a PSCredential parameter set and adding support for SecureString for the Password parameter.
I've tested the following:
SDDC Manager
Request-VCFToken -Fqdn <fqdn> -UserName [email protected] -Password <plainTextPassword>
Connects using password provided as a string.
$secureString = Read-Host -AsSecureString 'Password'
Request-VCFToken -Fqdn <fqdn> -UserName [email protected] -Password $secureString
Connects using password provided via a SecureString.
Request-VCFToken -Fqdn <fqdn> -UserName [email protected]
Will ask for a SecureString as password.
$credential = Get-Credential
Request-VCFToken -Fqdn <fqdn> -Credential $credential
Will connect using the PSCredential variable.
Request-VCFToken -Fqdn <fqdn>
Will ask for a PSCredential (username/password).
Cloud Builder
Connect-CloudBuilder -Fqdn <fqdn> -UserName admin -Password <plainTextPassword>
Connects using password provided as a string.
$secureString = Read-Host -AsSecureString 'Password'
Connect-CloudBuilder -Fqdn <fqdn> -UserName admin -Password $secureString
Connects using password provided via a SecureString.
Connect-CloudBuilder -Fqdn <fqdn> -UserName admin
Will ask for a SecureString as password.
$credential = Get-Credential
Connect-CloudBuilder -Fqdn <fqdn> -Credential $credential
Will connect using the PSCredential variable.
Connect-CloudBuilder -Fqdn <fqdn>
Will ask for a PSCredential (username/password).
Type
- [ ] Bugfix
- [x] Enhancement or Feature
- [ ] Code Style or Formatting
- [x] Documentation
- [ ] Refactoring
- [ ] Chore
- [ ] Other Please describe:
Breaking Changes?
- [ ] Yes, there are breaking changes.
- [x] No, there are no breaking changes.
Test and Documentation
- [x] Tests have been completed.
- [x] Documentation has been added or updated.
Issue References
A furthering of #116
Additional Information
N/A