< Back
Invoke-PANOperation
Post
NAME Invoke-PANOperation
SYNOPSIS
This will run PAN-OS operation commands and retun the result in xml
SYNTAX
Invoke-PANOperation [-Command] <String> [-SkipCertificateCheck] [[-Tag] <String>] [[-Path] <String>] [[-Addresses]
<String[]>] [[-Key] <String>] [<CommonParameters>]
DESCRIPTION
This runs the operation command passed, to find what operation are possible, ssh to firewall and use "debug cli
on" and run command to find the syntax to use.
PARAMETERS
-Command <String>
This is the operation command you want to run
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SkipCertificateCheck [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Tag <String>
This is the shortname to use to reference auth information and addresses
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
Path to the file that has the tag data
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Addresses <String[]>
This is a set of addresses to run the command on, The firewalls must have the same master key for this to work
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Key <String>
This is a key to just use
Required? false
Position? 5
Default value
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
OUTPUTS
NOTES
Author: Steve Borba https://github.com/sjborbajr/PAN-Power
Last Edit: 2019-04-05
Version 1.0 - initial release
Version 1.0.1 - Updating descriptions and formatting
Version 1.0.3 - Remove Direct Credential option
Version 1.0.5 - Add SkipCertificateCheck for pwsh 6+
Version 1.0.6 - added Edit config and commit and cert check skip for 5
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>The example below retrieves the BGP rib table from the edge firewalls
PS C:\\> $BGP_Routes = Invoke-PANOperation -Command
'<show><routing><protocol><bgp><loc-rib/></bgp></protocol></routing></show>' -Tag 'EdgeGroup'
RELATED LINKS
SYNOPSIS
This will run PAN-OS operation commands and retun the result in xml
SYNTAX
Invoke-PANOperation [-Command] <String> [-SkipCertificateCheck] [[-Tag] <String>] [[-Path] <String>] [[-Addresses]
<String[]>] [[-Key] <String>] [<CommonParameters>]
DESCRIPTION
This runs the operation command passed, to find what operation are possible, ssh to firewall and use "debug cli
on" and run command to find the syntax to use.
PARAMETERS
-Command <String>
This is the operation command you want to run
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SkipCertificateCheck [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Tag <String>
This is the shortname to use to reference auth information and addresses
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
Path to the file that has the tag data
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Addresses <String[]>
This is a set of addresses to run the command on, The firewalls must have the same master key for this to work
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Key <String>
This is a key to just use
Required? false
Position? 5
Default value
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
OUTPUTS
NOTES
Author: Steve Borba https://github.com/sjborbajr/PAN-Power
Last Edit: 2019-04-05
Version 1.0 - initial release
Version 1.0.1 - Updating descriptions and formatting
Version 1.0.3 - Remove Direct Credential option
Version 1.0.5 - Add SkipCertificateCheck for pwsh 6+
Version 1.0.6 - added Edit config and commit and cert check skip for 5
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>The example below retrieves the BGP rib table from the edge firewalls
PS C:\\> $BGP_Routes = Invoke-PANOperation -Command
'<show><routing><protocol><bgp><loc-rib/></bgp></protocol></routing></show>' -Tag 'EdgeGroup'
RELATED LINKS