Get-PaConnectionString
Synopsis
Connects to a Palo Alto firewall and returns an connection string with API key.
Syntax
Get-PaConnectionString [-Address] <String> [-Cred] <PSCredential> [<CommonParameters>]
Description
PARAMETERS
Parameters
-Address <String>
Specifies the IP or FQDN of the system to connect to.
Required | true |
Position | 1 |
Default Value | |
Accept pipeline input | false |
Accept wildcard characters | false |
-Cred <PSCredential>
Specifiy a PSCredential object, If no credential object is specified, the user will be prompted.
Required | true |
Position | 2 |
Default Value | |
Accept pipeline input | false |
Accept wildcard characters | false |
Example 1
C:\PS>Connect-Pa 192.168.1.1
https://192.168.1.1/api/?key=LUFRPT1SanJaQVpiNEg4TnBkNGVpTmRpZTRIamR4OUE9Q2lMTUJGREJXOCs3SjBTbzEyVSt6UT01
c:\PS> $global:PaConnectionArray
ConnectionString ApiKey Address
---------------- ------ -------
https://10.10.42.72/api/?key=... LUFRPT1SanJaQVpiNEg4TnBkNGVpT... 10.10.42.72
Example 2
C:\PS>Connect-Pa -Address 192.168.1.1 -Cred $PSCredential
https://192.168.1.1/api/?key=LUFRPT1SanJaQVpiNEg4TnBkNGVpTmRpZTRIamR4OUE9Q2lMTUJGREJXOCs3SjBTbzEyVSt6UT01