View on GitHub

Palo Alto powershell

Download this project as a .zip file Download this project as a tar.gz file

Find-PaAddressObject

Synopsis

Search Address Objects and Address Groups for a given IP, FQDN, or string.

Syntax

Find-PaAddressObject [-SearchString] <String> [-PaConnection <String>] [-Update] [<CommonParameters>]

Description

Returns objects from Palo Alto firewall. If no objectname is specfied, all objects of the specified type are returned.

Parameters

-SearchString <String>

Specificies the Palo Alto connection string with address and apikey.

Requiredtrue
Position1
Default Value
Accept pipeline inputfalse
Accept wildcard charactersfalse

-PaConnection <String>

Required? false

Requiredfalse
Positionnamed
Default ValueFalse
Accept pipeline inputfalse
Accept wildcard charactersfalse

Example 1

PS C:\Users\user>Find-PaAddressObject server-triton | ft -AutoSize
    
    
    Groups Addresses                                                     
    ------ ---------                                                     
    {}     {@{Name=server-triton; Value=10.10.64.10/32; Type=ip-netmask}}
    
    if the global variables global:address and global:addressgroups exist, the search is performed locally.  If they do not exist and update will be performed.

Example 2

PS C:\Users\user>Find-PaAddressObject server-triton -update | ft -AutoSize
    
    
    updating addresses
    
    Groups Addresses                                                     
    ------ ---------                                                     
    {}     {@{Name=server-triton; Value=10.10.64.10/32; Type=ip-netmask}}
    
    The update parameter updates the global variables global:address and global:addressgroups searching.