Connect-AlAppliance
SYNOPSIS
Establishes an authenticated connection to a specified App Layering Appliance.
SYNTAX
Connect-AlAppliance [-Address] <String> -Credential <PSCredential> [-IgnoreCertificateErrors] [<CommonParameters>]
<!--NeedCopy-->
DESCRIPTION
The Connect-AlAppliance cmdlet initiates a connection with an App Layering Appliance.
It requires the network address (IP or FQDN) of the appliance and valid user credentials for authentication.
Successfully running this cmdlet typically establishes a session that is used implicitly by subsequent App Layering cmdlets in the current PowerShell session, allowing you to manage the connected appliance.
You can optionally choose to ignore SSL/TLS certificate errors, which might be necessary when connecting to appliances using self-signed certificates or in test environments.
EXAMPLES
Example 1
PS C:\> Connect-AlAppliance -Address '192.168.10.5' -Credential (Get-Credential) -IgnoreCertificateErrors
<!--NeedCopy-->
This example connects to the App Layering Appliance at IP address 192.168.10.5.
It prompts for credentials directly within the command call.
It also includes the -IgnoreCertificateErrors switch, meaning the connection will proceed even if the appliance’s SSL/TLS certificate has validation issues.
Example 2
PS C:\> >$securePassword = ConvertTo-SecureString $env:AL_PASSWORD -AsPlainText -Force
PS C:\> $cred = New-Object System.Management.Automation.PSCredential("Administrator", $securePassword)
PS C:\> Connect-AlAppliance -Address '192.168.10.5' -Credential $cred
<!--NeedCopy-->
This example demonstrates creating credential objects programmatically before making the connection.
First, a plain text password (stored in the AL_PASSWORD environment variable) is converted into a SecureString (using -AsPlainText is generally discouraged in production scripts for security reasons).
Second, a PSCredential object is created using the username Administrator and the SecureString.
Finally, Connect-AlAppliance is called using the appliance’s IP address ‘192.168.10.5’ and the constructed credential object.
Standard certificate validation is performed.
Example 3
PS C:\> Connect-AlAppliance -Address '192.168.10.5' -Credential Administrator -IgnoreCertificateErrors
<!--NeedCopy-->
This example connects to the App Layering Appliance at IP address 192.168.10.5.
The -Credential parameter is provided with the value Administrator, which will generate a Powershell credentials request popup with the User Name field populated with this value. The user will have to provide the password before continuing. It also includes the -IgnoreCertificateErrors switch, meaning the connection will proceed even if the appliance’s SSL/TLS certificate has validation issues.
Example 4
PS C:\> Connect-AlAppliance -Address '192.168.10.5'
<!--NeedCopy-->
This example connects to the App Layering Appliance at IP address 192.168.10.5.
This will generate a Powershell credentials request popup where the user will need to populate the username and password fields before continuing. Standard certificate validation is performed.
PARAMETERS
-Address
Specifies the network address of the App Layering Appliance to connect to. This can be an IP address or a fully qualified domain name (FQDN).
This parameter is mandatory and can be supplied positionally as the first argument (position 0).
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-Credential
Provides the credentials required to authenticate to the App Layering Appliance.
This should be a PSCredential object, which contains the username and password.
A PSCredential object can be created using the Get-Credential cmdlet.
This parameter is mandatory.
If the parameter is not provided a Powershell credentials request popup will appear, requiring the username and password to be provided before continuing.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-IgnoreCertificateErrors
Specifies that SSL/TLS certificate errors encountered during the connection attempt should be ignored. Include this switch parameter if the target appliance uses a self-signed certificate or if you need to bypass certificate validation for other reasons. Use this parameter with caution, especially in production environments, as it bypasses security checks.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: IgnoreCertErrors
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
None
OUTPUTS
[Guid]
Returns a GUID identifying the connection. Subsequent commands can specify this GUID using the -ConnectionId parameter to target this specific connection, otherwise the most recently used connection will be used.
Type: Guid