< Back

Test-PANRule

Sat Jan 18, 2020 6:25 pm

NAME Test-PANRule



SYNOPSIS

This will run the operations passed and retun the result in xml





SYNTAX

Test-PANRule [[-from] <String>] [[-to] <String>] [-source] <String> [-destination] <String> [-protocol] <Int32>

[[-destination_port] <Int32>] [[-application] <String>] [[-source_user] <String>] [[-category] <String>]

[-Show_All] [-SkipCertificateCheck] [[-Tag] <String>] [[-Path] <String>] [[-Addresses] <String[]>] [[-Key]

<String>] [<CommonParameters>]





DESCRIPTION

This runs the command test security-policy-match with the filters provided.





PARAMETERS

-from <String>

Source Zone



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-to <String>

Destination Zone



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-source <String>

Source IP address



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-destination <String>

Destination IP address



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-protocol <Int32>

IP protocol number, tcp = 6, udp = 17, icmp = 1, sctp = 132



Required? true

Position? 5

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-destination_port <Int32>

Destination port for tcp, udp, or sctp



Required? false

Position? 6

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-application <String>

Application that will eventually choosen



Required? false

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



-source_user <String>

Source user if applicable



Required? false

Position? 8

Default value

Accept pipeline input? false

Accept wildcard characters? false



-category <String>

URL Category if applicable



Required? false

Position? 9

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Show_All [<SwitchParameter>]

Flag to show all results



Required? false

Position? named

Default value False

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? 10

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

Path to the file that has the tag data



Required? false

Position? 11

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? 12

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Key <String>

This is a key to just use



Required? false

Position? 13

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 will return all rules that could match a ping packet from the inside to outside



PS C:\\> $result = Test-PANRule -from "Inside" -to "Outside" -source '192.0.2.2' -destination '1.1.1.1' -protocol 1

-category 'any' -Show_All











RELATED LINKS