< Back
Connect-SVT
Post
NAME Connect-SVT
SYNOPSIS
Obtain an authentication token from a HPE SimpliVity OmniStack Virtual Controller (OVC).
SYNTAX
Connect-SVT [-OVC] <String> [[-Credential] <PSCredential>] [-SignedCert] [<CommonParameters>]
DESCRIPTION
To access the SimpliVity REST API, you need to request an authentication token by issuing a request
using the OAuth authentication method. Once obtained, you can pass the resulting access token via the
HTTP header using an Authorisation Bearer token.
The access token is stored in a global variable accessible to all HPESimpliVity cmdlets in the PowerShell session.
Note that the access token times out after 10 minutes of inactivty. If this happens, simply run this
cmdlet again.
PARAMETERS
-OVC <String>
The Fully Qualified Domain Name (FQDN) or IP address of any OmniStack Virtual Controller. This is the
management
IP address of the OVC.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
User generated credential as System.Management.Automation.PSCredential. Use the Get-Credential PowerShell
cmdlet
to create the credential. This can optionally be imported from a file in cases where you are invoking
non-interactively.
E.g. shutting down the OVC's from a script invoked by UPS software.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SignedCert [<SwitchParameter>]
Requires a trusted cert. By default the cmdlet allows untrusted self-signed SSL certificates with HTTPS
connections and enable TLS 1.2.
NOTE: You don't need this with PowerShell 6.0; it supports TLS1.2 natively and allows certificate bypass
using Invoke-Method -SkipCertificateCheck. This is not implemented here yet.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
OUTPUTS
System.Management.Automation.PSCustomObject
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-SVT -OVC <FQDN or IP Address of OVC>
This will securely prompt you for credentials
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$Cred = Get-Credential -Message 'Enter Credentials'
PS C:\\>Connect-SVT -OVC <FQDN or IP Address of OVC> -Credential $Cred
Create the credential first, then pass it as a parameter.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$CredFile = "$((Get-Location).Path)\\OVCcred.XML"
PS C:\\>Get-Credential -Credential '<username@domain>'| Export-CLIXML $CredFile
Another way is to store the credential in a file (as above), then connect to the OVC using:
PS C:\\> Connect-SVT -OVC <FQDN or IP Address of OVC> -Credential $(Import-CLIXML $CredFile)
or:
PS C:\\>$Cred = Import-CLIXML $CredFile
PS C:\\>Connect-SVT -OVC <FQDN or IP Address of OVC> -Credential $Cred
This method is useful in non-iteractive sessions. Once the file is created, run the Connect-SVT
command to connect and reconnect to the OVC, as required.
RELATED LINKS
SYNOPSIS
Obtain an authentication token from a HPE SimpliVity OmniStack Virtual Controller (OVC).
SYNTAX
Connect-SVT [-OVC] <String> [[-Credential] <PSCredential>] [-SignedCert] [<CommonParameters>]
DESCRIPTION
To access the SimpliVity REST API, you need to request an authentication token by issuing a request
using the OAuth authentication method. Once obtained, you can pass the resulting access token via the
HTTP header using an Authorisation Bearer token.
The access token is stored in a global variable accessible to all HPESimpliVity cmdlets in the PowerShell session.
Note that the access token times out after 10 minutes of inactivty. If this happens, simply run this
cmdlet again.
PARAMETERS
-OVC <String>
The Fully Qualified Domain Name (FQDN) or IP address of any OmniStack Virtual Controller. This is the
management
IP address of the OVC.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
User generated credential as System.Management.Automation.PSCredential. Use the Get-Credential PowerShell
cmdlet
to create the credential. This can optionally be imported from a file in cases where you are invoking
non-interactively.
E.g. shutting down the OVC's from a script invoked by UPS software.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SignedCert [<SwitchParameter>]
Requires a trusted cert. By default the cmdlet allows untrusted self-signed SSL certificates with HTTPS
connections and enable TLS 1.2.
NOTE: You don't need this with PowerShell 6.0; it supports TLS1.2 natively and allows certificate bypass
using Invoke-Method -SkipCertificateCheck. This is not implemented here yet.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
OUTPUTS
System.Management.Automation.PSCustomObject
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-SVT -OVC <FQDN or IP Address of OVC>
This will securely prompt you for credentials
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$Cred = Get-Credential -Message 'Enter Credentials'
PS C:\\>Connect-SVT -OVC <FQDN or IP Address of OVC> -Credential $Cred
Create the credential first, then pass it as a parameter.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$CredFile = "$((Get-Location).Path)\\OVCcred.XML"
PS C:\\>Get-Credential -Credential '<username@domain>'| Export-CLIXML $CredFile
Another way is to store the credential in a file (as above), then connect to the OVC using:
PS C:\\> Connect-SVT -OVC <FQDN or IP Address of OVC> -Credential $(Import-CLIXML $CredFile)
or:
PS C:\\>$Cred = Import-CLIXML $CredFile
PS C:\\>Connect-SVT -OVC <FQDN or IP Address of OVC> -Credential $Cred
This method is useful in non-iteractive sessions. Once the file is created, run the Connect-SVT
command to connect and reconnect to the OVC, as required.
RELATED LINKS