You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhancement: add -Credential support to Connect-ZertoZVM, Get-ZertoAuthToken #6
To allow for some non-interactive (or less interactive) connection to a Zerto ZVM, it would be useful to have the -Credential parameter on the Connect-ZertoZVM (and, subsequently, the Get-ZertoAuthToken) cmdlets.
Then, a consumer could, say, import some encrypted creds into a PSCredential object, pass them as the value to -Credential, and not need to enter the creds at every Connect operation.
Activity
gregklee commentedon Apr 30, 2018
I updated the functions to allow passing credentials. Here's the code:
Function newGet-ZertoAuthToken {
[CmdletBinding()]
param(
[Parameter(Mandatory=$false, HelpMessage = 'Zerto Server or ENV:\ZertoServer')] [string] $ZertoServer = ( Get-EnvZertoServer ) ,
[Parameter(Mandatory=$false, HelpMessage = 'Zerto Server URL Port')] [string] $ZertoPort = ( Get-EnvZertoPort ),
[Parameter( HelpMessage = 'Credentials to connect to Zerto')] $ZertoCredentials
)
Function newConnect-ZertoZVM {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, HelpMessage = 'Zerto Server or ENV:\ZertoServer')] [string] $ZertoServer ,
[Parameter(Mandatory=$false, HelpMessage = 'Zerto Server URL Port')] [string] $ZertoPort = 9669 ,
[Parameter(Mandatory=$false, HelpMessage = 'Credentials to connect to Zerto')] $ZertoCredentials
)
}