├── .gitignore
├── LICENSE
├── PowerAlto
├── Classes
│ ├── Helpers
│ │ ├── HelperApi.Class.ps1
│ │ ├── HelperRegex.Class.ps1
│ │ ├── HelperWeb.Class.ps1
│ │ └── HelperXml.Class.ps1
│ └── Main
│ │ ├── PaAddress.Class.ps1
│ │ ├── PaAddressGroup.Class.ps1
│ │ ├── PaCertificate.Class.ps1
│ │ ├── PaCustomReport.Class.ps1
│ │ ├── PaDeviceGroup.Class.ps1
│ │ ├── PaIkeGateway.Class.ps1
│ │ ├── PaIkeGatewayConfig.Class.ps1
│ │ ├── PaInterface.Class.ps1
│ │ ├── PaIpsecTunnel.Class.ps1
│ │ ├── PaIpsecTunnelConfig.Class.ps1
│ │ ├── PaJob.Class.ps1
│ │ ├── PaNatPolicy.Class.ps1
│ │ ├── PaPanoramaConfig.Class.ps1
│ │ ├── PaProxyId.Class.ps1
│ │ ├── PaSecurityPolicy.Class.ps1
│ │ ├── PaService.Class.ps1
│ │ ├── PaServiceGroup.Class.ps1
│ │ ├── PaTag.Class.ps1
│ │ ├── PaUrlCategory.Class.ps1
│ │ └── PaloAltoDevice.Class.ps1
├── PowerAlto.Format.ps1xml
├── PowerAlto.psd1
├── PowerAlto.psm1
├── Private
│ └── Resolve-PaField.ps1
├── Public
│ ├── Get-PaAddress.ps1
│ ├── Get-PaAddressGroup.ps1
│ ├── Get-PaConfigDiff.ps1
│ ├── Get-PaCustomReport.ps1
│ ├── Get-PaDevice.ps1
│ ├── Get-PaInterface.ps1
│ ├── Get-PaJob.ps1
│ ├── Get-PaNatPolicy.ps1
│ ├── Get-PaReportJob.ps1
│ ├── Get-PaSecurityPolicy.ps1
│ ├── Get-PaService.ps1
│ ├── Get-PaServiceGroup.ps1
│ ├── Get-PaSessionInfo.ps1
│ ├── Get-PaTag.ps1
│ ├── Get-PaUrlCategory.ps1
│ ├── HighAvailability
│ │ ├── Get-PaHaSetup.ps1
│ │ ├── New-PaHaSetup.ps1
│ │ ├── PaHaSetup.Class.ps1
│ │ └── Set-PaHaSetup.ps1
│ ├── Invoke-PaApiConfig.ps1
│ ├── Invoke-PaApiOperation.ps1
│ ├── Invoke-PaApiReport.ps1
│ ├── Invoke-PaCommit.ps1
│ ├── Invoke-PaCustomReport.ps1
│ ├── Move-PaSecurityPolicy.ps1
│ ├── New-PaAddress.ps1
│ ├── New-PaNatPolicy.ps1
│ ├── New-PaSecurityPolicy.ps1
│ ├── New-PaTag.ps1
│ ├── PaCertificate
│ │ ├── Get-PaCertificate.ps1
│ │ ├── New-PaCertificate.ps1
│ │ ├── Remove-PaCertificate.ps1
│ │ └── Set-PaCertificate.ps1
│ ├── PaDeviceGroup
│ │ ├── Get-PaDeviceGroup.ps1
│ │ ├── New-PaDeviceGroup.ps1
│ │ ├── Remove-PaDeviceGroup.ps1
│ │ └── Set-PaDeviceGroup.ps1
│ ├── PaIkeGateway
│ │ ├── Clear-PaIkeGateway.ps1
│ │ ├── Get-PaIkeGateway.ps1
│ │ ├── New-PaIkeGateway.ps1
│ │ ├── Remove-PaIkeGateway.ps1
│ │ ├── Set-PaIkeGateway.ps1
│ │ └── Test-PaIkeGateway.ps1
│ ├── PaIkeGatewayConfig
│ │ ├── Get-PaIkeGatewayConfig.ps1
│ │ ├── New-PaIkeGatewayConfig.ps1
│ │ ├── Remove-PaIkeGatewayConfig.ps1
│ │ └── Set-PaIkeGatewayConfig.ps1
│ ├── PaIpsecTunnel
│ │ ├── Clear-PaIpsecTunnel.ps1
│ │ ├── Get-PaIpsecTunnel.ps1
│ │ ├── New-PaIpsecTunnel.ps1
│ │ ├── Remove-PaIpsecTunnel.ps1
│ │ ├── Restart-PaIpsecTunnel.ps1
│ │ ├── Set-PaIpsecTunnel.ps1
│ │ └── Test-PaIpsecTunnel.ps1
│ ├── PaIpsecTunnelConfig
│ │ ├── Get-PaIpsecTunnelConfig.ps1
│ │ └── Test-PaVpn.ps1
│ ├── PaPanoramaConfig
│ │ ├── Get-PaPanoramaConfig.ps1
│ │ ├── New-PaPanoramaConfig.ps1
│ │ └── Set-PaPanoramaConfig.ps1
│ ├── Remove-PaAddress.ps1
│ ├── Remove-PaAddressGroup.ps1
│ ├── Remove-PaSecurityPolicy.ps1
│ ├── Remove-PaTag.ps1
│ ├── Resolve-PaAddress.ps1
│ ├── Resolve-PaNatPolicy.ps1
│ ├── Resolve-PaSecurityPolicy.ps1
│ ├── Resolve-PaService.ps1
│ ├── Set-PaAddress.ps1
│ ├── Set-PaAddressGroup.ps1
│ ├── Set-PaCustomReport.ps1
│ ├── Set-PaNatPolicy.ps1
│ ├── Set-PaSecurityPolicy.ps1
│ ├── Set-PaTag.ps1
│ ├── Set-PaTargetDeviceGroup.ps1
│ ├── Set-PaTargetVsys.ps1
│ └── Set-PaUrlCategory.ps1
└── en-US
│ ├── PowerAlto-help.xml
│ └── PowerAlto4-help.xml
├── README.md
├── Tests
├── Get-PaSessionInfo.Tests.ps1
├── PaCertificate
│ ├── Get-PaCertificate.Tests.ps1
│ ├── New-PaCertificate.Tests.ps1
│ ├── Remove-PaCertificate.Tests.ps1
│ └── Set-PaCertificate.Tests.ps1
├── PaDeviceGroup
│ ├── Get-PaDeviceGroup.Tests.ps1
│ ├── New-PaDeviceGroup.Tests.ps1
│ ├── Remove-PaDeviceGroup.Tests.ps1
│ └── Set-PaDeviceGroup.Tests.ps1
├── PaIkeGateway
│ ├── Get-PaIkeGateway.Tests.ps1
│ ├── New-PaIkeGateway.Tests.ps1
│ ├── Remove-PaIkeGateway.Tests.ps1
│ └── Set-PaIkeGateway.Tests.ps1
├── PaIkeGatewayConfig
│ ├── Get-PaIkeGatewayConfig.Tests.ps1
│ ├── New-PaIkeGatewayConfig.Tests.ps1
│ ├── Remove-PaIkeGatewayConfig.Tests.ps1
│ └── Set-PaIkeGatewayConfig.Tests.ps1
└── PaIpsecTunnel
│ ├── Get-PaIpsecTunnel.Tests.ps1
│ ├── New-PaIpsecTunnel.Tests.ps1
│ ├── Remove-PaIpsecTunnel.Tests.ps1
│ └── Set-PaIpsecTunnel.Tests.ps1
├── appveyor.yml
├── build.ps1
├── cov.xml
├── deploy.psdeploy.ps1
├── docs
├── cmdlets
│ ├── Clear-PaIkeGateway.md
│ ├── Clear-PaIpsecTunnel.md
│ ├── Get-PaAddress.md
│ ├── Get-PaAddressGroup.md
│ ├── Get-PaConfigDiff.md
│ ├── Get-PaCustomReport.md
│ ├── Get-PaDevice.md
│ ├── Get-PaHaSetup.md
│ ├── Get-PaIkeGatewayConfig.md
│ ├── Get-PaInterface.md
│ ├── Get-PaIpsecTunnel.md
│ ├── Get-PaIpsecTunnelConfig.md
│ ├── Get-PaJob.md
│ ├── Get-PaNatPolicy.md
│ ├── Get-PaPanoramaConfig.md
│ ├── Get-PaReportJob.md
│ ├── Get-PaSecurityPolicy.md
│ ├── Get-PaService.md
│ ├── Get-PaServiceGroup.md
│ ├── Get-PaSessionInfo.md
│ ├── Get-PaTag.md
│ ├── Get-PaUrlCategory.md
│ ├── Invoke-PaApiConfig.md
│ ├── Invoke-PaApiOperation.md
│ ├── Invoke-PaApiReport.md
│ ├── Invoke-PaCommit.md
│ ├── Invoke-PaCustomReport.md
│ ├── Move-PaSecurityPolicy.md
│ ├── New-PaAddress.md
│ ├── New-PaHaSetup.md
│ ├── New-PaIkeGateway.md
│ ├── New-PaIkeGatewayConfig.md
│ ├── New-PaIpsecTunnel.md
│ ├── New-PaNatPolicy.md
│ ├── New-PaPanoramaConfig.md
│ ├── New-PaSecurityPolicy.md
│ ├── New-PaTag.md
│ ├── PowerAlto.md
│ ├── Remove-PaAddress.md
│ ├── Remove-PaAddressGroup.md
│ ├── Remove-PaSecurityPolicy.md
│ ├── Remove-PaTag.md
│ ├── Resolve-PaAddress.md
│ ├── Resolve-PaNatPolicy.md
│ ├── Resolve-PaSecurityPolicy.md
│ ├── Resolve-PaService.md
│ ├── Restart-PaIpsecTunnel.md
│ ├── Set-PaAddress.md
│ ├── Set-PaAddressGroup.md
│ ├── Set-PaCustomReport.md
│ ├── Set-PaHaSetup.md
│ ├── Set-PaNatPolicy.md
│ ├── Set-PaPanoramaConfig.md
│ ├── Set-PaSecurityPolicy.md
│ ├── Set-PaTag.md
│ ├── Set-PaTargetDeviceGroup.md
│ ├── Set-PaTargetVsys.md
│ ├── Set-PaUrlCategory.md
│ ├── Test-PaIkeGateway.md
│ ├── Test-PaIpsecTunnel.md
│ └── Test-PaVpn.md
└── index.md
├── mkdocs.yml
├── psake.ps1
└── scripts
└── Send-NPSLogToUserId.ps1
/.gitignore:
--------------------------------------------------------------------------------
1 | *.DS_Store
2 | .AppleDouble
3 | .LSOverride
4 |
5 | # Icon must end with two \r
6 | Icon
7 |
8 |
9 | # Thumbnails
10 | ._*
11 |
12 | # Files that might appear in the root of a volume
13 | .DocumentRevisions-V100
14 | .fseventsd
15 | .Spotlight-V100
16 | .TemporaryItems
17 | .Trashes
18 | .VolumeIcon.icns
19 | .com.apple.timemachine.donotpresent
20 |
21 | # Directories potentially created on remote AFP share
22 | .AppleDB
23 | .AppleDesktop
24 | Network Trash Folder
25 | Temporary Items
26 | .apdisk
27 |
28 | # Cred files
29 | *-cred.xml
30 |
31 | # Testing files (not unit tests)
32 | testing*.ps1
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Brian Addicks
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/PowerAlto/Classes/Helpers/HelperApi.Class.ps1:
--------------------------------------------------------------------------------
1 | class HelperApi {
2 | # TranslateBool
3 | static [bool] TranslatePaToBool([string]$ApiBool,[bool]$DefaultValue) {
4 | if ($ApiBool -eq 'yes') {
5 | return $true
6 | } elseif ($ApiBool -eq 'no') {
7 | return $false
8 | } elseif ($ApiBool -eq '') {
9 | return $DefaultValue
10 | } else {
11 | Throw "Invalid bool value: $ApiBool"
12 | }
13 | }
14 |
15 | # TranslateBoolToPa
16 | static [bool] TranslateBoolToPa([bool]$ThisBool) {
17 | if ($ThisBool) {
18 | return 'yes'
19 | } else {
20 | return 'no'
21 | }
22 | }
23 |
24 | # Constructor
25 | HelperApi () {
26 | }
27 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Helpers/HelperWeb.Class.ps1:
--------------------------------------------------------------------------------
1 | class HelperWeb {
2 | static [string] createQueryString ([hashtable]$hashTable) {
3 | $i = 0
4 | $queryString = "?"
5 | foreach ($hash in $hashTable.GetEnumerator()) {
6 | $i++
7 | $queryString += $hash.Name + "=" + $hash.Value
8 | if ($i -lt $HashTable.Count) {
9 | $queryString += "&"
10 | }
11 | }
12 | return $queryString
13 | }
14 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Helpers/HelperXml.Class.ps1:
--------------------------------------------------------------------------------
1 | class HelperXml {
2 | static [string] parseCandidateConfigXml ($XmlNode,[bool]$ReturnNodeName = $false) {
3 | # Nodes we want to ignore
4 | # This is to ignore the data you get about changes in a candidate config
5 | $UnWantedNodes = @()
6 | $UnWantedNodes += 'admin'
7 | $UnWantedNodes += 'dirtyId'
8 | $UnWantedNodes += 'time'
9 | $UnWantedNodes += 'loc'
10 |
11 | $ReturnValue = $null
12 | if ($XmlNode.'#text') {
13 | # '#text' node only shows up for Candidate configurations
14 | $ReturnValue = $XmlNode.'#text'
15 | } else {
16 | if ($ReturnNodeName) {
17 | $Nodes = $XmlNode | Get-Member -MemberType Property
18 | $Node = $Nodes | Where-Object { $UnwantedNodes -notcontains $_.Name }
19 | $ReturnValue = $Node.Name
20 | } else {
21 | $ReturnValue = $XmlNode
22 | }
23 | }
24 |
25 | return $ReturnValue
26 | }
27 |
28 | static [string[]] GetMembersFromXml ($XmlNode) {
29 | $ReturnValue = @()
30 | foreach ($member in $XmlNode.Member) {
31 | $ReturnValue += [HelperXml]::parseCandidateConfigXml($member,$false)
32 | }
33 | return $ReturnValue
34 | }
35 |
36 | static [array] SplitXml ([xml]$Content) {
37 | # String Writer and XML Writer objects to write XML to string
38 | $StringWriter = New-Object System.IO.StringWriter
39 | $XmlWriter = New-Object System.XMl.XmlTextWriter $StringWriter
40 |
41 | # Default = None, change Formatting to Indented
42 | $xmlWriter.Formatting = "indented"
43 |
44 | # Gets or sets how many IndentChars to write for each level in
45 | # the hierarchy when Formatting is set to Formatting.Indented
46 | $Content.WriteContentTo($XmlWriter)
47 | $XmlWriter.Flush()
48 | $StringWriter.Flush()
49 | $ReturnObject = $StringWriter.ToString() -split '[\r\n]'
50 |
51 | return $ReturnObject
52 | }
53 |
54 | static [System.Xml.XmlLinkedNode] GetXmlNodeWithMembers ([string]$Node,[string[]]$Members) {
55 | [xml]$Doc = New-Object System.Xml.XmlDocument
56 | $MembersNode = $Doc.CreateNode("element",$Node,$null)
57 | foreach ($member in $Members) {
58 | $MemberNode = $Doc.CreateNode("element",'member',$null)
59 | $MemberNode.InnerText = $member
60 | $MembersNode.AppendChild($MemberNode)
61 | }
62 |
63 | return $MembersNode
64 | }
65 |
66 | static [System.Xml.XmlLinkedNode] AddNodeWithMembers ([System.Xml.XmlLinkedNode]$ParentNode,[string]$ChildNode,[string[]]$Members) {
67 | $MembersNode = [HelperXml]::GetXmlNodeWithMembers($ChildNode,$Members)
68 | $ImportNode = $ParentNode.OwnerDocument.ImportNode($MembersNode,$true)
69 | $ParentNode.AppendChild($ImportNode)
70 | return $ParentNode
71 | }
72 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaAddress.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaAddress {
2 | [string]$Name
3 | [string]$Description
4 | [string]$Type
5 | [string]$Value
6 | [string[]]$Tags
7 |
8 | [string]$DeviceGroup
9 | [string]$Vsys
10 |
11 | ###################################### Methods #######################################
12 | # invokeReportGetQuery
13 | [Xml] ToXml() {
14 | [xml]$Doc = New-Object System.Xml.XmlDocument
15 | $root = $Doc.CreateNode("element","address",$null)
16 |
17 | # Start Entry Node
18 | $EntryNode = $Doc.CreateNode("element","entry",$null)
19 | $EntryNode.SetAttribute("name",$this.Name)
20 |
21 | # Start Type Node with Value
22 | $TypeNode = $Doc.CreateNode("element",$this.Type,$null)
23 | $TypeNode.InnerText = $this.Value
24 | $EntryNode.AppendChild($TypeNode)
25 |
26 | if ($this.Tags) {
27 | # Tag Members
28 | $MembersNode = $Doc.CreateNode("element",'tag',$null)
29 | foreach ($member in $this.Tags) {
30 | $MemberNode = $Doc.CreateNode("element",'member',$null)
31 | $MemberNode.InnerText = $member
32 | $MembersNode.AppendChild($MemberNode)
33 | }
34 | $EntryNode.AppendChild($MembersNode)
35 | }
36 |
37 | if ($this.Description) {
38 | # Description
39 | $DescriptionNode = $Doc.CreateNode("element","description",$null)
40 | $DescriptionNode.InnerText = $this.Description
41 | $EntryNode.AppendChild($DescriptionNode)
42 | }
43 |
44 | # Append Entry to Root and Root to Doc
45 | $root.AppendChild($EntryNode)
46 | $Doc.AppendChild($root)
47 |
48 | return $Doc
49 | }
50 |
51 | ##################################### Initiators #####################################
52 | # Initiator
53 | PaAddress([string]$Name) {
54 | $this.Name = $Name
55 | }
56 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaAddressGroup.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaAddressGroup {
2 | [string]$Name
3 | [string]$Description
4 | [string]$Type
5 | [string[]]$Member
6 | [string]$Filter
7 | [string[]]$Tags
8 |
9 | ###################################### Methods #######################################
10 | # invokeReportGetQuery
11 | [Xml] ToXml() {
12 | [xml]$Doc = New-Object System.Xml.XmlDocument
13 | $root = $Doc.CreateNode("element", "address-group", $null)
14 |
15 | # Start Entry Node
16 | $EntryNode = $Doc.CreateNode("element", "entry", $null)
17 | $EntryNode.SetAttribute("name", $this.Name)
18 |
19 | # Start Type Node with Value
20 | $TypeNode = $Doc.CreateNode("element", $this.Type, $null)
21 | $TypeNode.InnerText = $this.Value
22 |
23 | # Static Members
24 | if ($this.Type -eq 'static') {
25 | # Tag Members
26 | foreach ($member in $this.Member) {
27 | $MemberNode = $Doc.CreateNode("element", 'member', $null)
28 | $MemberNode.InnerText = $member
29 | $TypeNode.AppendChild($MemberNode)
30 | }
31 | }
32 |
33 | # Dynamic Filter
34 | if ($this.Type -eq 'dynamic') {
35 | $FilterNode = $Doc.CreateNode("element", "filter", $null)
36 | $FilterNode.InnerText = $this.Filter
37 | $TypeNode.AppendChild($FilterNode)
38 | }
39 |
40 | $EntryNode.AppendChild($TypeNode)
41 |
42 | if ($this.Tags) {
43 | # Tag Members
44 | $MembersNode = $Doc.CreateNode("element", 'tag', $null)
45 | foreach ($member in $this.Tags) {
46 | $MemberNode = $Doc.CreateNode("element", 'member', $null)
47 | $MemberNode.InnerText = $member
48 | $MembersNode.AppendChild($MemberNode)
49 | }
50 | $EntryNode.AppendChild($MembersNode)
51 | }
52 |
53 | if ($this.Description) {
54 | # Description
55 | $DescriptionNode = $Doc.CreateNode("element", "description", $null)
56 | $DescriptionNode.InnerText = $this.Description
57 | $EntryNode.AppendChild($DescriptionNode)
58 | }
59 |
60 | # Append Entry to Root and Root to Doc
61 | $root.AppendChild($EntryNode)
62 | $Doc.AppendChild($root)
63 |
64 | return $Doc
65 | }
66 |
67 | ##################################### Initiators #####################################
68 | # Initiator
69 | PaAddressGroup([string]$Name) {
70 | $this.Name = $Name
71 | }
72 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaCertificate.Class.ps1:
--------------------------------------------------------------------------------
1 | <# Class PaCertificate {
2 | [string]$String
3 | [int]$Integer
4 | [bool]$Bool
5 |
6 | #region Initiators
7 | ########################################################################
8 |
9 | # empty initiator
10 | PaCertificate() {
11 | }
12 |
13 | ########################################################################
14 | #endregion Initiators
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaDeviceGroup.Class.ps1:
--------------------------------------------------------------------------------
1 | Class PaDeviceGroup {
2 | [string]$Name
3 | [string]$Description
4 | [string[]]$ReferenceTemplate
5 | [string[]]$Device
6 | [string]$ParentDeviceGroup
7 | [string]$MasterDeviceGroup
8 |
9 | #region Initiators
10 | ########################################################################
11 |
12 | # empty initiator
13 | PaDeviceGroup() {
14 | }
15 |
16 | # with name
17 | PaDeviceGroup([string]$Name) {
18 | $this.Name = $Name
19 | }
20 |
21 | ########################################################################
22 | #endregion Initiators
23 | }
24 |
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaIkeGateway.Class.ps1:
--------------------------------------------------------------------------------
1 | Class PaIkeGateway {
2 | [string]$Name
3 |
4 | #region Initiators
5 | ########################################################################
6 |
7 | # empty initiator
8 | PaIkeGateway() {
9 | }
10 |
11 | ########################################################################
12 | #endregion Initiators
13 | }
14 |
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaIkeGatewayConfig.Class.ps1:
--------------------------------------------------------------------------------
1 | Class PaIkeGatewayConfig {
2 | [string]$Name
3 | [bool]$IkeV1Enabled
4 | [bool]$IkeV2Enabled
5 |
6 | [string]$Interface
7 | [string]$LocalIPAddress
8 |
9 | [string]$PeerIpAddress
10 |
11 | [string]$IkeCryptoProfile
12 |
13 | #region Initiators
14 | ########################################################################
15 |
16 | # empty initiator
17 | PaIkeGatewayConfig() {
18 | }
19 |
20 | ########################################################################
21 | #endregion Initiators
22 | }
23 |
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaInterface.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaInterface {
2 | # Main Config Panel
3 | [string]$Name
4 | [string]$Comment
5 | [string]$Type
6 | [string]$AggregateGroup
7 | [int]$Tag
8 |
9 | # Config
10 | [string]$VirtualRouter
11 | [string]$Zone
12 |
13 | # Ipv4
14 | [string[]]$IpAddress
15 |
16 | # Advanced
17 | [string]$ManagementProfile
18 |
19 | # Static Properties
20 | static [String] $XPathNode = "network/interface"
21 | static [String] $ResponseNode = "interface"
22 |
23 |
24 |
25 | ###################################### Methods #######################################
26 | # invokeReportGetQuery
27 | <#
28 | [Xml] ToXml() {
29 | [xml]$Doc = New-Object System.Xml.XmlDocument
30 | $root = $Doc.CreateNode("element","address",$null)
31 |
32 | # Start Entry Node
33 | $EntryNode = $Doc.CreateNode("element","entry",$null)
34 | $EntryNode.SetAttribute("name",$this.Name)
35 |
36 | # Start Type Node with Value
37 | $TypeNode = $Doc.CreateNode("element",$this.Type,$null)
38 | $TypeNode.InnerText = $this.Value
39 | $EntryNode.AppendChild($TypeNode)
40 |
41 | if ($this.Tags) {
42 | # Tag Members
43 | $MembersNode = $Doc.CreateNode("element",'tag',$null)
44 | foreach ($member in $this.Tags) {
45 | $MemberNode = $Doc.CreateNode("element",'member',$null)
46 | $MemberNode.InnerText = $member
47 | $MembersNode.AppendChild($MemberNode)
48 | }
49 | $EntryNode.AppendChild($MembersNode)
50 | }
51 |
52 | if ($this.Description) {
53 | # Description
54 | $DescriptionNode = $Doc.CreateNode("element","description",$null)
55 | $DescriptionNode.InnerText = $this.Description
56 | $EntryNode.AppendChild($DescriptionNode)
57 | }
58 |
59 | # Append Entry to Root and Root to Doc
60 | $root.AppendChild($EntryNode)
61 | $Doc.AppendChild($root)
62 |
63 | return $Doc
64 | }
65 | #>
66 |
67 | ##################################### Initiators #####################################
68 | # Initiator
69 | PaInterface([string]$Name) {
70 | $this.Name = $Name
71 | }
72 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaIpsecTunnel.Class.ps1:
--------------------------------------------------------------------------------
1 | Class PaIpsecTunnel {
2 | [string]$Name
3 | [int]$Id
4 | [string]$State
5 | [bool]$Monitor
6 | [string]$LocalIp
7 | [string]$PeerIp
8 | [string]$TunnelInterface
9 |
10 | #region Initiators
11 | ########################################################################
12 |
13 | # empty initiator
14 | PaIpsecTunnel() {
15 | }
16 |
17 | ########################################################################
18 | #endregion Initiators
19 | }
20 |
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaIpsecTunnelConfig.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaIpsecTunnelConfig {
2 | [string]$Name
3 | [string]$IkeGateway
4 | [string]$IpsecCryptoProfile
5 | [string]$TunnelInterface
6 | [bool]$Disabled
7 |
8 | [array]$ProxyId
9 |
10 | ###################################### Methods #######################################
11 |
12 | ##################################### Initiators #####################################
13 | # Initiator
14 | PaIpsecTunnelConfig([string]$Name) {
15 | $this.Name = $Name
16 | }
17 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaJob.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaJob {
2 | [int]$Id
3 | [DateTime]$Enqueued
4 | [DateTime]$Dequeued
5 | [string]$Type
6 | [string]$Status
7 | [string]$Result
8 | [DateTime]$TimeComplete
9 | [string]$Warnings
10 | [string]$Details
11 | [string]$Description
12 | [string]$User
13 | [string]$Progress
14 |
15 | ##################################### Initiators #####################################
16 | # Initiator
17 | PaJob([int]$JobId) {
18 | $this.Id = $JobId
19 | }
20 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaProxyId.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaProxyId {
2 | [string]$Name
3 | [string]$Protocol = 'any'
4 | [string]$LocalNetwork
5 | [string]$RemoteNetwork
6 |
7 | ###################################### Methods #######################################
8 |
9 | ##################################### Initiators #####################################
10 | # Initiator
11 | PaProxyId([string]$Name) {
12 | $this.Name = $Name
13 | }
14 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaService.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaService {
2 | [string]$Name
3 | [string]$Description
4 | [string]$Protocol
5 | [string]$SourcePort
6 | [string]$DestinationPort
7 | [string[]]$Tags
8 |
9 | <#
10 | ###################################### Methods #######################################
11 | # invokeReportGetQuery
12 | [Xml] ToXml() {
13 | [xml]$Doc = New-Object System.Xml.XmlDocument
14 | $root = $Doc.CreateNode("element","address",$null)
15 |
16 | # Start Entry Node
17 | $EntryNode = $Doc.CreateNode("element","entry",$null)
18 | $EntryNode.SetAttribute("name",$this.Name)
19 |
20 | # Start Type Node with Value
21 | $TypeNode = $Doc.CreateNode("element",$this.Type,$null)
22 | $TypeNode.InnerText = $this.Value
23 | $EntryNode.AppendChild($TypeNode)
24 |
25 | if ($this.Tags) {
26 | # Tag Members
27 | $MembersNode = $Doc.CreateNode("element",'tag',$null)
28 | foreach ($member in $this.Tags) {
29 | $MemberNode = $Doc.CreateNode("element",'member',$null)
30 | $MemberNode.InnerText = $member
31 | $MembersNode.AppendChild($MemberNode)
32 | }
33 | $EntryNode.AppendChild($MembersNode)
34 | }
35 |
36 | if ($this.Description) {
37 | # Description
38 | $DescriptionNode = $Doc.CreateNode("element","description",$null)
39 | $DescriptionNode.InnerText = $this.Description
40 | $EntryNode.AppendChild($DescriptionNode)
41 | }
42 |
43 | # Append Entry to Root and Root to Doc
44 | $root.AppendChild($EntryNode)
45 | $Doc.AppendChild($root)
46 |
47 | return $Doc
48 | } #>
49 |
50 | ##################################### Initiators #####################################
51 | # Initiator
52 | PaService([string]$Name) {
53 | $this.Name = $Name
54 | }
55 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaServiceGroup.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaServiceGroup {
2 | [string]$Name
3 | [string[]]$Member
4 | [string[]]$Tags
5 |
6 | ###################################### Methods #######################################
7 | # invokeReportGetQuery
8 | <# [Xml] ToXml() {
9 | [xml]$Doc = New-Object System.Xml.XmlDocument
10 | $root = $Doc.CreateNode("element", "address-group", $null)
11 |
12 | # Start Entry Node
13 | $EntryNode = $Doc.CreateNode("element", "entry", $null)
14 | $EntryNode.SetAttribute("name", $this.Name)
15 |
16 | # Start Type Node with Value
17 | $TypeNode = $Doc.CreateNode("element", $this.Type, $null)
18 | $TypeNode.InnerText = $this.Value
19 |
20 | # Static Members
21 | if ($this.Type -eq 'static') {
22 | # Tag Members
23 | foreach ($member in $this.Member) {
24 | $MemberNode = $Doc.CreateNode("element", 'member', $null)
25 | $MemberNode.InnerText = $member
26 | $TypeNode.AppendChild($MemberNode)
27 | }
28 | }
29 |
30 | # Dynamic Filter
31 | if ($this.Type -eq 'dynamic') {
32 | $FilterNode = $Doc.CreateNode("element", "filter", $null)
33 | $FilterNode.InnerText = $this.Filter
34 | $TypeNode.AppendChild($FilterNode)
35 | }
36 |
37 | $EntryNode.AppendChild($TypeNode)
38 |
39 | if ($this.Tags) {
40 | # Tag Members
41 | $MembersNode = $Doc.CreateNode("element", 'tag', $null)
42 | foreach ($member in $this.Tags) {
43 | $MemberNode = $Doc.CreateNode("element", 'member', $null)
44 | $MemberNode.InnerText = $member
45 | $MembersNode.AppendChild($MemberNode)
46 | }
47 | $EntryNode.AppendChild($MembersNode)
48 | }
49 |
50 | if ($this.Description) {
51 | # Description
52 | $DescriptionNode = $Doc.CreateNode("element", "description", $null)
53 | $DescriptionNode.InnerText = $this.Description
54 | $EntryNode.AppendChild($DescriptionNode)
55 | }
56 |
57 | # Append Entry to Root and Root to Doc
58 | $root.AppendChild($EntryNode)
59 | $Doc.AppendChild($root)
60 |
61 | return $Doc
62 | } #>
63 |
64 | ##################################### Initiators #####################################
65 | # Initiator
66 | PaServiceGroup([string]$Name) {
67 | $this.Name = $Name
68 | }
69 | }
--------------------------------------------------------------------------------
/PowerAlto/Classes/Main/PaUrlCategory.Class.ps1:
--------------------------------------------------------------------------------
1 | class PaUrlCategory {
2 | [string]$Name
3 | [string]$Description
4 | [string[]]$Members
5 |
6 | ###################################### Methods #######################################
7 | # invokeReportGetQuery
8 | [Xml] ToXml() {
9 | [xml]$Doc = New-Object System.Xml.XmlDocument
10 | $root = $Doc.CreateNode("element","custom-url-category",$null)
11 |
12 | # Start Entry Node
13 | $EntryNode = $Doc.CreateNode("element","entry",$null)
14 | $EntryNode.SetAttribute("name",$this.Name)
15 |
16 | # Description
17 | if ($this.Description) {
18 | # Description
19 | $DescriptionNode = $Doc.CreateNode("element","description",$null)
20 | $DescriptionNode.InnerText = $this.Description
21 | $EntryNode.AppendChild($DescriptionNode)
22 | }
23 |
24 | # Members
25 | $EntryNode = [HelperXml]::AddNodeWithMembers($EntryNode,'list',$this.Members)
26 |
27 | $root.AppendChild($EntryNode)
28 | $Doc.AppendChild($root)
29 |
30 | return $Doc
31 | }
32 |
33 | ##################################### Initiators #####################################
34 | # Initiator
35 | PaUrlCategory([string]$Name) {
36 | $this.Name = $Name
37 | }
38 | }
--------------------------------------------------------------------------------
/PowerAlto/PowerAlto.Format.ps1xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianaddicks/PowerAlto/e3b81e39bf1c22ac5e2ea49967b409ca9e064791/PowerAlto/PowerAlto.Format.ps1xml
--------------------------------------------------------------------------------
/PowerAlto/PowerAlto.psm1:
--------------------------------------------------------------------------------
1 | # cribbed this from https://www.powershellgallery.com/packages/Idempotion
2 |
3 | $Subs = @(
4 | @{
5 | Path = 'Classes'
6 | Export = $false
7 | Recurse = $true
8 | Filter = '*.Class.ps1'
9 | Exclude = @(
10 | '*.Tests.ps1'
11 | )
12 | } ,
13 |
14 | @{
15 | Path = 'Private'
16 | Export = $false
17 | Recurse = $false
18 | Filter = '*-*.ps1'
19 | Exclude = @(
20 | '*.Tests.ps1'
21 | )
22 | } ,
23 |
24 | @{
25 | Path = 'Public'
26 | Export = $true
27 | Recurse = $true
28 | Filter = '*.ps1'
29 | Exclude = @(
30 | '*.Tests.ps1'
31 | )
32 | }
33 | )
34 |
35 |
36 | $thisModule = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath)
37 | $varName = "__${thisModule}_Export_All"
38 | $exportAll = Get-Variable -Scope Global -Name $varName -ValueOnly -ErrorAction Ignore
39 |
40 | $Subs | ForEach-Object -Process {
41 | $sub = $_
42 | $thisDir = $PSScriptRoot | Join-Path -ChildPath $sub.Path | Join-Path -ChildPath '*'
43 | $thisDir |
44 | Get-ChildItem -Filter $sub.Filter -Exclude $sub.Exclude -Recurse:$sub.Recurse -ErrorAction Ignore | ForEach-Object -Process {
45 | try {
46 | $Unit = $_.FullName
47 | . $Unit
48 | if (($sub.Export -or $exportAll) -and ($_.name -notmatch "\.Class\.ps1")) {
49 | Export-ModuleMember -Function $_.BaseName
50 | }
51 | } catch {
52 | $e = "Could not import '$Unit' with exception: `n`n`n$($_.Exception)" -as $_.Exception.GetType()
53 | throw $e
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Get-PaAddressGroup.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaAddressGroup {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaAddressGroup:"
10 | $XPathNode = 'address-group'
11 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
12 | }
13 |
14 | PROCESS {
15 | if ($null -ne $Global:PaDeviceObject.Config) {
16 | $Entries = $global:PaDeviceObject.Config.config.devices.entry.vsys.entry.'address-group'.entry
17 | } else {
18 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
19 | if ($Response.response.result.$XPathNode) {
20 | $Entries = $Response.response.result.$XPathNode.entry
21 | } else {
22 | $Entries = $Response.response.result.entry
23 | }
24 | }
25 |
26 | $ReturnObject = @()
27 | foreach ($entry in $Entries) {
28 | # Initialize Report object, add to returned array
29 | $Object = [PaAddressGroup]::new($entry.name)
30 | $ReturnObject += $Object
31 |
32 | # Type and Value
33 | if ($entry.static) {
34 | $Object.Type = 'static'
35 | $Object.Member += $entry.static.member
36 | } elseif ($entry.dynamic) {
37 | $Object.Type = 'dynamic'
38 | $Object.Filter += $entry.dynamic.filter
39 | }
40 |
41 | # Add other properties to report
42 | $Object.Description = [HelperXml]::parseCandidateConfigXml($entry.description, $false)
43 | $Object.Tags = [HelperXml]::parseCandidateConfigXml($entry.tag.member, $false)
44 | }
45 |
46 | $ReturnObject
47 | }
48 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Get-PaConfigDiff.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaConfigDiff {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $RunningConfig = Invoke-PaApiOperation ''
8 | $CandidateConfig = Invoke-PaApiOperation ''
9 | }
10 |
11 | PROCESS {
12 | # Format Xml for comparison
13 | $RunningConfig = [HelperXml]::SplitXml($RunningConfig)
14 | $CandidateConfig = [HelperXml]::SplitXml($CandidateConfig)
15 |
16 | Compare-Object $RunningConfig $CandidateConfig
17 | # Would like to clean this up a bit and return output that's useful
18 | }
19 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Get-PaCustomReport.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaCustomReport {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name,
6 |
7 | [Parameter(Mandatory = $False, Position = 1)]
8 | [string]$Vsys
9 | )
10 |
11 | BEGIN {
12 | $VerbosePrefix = "Get-PaCustomReport:"
13 | $Xpath = $Global:PaDeviceObject.createXPath('reports', $Name)
14 | }
15 |
16 | PROCESS {
17 | # Get the config info for the report
18 | # This is required for the call to run the report
19 | $ReportConfig = Invoke-PaApiConfig -Get -Xpath $XPath
20 | if ($ReportConfig.response.result.reports) {
21 | $Entries = $ReportConfig.response.result.reports.entry
22 | } else {
23 | $Entries = $ReportConfig.response.result.entry
24 | }
25 |
26 | $ReturnObject = @()
27 | foreach ($entry in $Entries) {
28 | # Initialize Report object, add to returned array
29 | $Report = [PaCustomReport]::new($entry.name)
30 | $ReturnObject += $Report
31 |
32 | # Get Node Name Properties
33 | $ShortDatabaseName = [HelperXml]::parseCandidateConfigXml($entry.type, $true)
34 | $Report.Database = $Report.TranslateDatabaseName($ShortDatabaseName, 'Friendly')
35 | Write-Verbose "$VerbosePrefix getting report: Name $($entry.name), Database $($Report.Database)"
36 |
37 | # Add other properties to report
38 | $Report.Columns = [HelperXml]::parseCandidateConfigXml($entry.type.$ShortDatabaseName.'aggregate-by'.member, $false)
39 | $Report.Columns += [HelperXml]::parseCandidateConfigXml($entry.type.$ShortDatabaseName.values.member, $false)
40 | $Report.SortBy = [HelperXml]::parseCandidateConfigXml($entry.type.$ShortDatabaseName.sortby, $false)
41 | $Report.TimeFrame = [HelperXml]::parseCandidateConfigXml($entry.period, $false)
42 | $Report.EntriesShown = [HelperXml]::parseCandidateConfigXml($entry.topn, $false)
43 | $Report.Groups = [HelperXml]::parseCandidateConfigXml($entry.topm, $false)
44 | $Report.Description = [HelperXml]::parseCandidateConfigXml($entry.description, $false)
45 | $Report.Query = [HelperXml]::parseCandidateConfigXml($entry.query, $false)
46 | }
47 |
48 | $ReturnObject
49 | }
50 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Get-PaService.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaService {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaService:"
10 | $XPathNode = 'service'
11 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
12 | }
13 |
14 | PROCESS {
15 | if ($null -ne $Global:PaDeviceObject.Config) {
16 | $Entries = $global:PaDeviceObject.Config.config.devices.entry.vsys.entry.service.entry
17 | } else {
18 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
19 | if ($Response.response.result.$XPathNode) {
20 | $Entries = $Response.response.result.$XPathNode.entry
21 | } else {
22 | $Entries = $Response.response.result.entry
23 | }
24 | }
25 |
26 | $ReturnObject = @()
27 |
28 | # add default services
29 | $Object = [PaService]::new('service-http')
30 | $Object.Protocol = 'tcp'
31 | $Object.DestinationPort = '80'
32 | $ReturnObject += $Object
33 |
34 | $Object = [PaService]::new('service-https')
35 | $Object.Protocol = 'tcp'
36 | $Object.DestinationPort = '443'
37 | $ReturnObject += $Object
38 |
39 | foreach ($entry in $Entries) {
40 | # Initialize Report object, add to returned array
41 | $Object = [PaService]::new($entry.name)
42 | $ReturnObject += $Object
43 |
44 | # Get protocol
45 | if ($entry.protocol.tcp) {
46 | $Protocol = 'tcp'
47 | } elseif ($entry.protocol.udp) {
48 | $Protocol = 'udp'
49 | }
50 |
51 | $Object.Protocol = $Protocol
52 | $Object.SourcePort = $entry.protocol.$Protocol.'source-port'
53 | $Object.DestinationPort = $entry.protocol.$Protocol.'port'
54 |
55 | #TODO: add $protocol.override
56 |
57 | # Add other properties to report
58 | $Object.Description = [HelperXml]::parseCandidateConfigXml($entry.description, $false)
59 | $Object.Tags = [HelperXml]::GetMembersFromXml($entry.tag)
60 | }
61 |
62 | $ReturnObject
63 | }
64 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Get-PaServiceGroup.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaServiceGroup {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaServiceGroup:"
10 | $XPathNode = 'service-group'
11 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
12 | }
13 |
14 | PROCESS {
15 | if ($null -ne $Global:PaDeviceObject.Config) {
16 | $Entries = $global:PaDeviceObject.Config.config.devices.entry.vsys.entry.$XPathNode.entry
17 | } else {
18 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
19 | if ($Response.response.result.$XPathNode) {
20 | $Entries = $Response.response.result.$XPathNode.entry
21 | } else {
22 | $Entries = $Response.response.result.entry
23 | }
24 | }
25 |
26 | $ReturnObject = @()
27 | foreach ($entry in $Entries) {
28 | # Initialize Report object, add to returned array
29 | $Object = [PaServiceGroup]::new($entry.name)
30 | $ReturnObject += $Object
31 |
32 | # Add Members
33 | $Object.Member += $entry.members.member
34 |
35 | # Add Tags
36 | $Object.Tags = [HelperXml]::parseCandidateConfigXml($entry.tag.member, $false)
37 | }
38 |
39 | $ReturnObject
40 | }
41 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Get-PaSessionInfo.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaSessionInfo {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Get-PaSessionInfo:"
8 | $Cmd = ''
9 | }
10 |
11 | PROCESS {
12 | $Query = Invoke-PaApiOperation -Cmd $Cmd
13 | $Results = $Query.response.result
14 |
15 | $ReturnObject = "" | Select-Object SupportedSessions, AllocatedSessions, TcpSessions, UdpSessions, SessionsSinceBoot
16 |
17 | $ReturnObject.SupportedSessions = $Results.'num-max'
18 | $ReturnObject.AllocatedSessions = $Results.'num-active'
19 | $ReturnObject.TcpSessions = $Results.'num-tcp'
20 | $ReturnObject.UdpSessions = $Results.'num-udp'
21 | $ReturnObject.SessionsSinceBoot = $Results.'num-installed'
22 |
23 | $ReturnObject
24 | }
25 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Get-PaTag.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaTag {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaTag:"
10 | $XPathNode = 'tag'
11 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
12 | }
13 |
14 | PROCESS {
15 | # Get the config info for the tag
16 | # This is required for the call to run the tag
17 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
18 | if ($Response.response.result.$XPathNode) {
19 | $Entries = $Response.response.result.$XPathNode.entry
20 | } else {
21 | $Entries = $Response.response.result.entry
22 | }
23 |
24 | $ReturnObject = @()
25 | foreach ($entry in $Entries) {
26 | # Initialize object, add to returned array
27 | if ($entry.color) {
28 | $Color = $entry.color
29 | $Object = [PaTag]::new($entry.name, $Color)
30 | } else {
31 | $Object = [PaTag]::new($entry.name)
32 | }
33 |
34 | $ReturnObject += $Object
35 |
36 | # Add other properties to object
37 | $Object.Comments = $entry.comments
38 | }
39 |
40 | $ReturnObject
41 | }
42 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Get-PaUrlCategory.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaUrlCategory {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaUrlCategory:"
10 | $XPathNode = 'profiles/custom-url-category'
11 | $ResponseNode = 'custom-url-category'
12 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
13 | }
14 |
15 | PROCESS {
16 | # Get the config info for the tag
17 | # This is required for the call to run the tag
18 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
19 | if ($Response.response.result.$ResponseNode) {
20 | $Entries = $Response.response.result.$ResponseNode.entry
21 | } else {
22 | $Entries = $Response.response.result.entry
23 | }
24 |
25 | $ReturnObject = @()
26 | foreach ($entry in $Entries) {
27 | # Initialize object, add to returned array
28 | $Object = [PaUrlCategory]::new($entry.name)
29 | $ReturnObject += $Object
30 |
31 | # Add other properties to object
32 | $Object.Description = [HelperXml]::parseCandidateConfigXml($entry.description, $false)
33 | $Object.Members = [HelperXml]::GetMembersFromXml($entry.list)
34 | }
35 |
36 | $ReturnObject
37 | }
38 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/HighAvailability/Get-PaHaSetup.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaHaSetup {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Get-PaHaSetup:"
8 | $ConfigObject = [PaHaSetup]::new()
9 | $XPathNode = $ConfigObject::XPathNode
10 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $null)
11 | }
12 |
13 | PROCESS {
14 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
15 | $Result = $Response.response.result
16 | $LastXPathNode = ($XPathNode.Split('/'))[-1]
17 | $Result = $Result.$LastXPathNode
18 |
19 | if ([HelperXml]::parseCandidateConfigXml($Result.enabled, $false) -eq 'yes') {
20 | $ConfigObject.Enabled = $true
21 | }
22 |
23 | $ConfigObject.GroupId = [HelperXml]::parseCandidateConfigXml($Result.group.'group-id', $false)
24 | $ConfigObject.Description = [HelperXml]::parseCandidateConfigXml($Result.group.'description', $false)
25 | $ConfigObject.PeerHa1IpAddress = [HelperXml]::parseCandidateConfigXml($Result.group.'peer-ip', $false)
26 | $ConfigObject.BackupPeerHa1IpAddress = [HelperXml]::parseCandidateConfigXml($Result.group.'peer-ip-backup', $false)
27 |
28 | if ([HelperXml]::parseCandidateConfigXml($Result.'configuration-synchronization'.enabled, $false) -eq 'no') {
29 | $ConfigObject.Enabled = $false
30 | }
31 |
32 | if ([HelperXml]::parseCandidateConfigXml($Result.'mode'.'active-active'.'device-id', $false)) {
33 | $ConfigObject.Mode = 'ActiveActive'
34 | $ConfigObject.DeviceId = [HelperXml]::parseCandidateConfigXml($Result.'mode'.'active-active'.'device-id', $false)
35 | }
36 |
37 | $ConfigObject
38 | }
39 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/HighAvailability/New-PaHaSetup.ps1:
--------------------------------------------------------------------------------
1 | function New-PaHaSetup {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $false, ParameterSetName = "activeactive")]
5 | [Parameter(Mandatory = $false, ParameterSetName = "activepassive")]
6 | [switch]$Enabled,
7 |
8 | [Parameter(Mandatory = $true, ParameterSetName = "activeactive")]
9 | [Parameter(Mandatory = $false, ParameterSetName = "activepassive")]
10 | [int]$GroupId,
11 |
12 | [Parameter(Mandatory = $false, ParameterSetName = "activeactive")]
13 | [Parameter(Mandatory = $false, ParameterSetName = "activepassive")]
14 | [string]$Description,
15 |
16 | [Parameter(Mandatory = $false, ParameterSetName = "activeactive")]
17 | [Parameter(Mandatory = $false, ParameterSetName = "activepassive")]
18 | [switch]$EnableConfigSync,
19 |
20 | [Parameter(Mandatory = $true, ParameterSetName = "activeactive")]
21 | [Parameter(Mandatory = $false, ParameterSetName = "activepassive")]
22 | [string]$PeerHa1IpAddress,
23 |
24 | [Parameter(Mandatory = $false, ParameterSetName = "activeactive")]
25 | [Parameter(Mandatory = $false, ParameterSetName = "activepassive")]
26 | [string]$BackupPeerHa1IpAddress,
27 |
28 | # ActiveActive
29 | [Parameter(Mandatory = $true, ParameterSetName = "activeactive")]
30 | [switch]$ActiveActive,
31 |
32 | [Parameter(Mandatory = $true, ParameterSetName = "activeactive")]
33 | [int]$DeviceId
34 | )
35 |
36 | Begin {
37 | $VerbosePrefix = "New-PaHaSetup:"
38 | }
39 |
40 | Process {
41 | }
42 |
43 | End {
44 | $ConfigObject = [PaHaSetup]::new()
45 | $ConfigObject.Enabled = $Enabled
46 | $ConfigObject.GroupId = $GroupId
47 | $ConfigObject.Description = $Description
48 | $ConfigObject.EnableConfigSync = $EnableConfigSync
49 | $ConfigObject.PeerHa1IpAddress = $PeerHa1IpAddress
50 | $ConfigObject.BackupPeerHa1IpAddress = $BackupPeerHa1IpAddress
51 |
52 | # ActiveActive
53 | if ($ActiveActive) {
54 | $ConfigObject.Mode = 'ActiveActive'
55 | $ConfigObject.DeviceId = $DeviceId
56 | }
57 |
58 | $ConfigObject
59 | }
60 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Invoke-PaApiConfig.ps1:
--------------------------------------------------------------------------------
1 | function Invoke-PaApiConfig {
2 | [CmdletBinding(DefaultParameterSetName = 'get')]
3 | Param (
4 | # get parameters
5 | [Parameter(ParameterSetName = "get", Mandatory = $True, Position = 0)]
6 | [switch]$Get,
7 |
8 | # edit parameters
9 | [Parameter(ParameterSetName = "edit", Mandatory = $True, Position = 0)]
10 | [switch]$Edit,
11 |
12 | # set parameters
13 | [Parameter(ParameterSetName = "set", Mandatory = $True, Position = 0)]
14 | [switch]$Set,
15 |
16 | [Parameter(ParameterSetName = "set", Mandatory = $True, Position = 1)]
17 | [Parameter(ParameterSetName = "edit", Mandatory = $True, Position = 1)]
18 | [string]$Element,
19 |
20 | # move parameters
21 | [Parameter(ParameterSetName = "move", Mandatory = $True, Position = 0)]
22 | [switch]$Move,
23 |
24 | [Parameter(ParameterSetName = "move", Mandatory = $True, Position = 2)]
25 | [string]$Location,
26 |
27 | # move parameters
28 | [Parameter(ParameterSetName = "delete", Mandatory = $True, Position = 0)]
29 | [switch]$Delete,
30 |
31 | # all parametersets
32 | [Parameter(Mandatory = $True, Position = 1)]
33 | [string]$XPath
34 | )
35 |
36 | BEGIN {
37 | $VerbosePrefix = "Invoke-PaApiConfig:"
38 | }
39 |
40 | PROCESS {
41 | switch ($PsCmdlet.ParameterSetName) {
42 | 'get' {
43 | $Global:PaDeviceObject.invokeConfigQuery('get', $Xpath)
44 | continue
45 | }
46 | 'set' {
47 | $Global:PaDeviceObject.invokeConfigQuery('set', $Xpath, $Element)
48 | continue
49 | }
50 | 'edit' {
51 | $Global:PaDeviceObject.invokeConfigQuery('edit', $Xpath, $Element)
52 | continue
53 | }
54 | 'move' {
55 | $Global:PaDeviceObject.invokeConfigQuery('move', $Xpath, $Location)
56 | continue
57 | }
58 | 'delete' {
59 | $Global:PaDeviceObject.invokeConfigQuery('delete', $Xpath)
60 | continue
61 | }
62 | }
63 |
64 | }
65 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Invoke-PaApiOperation.ps1:
--------------------------------------------------------------------------------
1 | function Invoke-PaApiOperation {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $True, Position = 0)]
5 | [string]$Cmd
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Invoke-PaApiOperation:"
10 | }
11 |
12 | PROCESS {
13 | $CommandBeingRun = [regex]::split($Cmd, '[<>\/]+') | Select-Object -Unique | Where-Object { $_ -ne "" }
14 | if ($PSCmdlet.ShouldProcess("Running Operational Command: $CommandBeingRun")) {
15 | $global:PaDeviceObject.invokeOperationalQuery($Cmd)
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Invoke-PaApiReport.ps1:
--------------------------------------------------------------------------------
1 | function Invoke-PaApiReport {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $True, Position = 0)]
5 | [string]$ReportType,
6 |
7 | [Parameter(Mandatory = $True, Position = 1)]
8 | [string]$ReportName,
9 |
10 | [Parameter(Mandatory = $True, Position = 2)]
11 | [string]$Cmd
12 | )
13 |
14 | BEGIN {
15 | $VerbosePrefix = "Invoke-PaApiReport:"
16 | }
17 |
18 | PROCESS {
19 | $Global:PaDeviceObject.invokeReportQuery($ReportType, $ReportName, $Cmd)
20 | }
21 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Invoke-PaCommit.ps1:
--------------------------------------------------------------------------------
1 | function Invoke-PaCommit {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $False)]
5 | [switch]$Force,
6 |
7 | [Parameter(Mandatory = $False)]
8 | [switch]$Wait,
9 |
10 | [Parameter(Mandatory = $False)]
11 | [switch]$ShowProgress
12 | )
13 |
14 | BEGIN {
15 | $VerbosePrefix = "Invoke-PaCommit:"
16 | $Cmd = ''
17 | if ($Force) {
18 | $Cmd += ''
19 | }
20 | $Cmd += ''
21 | }
22 |
23 | PROCESS {
24 | $CommandBeingRun = [regex]::split($Cmd, '[<>\/]+') | Select-Object -Unique | Where-Object { $_ -ne "" }
25 | if ($PSCmdlet.ShouldProcess("Running Operational Command: $CommandBeingRun")) {
26 | $Response = $global:PaDeviceObject.invokeCommitQuery($Cmd)
27 | if ($Wait -or $ShowProgress) {
28 | Get-PaJob -JobId $Response.response.result.job -Wait:$Wait -ShowProgress:$ShowProgress
29 | }
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Invoke-PaCustomReport.ps1:
--------------------------------------------------------------------------------
1 | function Invoke-PaCustomReport {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $True, Position = 0)]
5 | [string]$Name,
6 |
7 | [Parameter(Mandatory = $False)]
8 | [switch]$ShowProgress
9 | )
10 |
11 | BEGIN {
12 | $VerbosePrefix = "Invoke-PaCustomReport:"
13 |
14 | $VerbosePrefix = "Get-PaAddress:"
15 | $XPathNode = 'reports'
16 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
17 | }
18 |
19 | PROCESS {
20 | # Get the config info for the report
21 | # This is required for the call to run the report
22 | $ReportConfig = Invoke-PaApiConfig -Get -Xpath $Xpath
23 | if ($ReportConfig.response.result -eq "") {
24 | Throw "$VerbosePrefix Report not found: $Name"
25 | }
26 |
27 | # Extract the required xml
28 | $ReportXml = $ReportConfig.response.result.entry.InnerXml
29 |
30 | # Initiate the Report Job
31 | $ReportParams = @{}
32 | $ReportParams.ReportType = 'dynamic'
33 | $ReportParams.ReportName = $Name
34 | $ReportParams.Cmd = $ReportXml
35 | $ReportResults = Invoke-PaApiReport @ReportParams
36 | $JobId = $ReportResults.response.result.job
37 |
38 | # https:///api/?type=report&action=get&job-id=jobid
39 |
40 | $GetJob = Get-PaReportJob -JobId $JobId -Wait -ShowProgress:$ShowProgress
41 |
42 | return $GetJob
43 | }
44 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/New-PaAddress.ps1:
--------------------------------------------------------------------------------
1 | function New-PaAddress {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ParameterSetName = "name", Mandatory = $True, Position = 0)]
5 | [string]$Name,
6 |
7 | [Parameter(ParameterSetName = "name", Mandatory = $False)]
8 | [string]$Description,
9 |
10 | [Parameter(ParameterSetName = "name", Mandatory = $False)]
11 | [ValidateSet('Fqdn', 'IpNetmask', 'IpRange')]
12 | [string]$Type,
13 |
14 | [Parameter(ParameterSetName = "name", Mandatory = $False)]
15 | [string]$Value,
16 |
17 | [Parameter(ParameterSetName = "name", Mandatory = $False)]
18 | [string[]]$Tag
19 | )
20 |
21 | Begin {
22 | $VerbosePrefix = "New-PaAddress:"
23 |
24 | # type map
25 | $TypeMap = @{
26 | Fqdn = 'fqdn'
27 | IpNetmask = 'ip-netmask'
28 | IpRange = 'ip-range'
29 | }
30 |
31 | $ReturnObject = [PaAddress]::new($Name)
32 | $ReturnObject.Description = $Description
33 | $ReturnObject.Value = $Value
34 | $ReturnObject.Tags = $Tag
35 |
36 | if ($Type) {
37 | $ReturnObject.Type = $TypeMap.$Type
38 | }
39 | }
40 |
41 | Process {
42 | }
43 |
44 | End {
45 | $ReturnObject
46 | }
47 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/New-PaSecurityPolicy.ps1:
--------------------------------------------------------------------------------
1 | function New-PaSecurityPolicy {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ParameterSetName = "name", Mandatory = $True, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | Begin {
9 | $VerbosePrefix = "New-PaSecurityPolicy:"
10 | }
11 |
12 | Process {
13 | }
14 |
15 | End {
16 | [PaSecurityPolicy]::new($Name)
17 | }
18 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/New-PaTag.ps1:
--------------------------------------------------------------------------------
1 | function New-PaTag {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $True, Position = 0)]
5 | [string]$Name,
6 |
7 | [Parameter(Mandatory = $False, Position = 1)]
8 | [ValidateSet('Red', 'Green', 'Blue', 'Yellow', 'Copper', 'Orange', 'Purple', 'Gray', 'Light Green', 'Cyan', 'Light Gray', 'Blue Gray', 'Lime', 'Black', 'Gold', 'Brown', 'Green')]
9 | [string]$Color,
10 |
11 | [Parameter(Mandatory = $False, Position = 2)]
12 | [string]$Comments
13 | )
14 |
15 | BEGIN {
16 | }
17 |
18 | PROCESS {
19 |
20 | if ($Color) {
21 | Write-Verbose "Color specified: $Color"
22 | $ConfigObject = [PaTag]::new($Name, $Color)
23 | } else {
24 | $ConfigObject = [PaTag]::new($Name)
25 | }
26 |
27 | $ConfigObject.Comments = $Comments
28 |
29 | return $ConfigObject
30 | }
31 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaCertificate/Get-PaCertificate.ps1:
--------------------------------------------------------------------------------
1 | <# function Get-PaCertificate {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Get-PaCertificate:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaCertificate/New-PaCertificate.ps1:
--------------------------------------------------------------------------------
1 | <# function New-PaCertificate {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "New-PaCertificate:"
8 | }
9 |
10 | PROCESS {
11 | $ReturnObject = [PaCertificate]::new()
12 | }
13 |
14 | END {
15 | $ReturnObject
16 | }
17 | }
18 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaCertificate/Remove-PaCertificate.ps1:
--------------------------------------------------------------------------------
1 | <# function Remove-PaCertificate {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Remove-PaCertificate:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaCertificate/Set-PaCertificate.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaCertificate {
2 | [CmdletBinding()]
3 | Param (
4 | [parameter(Mandatory=$True,Position=0)]
5 | [String]$CertificateName,
6 |
7 | [parameter(Mandatory=$True,Position=1)]
8 | [String]$CertificateFile,
9 |
10 | [parameter(Mandatory=$True,Position=2)]
11 | [String]$CertificatePassphrase
12 | )
13 |
14 | BEGIN {
15 | $VerbosePrefix = "Set-PaCertificate:"
16 | function New-MultipartFileContent {
17 | [OutputType('System.Net.Http.MultipartFormDataContent')]
18 | [CmdletBinding()]
19 | param(
20 | [Parameter(Mandatory)]
21 | [System.IO.FileInfo]$File,
22 | [string]$HeaderName='file'
23 | )
24 |
25 | # build the header and make sure to include quotes around Name
26 | # and FileName like https://github.com/PowerShell/PowerShell/pull/6782)
27 | $fileHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new('form-data')
28 | $fileHeader.Name = "`"$HeaderName`""
29 | $fileHeader.FileName = "`"$($File.Name)`""
30 |
31 | # build the content
32 | $fs = [System.IO.FileStream]::new($File.FullName, [System.IO.FileMode]::Open)
33 | $fileContent = [System.Net.Http.StreamContent]::new($fs)
34 | $fileContent.Headers.ContentDisposition = $fileHeader
35 | $fileContent.Headers.ContentType = [System.Net.Http.Headers.MediaTypeHeaderValue]::Parse('application/octet-stream')
36 |
37 | # add it to a new MultipartFormDataContent object
38 | $mp = [System.Net.Http.MultipartFormDataContent]::new()
39 | $mp.Add($fileContent)
40 |
41 | # get rid of the quotes around the boundary value
42 | # https://github.com/PowerShell/PowerShell/issues/9241
43 | $b = $mp.Headers.ContentType.Parameters | Where-Object { $_.Name -eq 'boundary' }
44 | $b.Value = $b.Value.Trim('"')
45 |
46 | # return an array wrapped copy of the object to avoid PowerShell unrolling
47 | return @(,$mp)
48 | }
49 |
50 | }
51 |
52 | PROCESS {
53 | $BodyLines = New-MultipartFileContent -File $CertificateFile
54 | $QueryString = @{}
55 | $QueryString.type = 'import'
56 | $QueryString.category = 'keypair'
57 | $QueryString.'certificate-name' = $CertificateName
58 | $QueryString.'format' = 'pkcs12'
59 | $QueryString.'passphrase' = $CertificatePassphrase
60 |
61 | $ReturnObject = $Global:PaDeviceObject.invokeApiQuery($QueryString, 'POST', $BodyLines)
62 | }
63 |
64 | END {
65 | $ReturnObject
66 | }
67 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaDeviceGroup/Get-PaDeviceGroup.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaDeviceGroup {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaDeviceGroup:"
10 | $XPathNode = 'device-group'
11 | $ResultNode = 'device-group'
12 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
13 | }
14 |
15 | PROCESS {
16 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
17 | if ($Response.response.result.$ResultNode) {
18 | $Entries = $Response.response.result.$ResultNode.entry
19 | } else {
20 | $Entries = $Response.response.result.entry
21 | }
22 |
23 | $ReturnObject = @()
24 | foreach ($entry in $Entries) {
25 | # Initialize Report object, add to returned array
26 | $Object = [PaDeviceGroup]::new($entry.name)
27 | $ReturnObject += $Object
28 |
29 | $Object.Description = [HelperXml]::parseCandidateConfigXml($entry.description, $false)
30 | foreach ($device in $entry.devices.entry) {
31 | $Object.Device += [HelperXml]::parseCandidateConfigXml($device.name, $false)
32 | }
33 | }
34 |
35 | $ReturnObject
36 | }
37 |
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaDeviceGroup/New-PaDeviceGroup.ps1:
--------------------------------------------------------------------------------
1 | function New-PaDeviceGroup {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "New-PaDeviceGroup:"
8 | }
9 |
10 | PROCESS {
11 | $ReturnObject = [PaDeviceGroup]::new()
12 | }
13 |
14 | END {
15 | $ReturnObject
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaDeviceGroup/Remove-PaDeviceGroup.ps1:
--------------------------------------------------------------------------------
1 | <# function Remove-PaDeviceGroup {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Remove-PaDeviceGroup:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaDeviceGroup/Set-PaDeviceGroup.ps1:
--------------------------------------------------------------------------------
1 | <# function Set-PaDeviceGroup {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Set-PaDeviceGroup:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGateway/Clear-PaIkeGateway.ps1:
--------------------------------------------------------------------------------
1 | function Clear-PaIkeGateway {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Clear-PaIkeGateway:"
10 | }
11 |
12 | PROCESS {
13 | $Cmd = "$Name"
14 |
15 | $CommandBeingRun = [regex]::split($Cmd, '[<>\/]+') | Select-Object -Unique | Where-Object { $_ -ne "" }
16 | if ($PSCmdlet.ShouldProcess("Running Operational Command: $CommandBeingRun")) {
17 | $Query = Invoke-PaApiOperation -Cmd $Cmd
18 | $Results = $Query.response.result
19 | }
20 | }
21 |
22 | END {
23 | $Results.member
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGateway/Get-PaIkeGateway.ps1:
--------------------------------------------------------------------------------
1 | <# function Get-PaIkeGateway {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Get-PaIkeGateway:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGateway/New-PaIkeGateway.ps1:
--------------------------------------------------------------------------------
1 | function New-PaIkeGateway {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "New-PaIkeGateway:"
8 | }
9 |
10 | PROCESS {
11 | $ReturnObject = [PaIkeGateway]::new()
12 | }
13 |
14 | END {
15 | $ReturnObject
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGateway/Remove-PaIkeGateway.ps1:
--------------------------------------------------------------------------------
1 | <# function Remove-PaIkeGateway {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Remove-PaIkeGateway:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGateway/Set-PaIkeGateway.ps1:
--------------------------------------------------------------------------------
1 | <# function Set-PaIkeGateway {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Set-PaIkeGateway:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGateway/Test-PaIkeGateway.ps1:
--------------------------------------------------------------------------------
1 | function Test-PaIkeGateway {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Test-PaIkeGateway:"
10 | }
11 |
12 | PROCESS {
13 | $Cmd = "$Name"
14 |
15 | $CommandBeingRun = [regex]::split($Cmd, '[<>\/]+') | Select-Object -Unique | Where-Object { $_ -ne "" }
16 | if ($PSCmdlet.ShouldProcess("Running Operational Command: $CommandBeingRun")) {
17 | $Query = Invoke-PaApiOperation -Cmd $Cmd
18 | $Results = $Query.response.result
19 | }
20 | }
21 |
22 | END {
23 | $Results.member
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGatewayConfig/Get-PaIkeGatewayConfig.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaIkeGatewayConfig {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaIkeGatewayConfig:"
10 | $XPathNode = 'network/ike/gateway'
11 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
12 | }
13 |
14 | PROCESS {
15 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
16 | if ($Response.response.result.$XPathNode) {
17 | $Entries = $Response.response.result.$XPathNode.entry
18 | } else {
19 | $Entries = $Response.response.result.entry
20 | }
21 |
22 | $ReturnObject = @()
23 | foreach ($entry in $Entries) {
24 | # Initialize Report object, add to returned array
25 | $Object = New-PaIkeGatewayConfig -Name $Name
26 | $ReturnObject += $Object
27 |
28 | [string]$Interface
29 | [string]$LocalIPAddress
30 |
31 | [string]$PeerIpAddress
32 |
33 | if ($entry.protocol.ikev2.'ike-crypto-profile') {
34 | $Object.IkeV2Enabled = $true
35 | $Object.IkeCryptoProfile = $entry.protocol.ikev2.'ike-crypto-profile'
36 | }
37 |
38 | if ($entry.protocol.ikev1.'ike-crypto-profile') {
39 | $Object.IkeV1Enabled = $true
40 | $Object.IkeCryptoProfile = $entry.protocol.ikev1.'ike-crypto-profile'
41 | }
42 |
43 | $Object.Interface = [HelperXml]::parseCandidateConfigXml($entry.'local-address'.interface, $false)
44 | $Object.LocalIPAddress = [HelperXml]::parseCandidateConfigXml($entry.'local-address'.ip, $false)
45 |
46 | $Object.PeerIpAddress = [HelperXml]::parseCandidateConfigXml($entry.'peer-address'.ip, $false)
47 | }
48 |
49 | $ReturnObject
50 | }
51 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGatewayConfig/New-PaIkeGatewayConfig.ps1:
--------------------------------------------------------------------------------
1 | function New-PaIkeGatewayConfig {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "New-PaIkeGatewayConfig:"
10 | }
11 |
12 | PROCESS {
13 | $ReturnObject = [PaIkeGatewayConfig]::new()
14 |
15 | if ($Name) {
16 | $ReturnObject.Name = $Name
17 | }
18 | }
19 |
20 | END {
21 | $ReturnObject
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGatewayConfig/Remove-PaIkeGatewayConfig.ps1:
--------------------------------------------------------------------------------
1 | <# function Remove-PaIkeGatewayConfig {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Remove-PaIkeGatewayConfig:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIkeGatewayConfig/Set-PaIkeGatewayConfig.ps1:
--------------------------------------------------------------------------------
1 | <# function Set-PaIkeGatewayConfig {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Set-PaIkeGatewayConfig:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnel/Clear-PaIpsecTunnel.ps1:
--------------------------------------------------------------------------------
1 | function Clear-PaIpsecTunnel {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Clear-PaIpsecTunnel:"
10 | }
11 |
12 | PROCESS {
13 | $Cmd = "$Name"
14 |
15 | $CommandBeingRun = [regex]::split($Cmd, '[<>\/]+') | Select-Object -Unique | Where-Object { $_ -ne "" }
16 | if ($PSCmdlet.ShouldProcess("Running Operational Command: $CommandBeingRun")) {
17 | $Query = Invoke-PaApiOperation -Cmd $Cmd
18 | $Results = $Query.response.result
19 | }
20 | }
21 |
22 | END {
23 | $Results.member
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnel/Get-PaIpsecTunnel.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaIpsecTunnel {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaIpsecTunnel:"
10 | $ReturnObject = @()
11 | }
12 |
13 | PROCESS {
14 | $Cmd = "$Name"
15 |
16 | $CommandBeingRun = [regex]::split($Cmd, '[<>\/]+') | Select-Object -Unique | Where-Object { $_ -ne "" }
17 | if ($PSCmdlet.ShouldProcess("Running Operational Command: $CommandBeingRun")) {
18 | $Response = Invoke-PaApiOperation -Cmd $Cmd
19 | }
20 |
21 | $Entries = $Response.response.result.entries.entry
22 |
23 | foreach ($entry in $Entries) {
24 | # Initialize Report object, add to returned array
25 | $Object = New-PaIpsecTunnel
26 | $ReturnObject += $Object
27 |
28 | $Object.Name = $entry.Name
29 | $Object.Id = $entry.gwid
30 | $Object.PeerIp = $entry.remote
31 | $Object.TunnelInterface = $entry.tid
32 |
33 | }
34 | }
35 |
36 | END {
37 | $ReturnObject
38 | }
39 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnel/New-PaIpsecTunnel.ps1:
--------------------------------------------------------------------------------
1 | function New-PaIpsecTunnel {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "New-PaIpsecTunnel:"
8 | }
9 |
10 | PROCESS {
11 | $ReturnObject = [PaIpsecTunnel]::new()
12 | }
13 |
14 | END {
15 | $ReturnObject
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnel/Remove-PaIpsecTunnel.ps1:
--------------------------------------------------------------------------------
1 | <# function Remove-PaIpsecTunnel {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Remove-PaIpsecTunnel:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnel/Restart-PaIpsecTunnel.ps1:
--------------------------------------------------------------------------------
1 | function Restart-PaIpsecTunnel {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Restart-PaIpsecTunnel:"
10 | }
11 |
12 | PROCESS {
13 | $IpsecConfig = Get-PaIpsecTunnelConfig -Name $Name
14 |
15 | if ($IpsecConfig) {
16 | $IkeConfig = Get-PaIkeGatewayConfig -Name $IpsecConfig.IkeGateway
17 |
18 | # Clear each IPSEC connection
19 | if ($IpsecConfig.ProxyId.Count -gt 0) {
20 | foreach ($proxyid in $IpsecConfig.ProxyId) {
21 | $ThisTunnelName = $Name + ':' + $proxyid.Name
22 | Clear-PaIpsecTunnel -Name $ThisTunnelName
23 | }
24 | } else {
25 | Clear-PaIpsecTunnel -Name $Name
26 | }
27 |
28 | # Clear IKE connection
29 | Clear-PaIkeGateway -Name $IpsecConfig.IkeGateway
30 |
31 | Test-PaIkeGateway -Name $Name
32 | foreach ($proxyid in $IpsecConfig.ProxyId) {
33 | $ThisTunnelName = $Name + ':' + $proxyid.Name
34 | Test-PaIpsecTunnel -Name $ThisTunnelName
35 | }
36 | } else {
37 | Throw "No Ipsec Tunnel found with Name: $Name"
38 | }
39 | }
40 |
41 | END {
42 | }
43 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnel/Set-PaIpsecTunnel.ps1:
--------------------------------------------------------------------------------
1 | <# function Set-PaIpsecTunnel {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Set-PaIpsecTunnel:"
8 | }
9 |
10 | PROCESS {
11 | }
12 |
13 | END {
14 | }
15 | }
16 | #>
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnel/Test-PaIpsecTunnel.ps1:
--------------------------------------------------------------------------------
1 | function Test-PaIpsecTunnel {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Test-PaIpsecTunnel:"
10 | }
11 |
12 | PROCESS {
13 | $Cmd = "$Name"
14 |
15 | $CommandBeingRun = [regex]::split($Cmd, '[<>\/]+') | Select-Object -Unique | Where-Object { $_ -ne "" }
16 | if ($PSCmdlet.ShouldProcess("Running Operational Command: $CommandBeingRun")) {
17 | $Query = Invoke-PaApiOperation -Cmd $Cmd
18 | $Results = $Query.response.result
19 | }
20 | }
21 |
22 | END {
23 | $Results.member
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnelConfig/Get-PaIpsecTunnelConfig.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaIpsecTunnelConfig {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $False, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | $VerbosePrefix = "Get-PaIpsecTunnelConfig:"
10 | $XPathNode = 'network/tunnel/ipsec'
11 | $ResultNode = 'ipsec'
12 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $Name)
13 | }
14 |
15 | PROCESS {
16 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
17 | if ($Response.response.result.$ResultNode) {
18 | $Entries = $Response.response.result.$ResultNode.entry
19 | } else {
20 | $Entries = $Response.response.result.entry
21 | }
22 |
23 | $ReturnObject = @()
24 | foreach ($entry in $Entries) {
25 | # Initialize Report object, add to returned array
26 | $Object = [PaIpsecTunnelConfig]::new($entry.name)
27 | $ReturnObject += $Object
28 |
29 | # disabled
30 | $Disabled = [HelperXml]::parseCandidateConfigXml($entry.disabled, $false)
31 | if ($Disabled -eq 'yes') {
32 | $Object.Disabled = $true
33 | }
34 |
35 | # Add other properties
36 | $Object.IkeGateway = [HelperXml]::parseCandidateConfigXml($entry.'auto-key'.'ike-gateway'.entry.name, $false)
37 | $Object.IpsecCryptoProfile = [HelperXml]::parseCandidateConfigXml($entry.'auto-key'.'ipsec-crypto-profile', $false)
38 | $Object.TunnelInterface = [HelperXml]::parseCandidateConfigXml($entry.'tunnel-interface', $false)
39 |
40 | foreach ($proxyid in $entry.'auto-key'.'proxy-id'.entry) {
41 | $NewProxyId = [PaProxyId]::new($proxyid.name)
42 | $NewProxyId.LocalNetwork = $proxyid.local
43 | $NewProxyId.RemoteNetwork = $proxyid.remote
44 |
45 | $Object.ProxyId += $NewProxyId
46 | }
47 | }
48 |
49 | $ReturnObject
50 | }
51 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaIpsecTunnelConfig/Test-PaVpn.ps1:
--------------------------------------------------------------------------------
1 | function Test-PaVpn {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $true,Position = 0)]
5 | [string]$TunnelName,
6 |
7 | [Parameter(Mandatory = $False)]
8 | [switch]$ExcludeIke,
9 |
10 | [Parameter(Mandatory = $False)]
11 | [switch]$ExcludeIpsec,
12 |
13 | [Parameter(Mandatory = $False)]
14 | [string[]]$ProxyId
15 | )
16 |
17 | BEGIN {
18 | $VerbosePrefix = "Test-PaVpn:"
19 | $CMD = "$TunnelName"
20 | }
21 |
22 | PROCESS {
23 | $CommandBeingRun = [regex]::split($Cmd, '[<>\/]+') | Select-Object -Unique | Where-Object { $_ -ne "" }
24 | if ($PSCmdlet.ShouldProcess("Running Operational Command: $CommandBeingRun")) {
25 | $Response = $global:PaDeviceObject.invokeCommitQuery($Cmd)
26 | if ($Wait -or $ShowProgress) {
27 | Get-PaJob -JobId $Response.response.result.job -Wait:$Wait -ShowProgress:$ShowProgress
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaPanoramaConfig/Get-PaPanoramaConfig.ps1:
--------------------------------------------------------------------------------
1 | function Get-PaPanoramaConfig {
2 | [CmdletBinding()]
3 | Param (
4 | )
5 |
6 | BEGIN {
7 | $VerbosePrefix = "Get-PaPanoramaConfig:"
8 | $ConfigObject = [PaPanoramaConfig]::new()
9 | $XPathNode = $ConfigObject::XPathNode
10 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $null)
11 | }
12 |
13 | PROCESS {
14 | $Response = Invoke-PaApiConfig -Get -Xpath $XPath
15 | $Result = $Response.response.result.$XPathNode
16 |
17 | $ConfigObject.PrimaryServer = [HelperXml]::parseCandidateConfigXml($Result.system.'panorama-server', $false)
18 | $ConfigObject.SecondaryServer = [HelperXml]::parseCandidateConfigXml($Result.system.'panorama-server-2', $false)
19 | $ConfigObject.ReceiveTimeout = [HelperXml]::parseCandidateConfigXml($Result.setting.'management'.'panorama-tcp-receive-timeout', $false)
20 | $ConfigObject.SendTimeout = [HelperXml]::parseCandidateConfigXml($Result.setting.'management'.'panorama-tcp-send-timeout', $false)
21 | $ConfigObject.RetryCount = [HelperXml]::parseCandidateConfigXml($Result.setting.'management'.'panorama-ssl-send-retries', $false)
22 |
23 | $DeviceMonitoring = [HelperXml]::parseCandidateConfigXml($Result.setting.'management'.'device-monitoring'.enabled, $false)
24 |
25 | if ($DeviceMonitoring -eq 'no') {
26 | $ConfigObject.EnableDeviceMonitoring = $false
27 | } else {
28 | $ConfigObject.EnableDeviceMonitoring = $true
29 | }
30 |
31 | $ConfigObject
32 | }
33 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaPanoramaConfig/New-PaPanoramaConfig.ps1:
--------------------------------------------------------------------------------
1 | function New-PaPanoramaConfig {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $false)]
5 | [string]$PrimaryServer,
6 |
7 | [Parameter(Mandatory = $false)]
8 | [string]$SecondaryServer,
9 |
10 | [Parameter(Mandatory = $false)]
11 | [int]$ReceiveTimeout = 240,
12 |
13 | [Parameter(Mandatory = $false)]
14 | [int]$SendTimeout = 240,
15 |
16 | [Parameter(Mandatory = $false)]
17 | [int]$RetryCount = 25,
18 |
19 | [Parameter(Mandatory = $false)]
20 | [switch]$DisableDeviceMonitoring
21 | )
22 |
23 | Begin {
24 | $VerbosePrefix = "New-PaPanoramaConfig:"
25 | }
26 |
27 | Process {
28 | }
29 |
30 | End {
31 | $ConfigObject = [PaPanoramaConfig]::new()
32 | $ConfigObject.PrimaryServer = $PrimaryServer
33 | $ConfigObject.SecondaryServer = $SecondaryServer
34 | $ConfigObject.ReceiveTimeout = $ReceiveTimeout
35 | $ConfigObject.SendTimeout = $SendTimeout
36 | $ConfigObject.RetryCount = $RetryCount
37 |
38 | if ($DisableDeviceMonitoring) {
39 | $ConfigObject.EnableDeviceMonitoring = $false
40 | }
41 |
42 | $ConfigObject
43 | }
44 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/PaPanoramaConfig/Set-PaPanoramaConfig.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaPanoramaConfig {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $false, ParameterSetName = "noclass")]
5 | [string]$PrimaryServer,
6 |
7 | [Parameter(Mandatory = $false, ParameterSetName = "noclass")]
8 | [string]$SecondaryServer,
9 |
10 | [Parameter(Mandatory = $false, ParameterSetName = "noclass")]
11 | [int]$ReceiveTimeout = 240,
12 |
13 | [Parameter(Mandatory = $false, ParameterSetName = "noclass")]
14 | [int]$SendTimeout = 240,
15 |
16 | [Parameter(Mandatory = $false, ParameterSetName = "noclass")]
17 | [int]$RetryCount = 25,
18 |
19 | [Parameter(Mandatory = $false, ParameterSetName = "noclass")]
20 | [switch]$DisableDeviceMonitoring,
21 |
22 | [Parameter(Mandatory = $true, ValueFromPipeline = $true, ParameterSetName = "class")]
23 | [PaPanoramaConfig]$PaPanoramaConfig
24 | )
25 |
26 | Begin {
27 | $VerbosePrefix = "New-PaPanoramaConfig:"
28 | }
29 |
30 | Process {
31 | $ConfigObject = $PaPanoramaConfig
32 | }
33 |
34 | End {
35 | switch ($PsCmdlet.ParameterSetName) {
36 | 'noclass' {
37 | # Setup New Item
38 | $Params = @{
39 | PrimaryServer = $PrimaryServer
40 | SecondaryServer = $SecondaryServer
41 | ReceiveTimeout = $ReceiveTimeout
42 | SendTimeout = $SendTimeout
43 | RetryCount = $RetryCount
44 | DisableDeviceMonitoring = $DisableDeviceMonitoring
45 | }
46 | $ConfigObject = New-PaPanoramaConfig @Params
47 | }
48 | }
49 |
50 | $ShouldProcessMessage = "Adding Panorama Configuration to PaDevice $($global:PaDeviceObject.Name)`r`n"
51 | $ShouldProcessMessage += "PrimaryServer: $($ConfigObject.PrimaryServer)`r`n"
52 | $ShouldProcessMessage += "SecondaryServer: $($ConfigObject.SecondaryServer)`r`n"
53 | $ShouldProcessMessage += "ReceiveTimeout: $($ConfigObject.ReceiveTimeout)`r`n"
54 | $ShouldProcessMessage += "SendTimeout: $($ConfigObject.SendTimeout)`r`n"
55 | $ShouldProcessMessage += "RetryCount: $($ConfigObject.RetryCount)`r`n"
56 | $ShouldProcessMessage += "EnableDeviceMonitoring: $($ConfigObject.EnableDeviceMonitoring)`r`n"
57 |
58 | $XPathNode = $ConfigObject::XPathNode
59 |
60 | $ElementXml = $ConfigObject.ToXml().deviceconfig.InnerXml
61 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $null)
62 | $ShouldProcessMessage += "XPath: $XPath"
63 |
64 | if ($PSCmdlet.ShouldProcess($ShouldProcessMessage)) {
65 | $Set = Invoke-PaApiConfig -Set -Xpath $XPath -Element $ElementXml
66 |
67 | $Set
68 | }
69 | }
70 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Remove-PaAddress.ps1:
--------------------------------------------------------------------------------
1 | function Remove-PaAddress {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ParameterSetName = "name", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
5 | [string]$Name,
6 |
7 | [Parameter(ParameterSetName = "paobject", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
8 | [PaAddress]$PaAddress
9 | )
10 |
11 | BEGIN {
12 | }
13 |
14 | PROCESS {
15 | switch ($PsCmdlet.ParameterSetName) {
16 | 'name' {
17 | $ConfigObject = [PaAddress]::new($Name)
18 | continue
19 | }
20 | 'paobject' {
21 | $ConfigObject = $PaAddress
22 | continue
23 | }
24 | }
25 |
26 | $Xpath = $Global:PaDeviceObject.createXPath('address', $ConfigObject.Name)
27 |
28 | if ($PSCmdlet.ShouldProcess("Creating new rule: $($ConfigObject.Name)")) {
29 | $Delete = Invoke-PaApiConfig -Delete -Xpath $XPath
30 |
31 | $Delete
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Remove-PaAddressGroup.ps1:
--------------------------------------------------------------------------------
1 | function Remove-PaAddressGroup {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ParameterSetName = "name", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
5 | [string]$Name,
6 |
7 | [Parameter(ParameterSetName = "paobject", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
8 | [PaAddressGroup]$PaAddressGroup
9 | )
10 |
11 | BEGIN {
12 | }
13 |
14 | PROCESS {
15 | switch ($PsCmdlet.ParameterSetName) {
16 | 'name' {
17 | $ConfigObject = [PaAddressGroup]::new($Name)
18 | continue
19 | }
20 | 'paobject' {
21 | $ConfigObject = $PaAddressGroup
22 | continue
23 | }
24 | }
25 |
26 | $Xpath = $Global:PaDeviceObject.createXPath('address-group', $ConfigObject.Name)
27 |
28 | if ($PSCmdlet.ShouldProcess("Creating new rule: $($ConfigObject.Name)")) {
29 | $Delete = Invoke-PaApiConfig -Delete -Xpath $XPath
30 |
31 | $Delete
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Remove-PaSecurityPolicy.ps1:
--------------------------------------------------------------------------------
1 | function Remove-PaSecurityPolicy {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ParameterSetName = "name", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
5 | [string]$Name,
6 |
7 | [Parameter(ParameterSetName = "paobject", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
8 | [PaSecurityPolicy]$PaSecurityPolicy
9 | )
10 |
11 | BEGIN {
12 | }
13 |
14 | PROCESS {
15 | switch ($PsCmdlet.ParameterSetName) {
16 | 'name' {
17 | $ConfigObject = [PaSecurityPolicy]::new($Name)
18 | continue
19 | }
20 | 'paobject' {
21 | $ConfigObject = $PaSecurityPolicy
22 | continue
23 | }
24 | }
25 |
26 | $Xpath = $Global:PaDeviceObject.createXPath('rulebase/security/rules', $ConfigObject.Name)
27 |
28 | if ($PSCmdlet.ShouldProcess("Creating new rule: $($ConfigObject.Name)")) {
29 | $Delete = Invoke-PaApiConfig -Delete -Xpath $XPath
30 |
31 | $Delete
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Remove-PaTag.ps1:
--------------------------------------------------------------------------------
1 | function Remove-PaTag {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ParameterSetName = "name", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
5 | [string]$Name,
6 |
7 | [Parameter(ParameterSetName = "paobject", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
8 | [PaTag]$PaTag
9 | )
10 |
11 | BEGIN {
12 | }
13 |
14 | PROCESS {
15 | switch ($PsCmdlet.ParameterSetName) {
16 | 'name' {
17 | $ConfigObject = [PaTag]::new($Name)
18 | continue
19 | }
20 | 'paobject' {
21 | $ConfigObject = $PaTag
22 | continue
23 | }
24 | }
25 |
26 | $Xpath = $Global:PaDeviceObject.createXPath('tag', $ConfigObject.Name)
27 |
28 | if ($PSCmdlet.ShouldProcess("Creating new rule: $($ConfigObject.Name)")) {
29 | $Delete = Invoke-PaApiConfig -Delete -Xpath $XPath
30 |
31 | $Delete
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Resolve-PaAddress.ps1:
--------------------------------------------------------------------------------
1 | function Resolve-PaAddress {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
5 | [string]$Name,
6 |
7 | [Parameter(Mandatory = $False, Position = 1)]
8 | [PaAddress[]]$Addresses = (Get-PaAddress),
9 |
10 | [Parameter(Mandatory = $False, Position = 2)]
11 | [PaAddressGroup[]]$AddressGroups = (Get-PaAddressGroup)
12 | )
13 |
14 | Begin {
15 | $VerbosePrefix = "Resolve-PaAddress:"
16 | $ReturnObject = @()
17 |
18 | $ReturnSameValue = @(
19 | 'any'
20 | )
21 | }
22 |
23 | Process {
24 | Write-Verbose "$VerbosePrefix $Name"
25 | $GroupLookup = $AddressGroups | Where-Object { $_.Name -eq $Name }
26 | Write-Verbose "$VerbosePrefix $($GroupLookup.Count)"
27 | $AddressLookup = $Addresses | Where-Object { $_.Name -eq $Name }
28 | Write-Verbose "$VerbosePrefix $($AddressLookup.Count)"
29 |
30 | if ($GroupLookup) {
31 | $ReturnObject += $GroupLookup.Member | Resolve-PaAddress -Addresses $Addresses -AddressGroups $AddressGroups
32 | } elseif ($AddressLookup) {
33 | $ReturnObject += $AddressLookup.Value
34 | } elseif ($ReturnSameValue -contains $Name) {
35 | $ReturnObject += $Name
36 | } elseif ([HelperRegex]::isFqdnOrIpv4($Name, $true) -or [HelperRegex]::isIpv4Range($Name, $true)) {
37 | $ReturnObject += $Name
38 | } elseif ($Name -cmatch '[A-Z]{2}') {
39 | # match region
40 | $ReturnObject += $Name
41 | } else {
42 | Throw "$VerbosePrefix Could not find address: $Name"
43 | }
44 | }
45 |
46 | End {
47 | $ReturnObject
48 | }
49 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Resolve-PaNatPolicy.ps1:
--------------------------------------------------------------------------------
1 | function Resolve-PaNatPolicy {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
5 | [PaNatPolicy]$PaNatPolicy,
6 |
7 | [Parameter(Mandatory = $False, Position = 1)]
8 | [PaAddress[]]$Addresses = (Get-PaAddress),
9 |
10 | [Parameter(Mandatory = $False, Position = 2)]
11 | [PaAddressGroup[]]$AddressGroups = (Get-PaAddressGroup),
12 |
13 | [Parameter(Mandatory = $False, Position = 3)]
14 | [PaService[]]$Services = (Get-PaService),
15 |
16 | [Parameter(Mandatory = $False, Position = 4)]
17 | [PaServiceGroup[]]$ServiceGroups = (Get-PaServiceGroup)
18 | )
19 |
20 | Begin {
21 | $VerbosePrefix = "Resolve-PaNatPolicy:"
22 | $ReturnObject = @()
23 | }
24 |
25 | Process {
26 | # Addresses
27 | $ResolvedPolicy = $PaNatPolicy | Resolve-PaField -Addresses $Addresses -AddressGroups $AddressGroups -FieldName SourceAddress
28 | $ResolvedPolicy = $ResolvedPolicy | Resolve-PaField -Addresses $Addresses -AddressGroups $AddressGroups -FieldName DestinationAddress
29 |
30 | # Translated Addresses
31 | $ResolvedPolicy = $ResolvedPolicy | Resolve-PaField -Addresses $Addresses -AddressGroups $AddressGroups -FieldName SourceTranslatedAddress
32 | $ResolvedPolicy = $ResolvedPolicy | Resolve-PaField -Addresses $Addresses -AddressGroups $AddressGroups -FieldName TranslatedDestinationAddress
33 |
34 | # Service
35 | $ResolvedPolicy = $ResolvedPolicy | Resolve-PaField -Services $Services -ServiceGroups $ServiceGroups -FieldName Service
36 | $ReturnObject += $ResolvedPolicy
37 | }
38 |
39 | End {
40 | $ReturnObject
41 | }
42 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Resolve-PaSecurityPolicy.ps1:
--------------------------------------------------------------------------------
1 | function Resolve-PaSecurityPolicy {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
5 | [PaSecurityPolicy]$PaSecurityPolicy,
6 |
7 | [Parameter(Mandatory = $False, Position = 1)]
8 | [PaAddress[]]$Addresses = (Get-PaAddress),
9 |
10 | [Parameter(Mandatory = $False, Position = 2)]
11 | [PaAddressGroup[]]$AddressGroups = (Get-PaAddressGroup),
12 |
13 | [Parameter(Mandatory = $False, Position = 3)]
14 | [PaService[]]$Services = (Get-PaService),
15 |
16 | [Parameter(Mandatory = $False, Position = 4)]
17 | [PaServiceGroup[]]$ServiceGroups = (Get-PaServiceGroup)
18 | )
19 |
20 | Begin {
21 | $VerbosePrefix = "Resolve-PaSecurityPolicy:"
22 | $ReturnObject = @()
23 | }
24 |
25 | Process {
26 | # Addresses
27 | $ResolvedPolicy = $PaSecurityPolicy | Resolve-PaField -Addresses $Addresses -AddressGroups $AddressGroups -FieldName SourceAddress
28 | $ResolvedPolicy = $ResolvedPolicy | Resolve-PaField -Addresses $Addresses -AddressGroups $AddressGroups -FieldName DestinationAddress
29 |
30 | # Service
31 | $ResolvedPolicy = $ResolvedPolicy | Resolve-PaField -Services $Services -ServiceGroups $ServiceGroups -FieldName Service
32 | $ReturnObject += $ResolvedPolicy
33 | }
34 |
35 | End {
36 | $ReturnObject
37 | }
38 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Resolve-PaService.ps1:
--------------------------------------------------------------------------------
1 | function Resolve-PaService {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
5 | [string]$Name,
6 |
7 | [Parameter(Mandatory = $False, Position = 1)]
8 | [PaService[]]$Services = (Get-PaService),
9 |
10 | [Parameter(Mandatory = $False, Position = 2)]
11 | [PaServiceGroup[]]$ServiceGroups = (Get-PaServiceGroup)
12 | )
13 |
14 | Begin {
15 | $VerbosePrefix = "Resolve-PaService:"
16 | $ReturnObject = @()
17 |
18 | $ReturnSameValue = @(
19 | 'any'
20 | 'application-default'
21 | )
22 | }
23 |
24 | Process {
25 | Write-Verbose "$VerbosePrefix $Name"
26 | $GroupLookup = $ServiceGroups | Where-Object { $_.Name -eq $Name }
27 | Write-Verbose "$VerbosePrefix $($GroupLookup.Count)"
28 | $ServiceLookup = $Services | Where-Object { $_.Name -eq $Name }
29 | Write-Verbose "$VerbosePrefix $($ServiceLookup.Count)"
30 |
31 | if ($GroupLookup) {
32 | $ReturnObject += $GroupLookup.Member | Resolve-PaService -Services $Services -ServiceGroups $ServiceGroups
33 | } elseif ($ServiceLookup) {
34 | $ReturnObject += $ServiceLookup.Protocol + '/' + $ServiceLookup.DestinationPort
35 | } elseif ($ReturnSameValue -contains $Name) {
36 | $ReturnObject += $Name
37 | } else {
38 | Throw "$VerbosePrefix Could not find service: $Name"
39 | }
40 | }
41 |
42 | End {
43 | $ReturnObject
44 | }
45 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Set-PaCustomReport.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaCustomReport {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $True, Position = 0)]
5 | [string]$Name,
6 |
7 | [Parameter(Mandatory = $False)]
8 | [string]$Description,
9 |
10 | [Parameter(Mandatory = $False)]
11 | [string]$Vsys,
12 |
13 | [Parameter(ParameterSetName = "summary", Mandatory = $True)]
14 | [ValidateSet('Application Statistics', 'Traffic', 'Threat', 'URL', 'Tunnel')]
15 | [string]$SummaryDatabase,
16 |
17 | [Parameter(ParameterSetName = "detailed", Mandatory = $True)]
18 | [ValidateSet('Traffic', 'Threat', 'URL', 'WildFire Submissions', 'Data Filtering', 'HIP Match', 'User-ID', 'Tunnel', 'Authentication')]
19 | [string]$DetailedLog,
20 |
21 | [Parameter(Mandatory = $True)]
22 | [string]$TimeFrame,
23 |
24 | [Parameter(Mandatory = $False)]
25 | [ValidateSet(5, 10, 25, 50, 100, 250, 500, 1000, 5000, 10000)]
26 | [int]$EntriesShown = 10,
27 |
28 | [Parameter(Mandatory = $False)]
29 | [ValidateSet(5, 10, 25, 50)]
30 | [int]$Groups = 10,
31 |
32 | [Parameter(Mandatory = $True)]
33 | [string[]]$Columns,
34 |
35 | [Parameter(Mandatory = $False)]
36 | [string]$Query,
37 |
38 | [Parameter(Mandatory = $False)]
39 | [string]$SortBy
40 |
41 | )
42 |
43 | BEGIN {
44 | $Xpath = $Global:PaDeviceObject.createXPath('reports', $Name)
45 | }
46 |
47 | PROCESS {
48 |
49 | $ConfigObject = [PaCustomReport]::new($Name)
50 |
51 | # Set the appropriate database name
52 | switch ($PsCmdlet.ParameterSetName) {
53 | 'summary' {
54 | Write-Verbose "SummaryDatabase: $SummaryDatabase Summary"
55 | $ConfigObject.Database = "$SummaryDatabase Summary"
56 | continue
57 | }
58 | 'detailed' {
59 | Write-Verbose "DetailedLog: $DetailedLog Detailed"
60 | $ConfigObject.Database = "$DetailedLog Detailed"
61 | continue
62 | }
63 | }
64 |
65 | # Common Properties
66 | $ConfigObject.TimeFrame = $TimeFrame
67 | $ConfigObject.EntriesShown = $EntriesShown
68 | $ConfigObject.Groups = $Groups
69 | $ConfigObject.Columns = $Columns
70 | $ConfigObject.Description = $Description
71 | $ConfigObject.Query = $Query
72 | $ConfigObject.SortBy = $SortBy
73 |
74 | $ElementXml = $ConfigObject.ToXml().reports.entry.InnerXml
75 |
76 | if ($PSCmdlet.ShouldProcess("Creating new report: $($ConfigObject.Name)")) {
77 | $Set = Invoke-PaApiConfig -Set -Xpath $XPath -Element $ElementXml
78 |
79 | $Set
80 | }
81 | }
82 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Set-PaNatPolicy.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaNatPolicy {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ValueFromPipeline, ParameterSetName = "rulebase", Mandatory = $True, Position = 0)]
5 | [Parameter(ValueFromPipeline, ParameterSetName = "prerulebase", Mandatory = $True, Position = 0)]
6 | [Parameter(ValueFromPipeline, ParameterSetName = "postrulebase", Mandatory = $True, Position = 0)]
7 | [PaNatPolicy]$PaNatPolicy,
8 |
9 | [Parameter(ParameterSetName = "prerulebase", Mandatory = $True)]
10 | [switch]$PreRulebase,
11 |
12 | [Parameter(ParameterSetName = "postrulebase", Mandatory = $True)]
13 | [switch]$PostRulebase,
14 |
15 | [Parameter(ParameterSetName = "rulebase", Mandatory = $false)]
16 | [switch]$PushedSharedPolicy
17 | )
18 |
19 | BEGIN {
20 | }
21 |
22 | PROCESS {
23 |
24 | $VerbosePrefix = "Set-PaNatPolicy:"
25 |
26 | switch ($PsCmdlet.ParameterSetName) {
27 | 'postrulebase' {
28 | $XPathNode = 'post-rulebase/nat/rules'
29 | }
30 | 'prerulebase' {
31 | $XPathNode = 'pre-rulebase/nat/rules'
32 | }
33 | 'rulebase' {
34 | $XPathNode = 'rulebase/nat/rules'
35 | }
36 | }
37 |
38 | $ElementXml = $PaNatPolicy.ToXml().rules.entry.InnerXml
39 | $Xpath = $Global:PaDeviceObject.createXPath($XPathNode, $PaNatPolicy.Name)
40 |
41 | if ($PSCmdlet.ShouldProcess("Creating new $($PsCmdlet.ParameterSetName) Nat Policy: $($PaNatPolicy.Name)")) {
42 | $Set = Invoke-PaApiConfig -Set -Xpath $XPath -Element $ElementXml
43 |
44 | $Set
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Set-PaSecurityPolicy.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaSecurityPolicy {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ParameterSetName = "name", Mandatory = $True, Position = 0)]
5 | [string]$Name,
6 |
7 | [Parameter(ParameterSetName = "paobject", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
8 | [PaSecurityPolicy]$PaSecurityPolicy,
9 |
10 | [Parameter(Mandatory = $False)]
11 | [string[]]$SourceZone,
12 |
13 | [Parameter(Mandatory = $False)]
14 | [string[]]$SourceUser,
15 |
16 | [Parameter(Mandatory = $False)]
17 | [string[]]$DestinationZone,
18 |
19 | [Parameter(Mandatory = $False)]
20 | [string[]]$DestinationAddress,
21 |
22 | [Parameter(Mandatory = $False)]
23 | [ValidateSet('allow', 'deny')]
24 | [string]$Action
25 | )
26 |
27 | BEGIN {
28 | }
29 |
30 | PROCESS {
31 | switch ($PsCmdlet.ParameterSetName) {
32 | 'name' {
33 | $ConfigObject = [PaSecurityPolicy]::new($Name)
34 | continue
35 | }
36 | 'paobject' {
37 | $ConfigObject = $PaSecurityPolicy
38 | continue
39 | }
40 | }
41 |
42 | if ($SourceZone) {
43 | $ConfigObject.SourceZone = $SourceZone
44 | }
45 |
46 | if ($SourceUser) {
47 | $ConfigObject.SourceUser = $SourceUser
48 | }
49 |
50 | if ($DestinationZone) {
51 | $ConfigObject.DestinationZone = $DestinationZone
52 | }
53 |
54 | if ($DestinationAddress) {
55 | $ConfigObject.DestinationAddress = $DestinationAddress
56 | }
57 |
58 | if ($Action) {
59 | $ConfigObject.Action = $Action
60 | }
61 |
62 | $ElementXml = $ConfigObject.ToXml().rules.entry.InnerXml
63 | $Xpath = $Global:PaDeviceObject.createXPath('rulebase/security/rules', $ConfigObject.Name)
64 | $Global:test = $ConfigObject
65 |
66 | if ($PSCmdlet.ShouldProcess("Creating new rule: $($ConfigObject.Name)")) {
67 | $Set = Invoke-PaApiConfig -Set -Xpath $XPath -Element $ElementXml
68 |
69 | $Set
70 | }
71 | }
72 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Set-PaTag.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaTag {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(ParameterSetName = "name", Mandatory = $True, Position = 0)]
5 | [string]$Name,
6 |
7 | [Parameter(ParameterSetName = "name", Mandatory = $False, Position = 1)]
8 | [ValidateSet('Red', 'Green', 'Blue', 'Yellow', 'Copper', 'Orange', 'Purple', 'Gray', 'Light Green', 'Cyan', 'Light Gray', 'Blue Gray', 'Lime', 'Black', 'Gold', 'Brown', 'Green')]
9 | [string]$Color,
10 |
11 | [Parameter(ParameterSetName = "name", Mandatory = $False, Position = 2)]
12 | [string]$Comments,
13 |
14 | [Parameter(ValueFromPipeline, ParameterSetName = "PaTag", Mandatory = $True, Position = 0)]
15 | [PaTag]$PaTag
16 | )
17 |
18 | BEGIN {
19 | $ConfigNode = 'tag'
20 | }
21 |
22 | PROCESS {
23 |
24 | switch ($PsCmdlet.ParameterSetName) {
25 | 'name' {
26 | if ($Color) {
27 | $ConfigObject = [PaTag]::new($Name, $Color)
28 | } else {
29 | $ConfigObject = [PaTag]::new($Name)
30 | }
31 |
32 | $ConfigObject.Comments = $Comments
33 | continue
34 | }
35 | 'PaTag' {
36 | $ConfigObject = $PaTag
37 | continue
38 | }
39 | }
40 |
41 |
42 |
43 | $ElementXml = $ConfigObject.ToXml().$ConfigNode.entry.InnerXml
44 | $Xpath = $Global:PaDeviceObject.createXPath($ConfigNode, $ConfigObject.Name)
45 |
46 | if ($PSCmdlet.ShouldProcess("Creating new Tag: $($ConfigObject.Name)")) {
47 | $Set = Invoke-PaApiConfig -Set -Xpath $XPath -Element $ElementXml
48 |
49 | $Set
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Set-PaTargetDeviceGroup.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaTargetDeviceGroup {
2 | [CmdletBinding()]
3 | Param (
4 | [Parameter(Mandatory = $True, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | }
10 |
11 | PROCESS {
12 | if ($global:PaDeviceObject.Connected) {
13 | if ($global:PaDeviceObject.Model -ne 'Panorama') {
14 | Throw "$($global:PaDeviceObject.Hostname) is not a Panorama device"
15 | }
16 | if ($Name -eq 'shared') {
17 | $global:PaDeviceObject.TargetDeviceGroup = $null
18 | } else {
19 | $global:PaDeviceObject.TargetDeviceGroup = $Name
20 | }
21 | } else {
22 | Throw "No Palo Alto Device connected. Use Get-PaDevice to initiate a connection."
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Set-PaTargetVsys.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaTargetVsys {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | [Parameter(Mandatory = $True, Position = 0)]
5 | [string]$Name
6 | )
7 |
8 | BEGIN {
9 | }
10 |
11 | PROCESS {
12 | if ($global:PaDeviceObject.Connected) {
13 | if ($global:PaDeviceObject.VsysEnabled -eq $false) {
14 | Throw "Multi-Vsys capabilities not enabled on $($global:PaDeviceObject.Hostname)"
15 | }
16 | $global:PaDeviceObject.TargetVsys = $Name
17 | } else {
18 | Throw "No Palo Alto Device connected. Use Get-PaDevice to initiate a connection."
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/PowerAlto/Public/Set-PaUrlCategory.ps1:
--------------------------------------------------------------------------------
1 | function Set-PaUrlCategory {
2 | [CmdletBinding(SupportsShouldProcess = $True)]
3 | Param (
4 | # paobject
5 | [Parameter(ParameterSetName = "paobject", Mandatory = $True, Position = 0, ValueFromPipeline = $True)]
6 | [PaUrlCategory]$PaUrlCategory,
7 |
8 | # manual
9 | [Parameter(ParameterSetName = "manual", Mandatory = $True, Position = 0)]
10 | [Parameter(ParameterSetName = "replace", Mandatory = $True, Position = 0)]
11 | [string]$Name,
12 |
13 | [Parameter(ParameterSetName = "manual", Mandatory = $False, Position = 1)]
14 | [Parameter(ParameterSetName = "replace", Mandatory = $True, Position = 1)]
15 | [string[]]$Members,
16 |
17 | [Parameter(ParameterSetName = "manual", Mandatory = $False, Position = 2)]
18 | [string]$Description,
19 |
20 | [Parameter(ParameterSetName = "replace", Mandatory = $True)]
21 | [switch]$ReplaceMembers
22 | )
23 |
24 | BEGIN {
25 | $ConfigNode = 'profiles/custom-url-category'
26 | $ResponseNode = 'custom-url-category'
27 | $VerbosePrefix = 'Set-PaUrlCategory:'
28 | }
29 |
30 | PROCESS {
31 | $InvokeParams = @{}
32 |
33 | Write-Verbose "$VerbosePrefix ParameterSetName: $($PsCmdlet.ParameterSetName)"
34 | switch ($PsCmdlet.ParameterSetName) {
35 | 'paobject' {
36 | $ConfigObject = $PaUrlCategory
37 | $XPath = $Global:PaDeviceObject.createXPath($ConfigNode, $ConfigObject.Name)
38 | $InvokeParams.Set = $true
39 | continue
40 | }
41 | { ($_ -eq 'manual') -or
42 | ($_ -eq 'replace') } {
43 |
44 | $ConfigObject = [PaUrlCategory]::new($Name)
45 | $XPath = $Global:PaDeviceObject.createXPath($ConfigNode, $Name)
46 |
47 | if ($Description) {
48 | $ConfigObject.Description = $Description
49 | }
50 |
51 | $ConfigObject.Members = $Members
52 |
53 | if ($ReplaceMembers) {
54 | $InvokeParams.Edit = $true
55 | $XPath += '/list'
56 | } else {
57 | $InvokeParams.Set = $true
58 | }
59 | continue
60 | }
61 | }
62 |
63 | $InvokeParams.XPath = $XPath
64 | $InvokeParams.Element = $ConfigObject.ToXml().$ResponseNode.entry.InnerXml
65 |
66 | $global:InvokeParams = $InvokeParams
67 |
68 | if ($PSCmdlet.ShouldProcess("Creating new Url Category: $($ConfigObject.Name)")) {
69 | $Set = Invoke-PaApiConfig @InvokeParams
70 |
71 | $Set
72 | }
73 | }
74 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PowerAlto
2 |
3 | [](https://ci.appveyor.com/project/brianaddicks/poweralto)
4 | [](http://poweralto.readthedocs.io/en/latest/)
5 |
6 | PowerShell wrapper for Palo Alto Firewall/Panorama API. Full docs available at https://poweralto.com
7 |
--------------------------------------------------------------------------------
/Tests/Get-PaSessionInfo.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 |
8 | InModuleScope $ENV:BHProjectName {
9 | BeforeAll {
10 | $PSVersion = $PSVersionTable.PSVersion.Major
11 | $ProjectRoot = $ENV:BHProjectPath
12 |
13 | $Verbose = @{}
14 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
15 | $Verbose.add("Verbose", $True)
16 | }
17 |
18 | Mock -CommandName Invoke-PaApiOperation {
19 | return @{
20 | response = @{
21 | result = @{
22 | 'num-max' = 1000;
23 | 'num-active' = 900;
24 | 'num-tcp' = 800;
25 | 'num-udp' = 700;
26 | 'num-installed' = 600
27 | }
28 | }
29 | }
30 | } -Verifiable
31 | }
32 |
33 | Describe "Get-PaSessionInfo" {
34 | $SessionInfo = Get-PaSessionInfo
35 | It "Should return correct SupportedSessions" {
36 | $SessionInfo.SupportedSessions | Should -BeExactly 1000
37 | }
38 | It "Should return correct AllocatedSessions" {
39 | $SessionInfo.AllocatedSessions | Should -BeExactly 900
40 | }
41 | It "Should return correct TcpSessions" {
42 | $SessionInfo.TcpSessions | Should -BeExactly 800
43 | }
44 | It "Should return correct UdpSessions" {
45 | $SessionInfo.UdpSessions | Should -BeExactly 700
46 | }
47 | It "Should return correct SessionsSinceBoot" {
48 | $SessionInfo.SessionsSinceBoot | Should -BeExactly 600
49 | }
50 | }
51 | } #>
--------------------------------------------------------------------------------
/Tests/PaCertificate/Get-PaCertificate.Tests.ps1:
--------------------------------------------------------------------------------
1 | if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Get-PaCertificate" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Tests/PaCertificate/New-PaCertificate.Tests.ps1:
--------------------------------------------------------------------------------
1 | if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "New-PaCertificate" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Tests/PaCertificate/Remove-PaCertificate.Tests.ps1:
--------------------------------------------------------------------------------
1 | if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Remove-PaCertificate" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Tests/PaCertificate/Set-PaCertificate.Tests.ps1:
--------------------------------------------------------------------------------
1 | if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Set-PaCertificate" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Tests/PaDeviceGroup/Get-PaDeviceGroup.Tests.ps1:
--------------------------------------------------------------------------------
1 | if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Get-PaDeviceGroup" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Tests/PaDeviceGroup/New-PaDeviceGroup.Tests.ps1:
--------------------------------------------------------------------------------
1 | if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "New-PaDeviceGroup" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Tests/PaDeviceGroup/Remove-PaDeviceGroup.Tests.ps1:
--------------------------------------------------------------------------------
1 | if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Remove-PaDeviceGroup" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Tests/PaDeviceGroup/Set-PaDeviceGroup.Tests.ps1:
--------------------------------------------------------------------------------
1 | if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Set-PaDeviceGroup" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Tests/PaIkeGateway/Get-PaIkeGateway.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Get-PaIkeGateway" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIkeGateway/New-PaIkeGateway.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "New-PaIkeGateway" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIkeGateway/Remove-PaIkeGateway.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Remove-PaIkeGateway" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIkeGateway/Set-PaIkeGateway.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Set-PaIkeGateway" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIkeGatewayConfig/Get-PaIkeGatewayConfig.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Get-PaIkeGatewayConfig" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIkeGatewayConfig/New-PaIkeGatewayConfig.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "New-PaIkeGatewayConfig" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIkeGatewayConfig/Remove-PaIkeGatewayConfig.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Remove-PaIkeGatewayConfig" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIkeGatewayConfig/Set-PaIkeGatewayConfig.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Set-PaIkeGatewayConfig" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIpsecTunnel/Get-PaIpsecTunnel.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Get-PaIpsecTunnel" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIpsecTunnel/New-PaIpsecTunnel.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "New-PaIpsecTunnel" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIpsecTunnel/Remove-PaIpsecTunnel.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Remove-PaIpsecTunnel" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/Tests/PaIpsecTunnel/Set-PaIpsecTunnel.Tests.ps1:
--------------------------------------------------------------------------------
1 | <# if (-not $ENV:BHProjectPath) {
2 | Set-BuildEnvironment -Path $PSScriptRoot\..
3 | }
4 | Remove-Module $ENV:BHProjectName -ErrorAction SilentlyContinue
5 | Import-Module (Join-Path $ENV:BHProjectPath $ENV:BHProjectName) -Force
6 |
7 | InModuleScope $ENV:BHProjectName {
8 | $PSVersion = $PSVersionTable.PSVersion.Major
9 | $ProjectRoot = $ENV:BHProjectPath
10 |
11 | $Verbose = @{ }
12 | if ($ENV:BHBranchName -notlike "master" -or $env:BHCommitMessage -match "!verbose") {
13 | $Verbose.add("Verbose", $True)
14 | }
15 |
16 | Describe "Set-PaIpsecTunnel" {
17 | #region dummydata
18 | ########################################################################
19 |
20 | ########################################################################
21 | #endregion dummydata
22 |
23 | #region firstTest
24 | ########################################################################
25 | Context FirstTest {
26 | It "should pass the first test" {
27 | }
28 | }
29 | ########################################################################
30 | #endregion firstTest
31 | }
32 | }
33 | #>
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | # See http://www.appveyor.com/docs/appveyor-yml for many more options
2 |
3 | # Publish to PowerShell Gallery with this key
4 | environment:
5 | NuGetApiKey:
6 | secure: pqFgvQ46X0mWdDt3CZzuOwBe1R2HHBhK0aPYsrNYqQEezJIVhYSq8XX/VJqN/kWJ
7 |
8 | # Skip on updates to the readme.
9 | # We can force this by adding [skip ci] or [ci skip] anywhere in commit message
10 | skip_commits:
11 | message: /updated readme.*|update readme.*s/
12 |
13 | # Don't use a build system, our test_script does that
14 | build: false
15 |
16 | # Kick off the CI/CD pipeline
17 | test_script:
18 | - ps: . ./build.ps1
19 |
20 | # Notify Slack
21 | notifications:
22 | - provider: Slack
23 | incoming_webhook:
24 | secure: +hsTjowVQ0VzNCAKjdHZ+zHbyxax38iBzTWupua+IG2vrh+BknPHXcUJ6ZJysSbuYPGfkA7vl61WD6dI4mY+7dNHfHvFuvxeKAo4k0nyhE8=
25 | on_build_success: true
26 | on_build_failure: true
27 | on_build_status_changed: true
--------------------------------------------------------------------------------
/build.ps1:
--------------------------------------------------------------------------------
1 | [Cmdletbinding()]
2 | Param ()
3 | function Resolve-Module {
4 | [Cmdletbinding()]
5 | param
6 | (
7 | [Parameter(Mandatory)]
8 | [string[]]$Name
9 | )
10 |
11 | Process {
12 | foreach ($ModuleName in $Name) {
13 | $Module = Get-Module -Name $ModuleName -ListAvailable
14 | Write-Verbose -Message "Resolving Module $($ModuleName)"
15 |
16 | if ($Module) {
17 | $Version = $Module | Measure-Object -Property Version -Maximum | Select-Object -ExpandProperty Maximum
18 | $GalleryVersion = Find-Module -Name $ModuleName -Repository PSGallery | Measure-Object -Property Version -Maximum | Select-Object -ExpandProperty Maximum
19 |
20 | if ($Version -lt $GalleryVersion) {
21 |
22 | if ((Get-PSRepository -Name PSGallery).InstallationPolicy -ne 'Trusted') { Set-PSRepository -Name PSGallery -InstallationPolicy Trusted }
23 |
24 | Write-Verbose -Message "$($ModuleName) Installed Version [$($Version.tostring())] is outdated. Installing Gallery Version [$($GalleryVersion.tostring())]"
25 |
26 | Install-Module -Name $ModuleName -Force
27 | Import-Module -Name $ModuleName -Force -RequiredVersion $GalleryVersion
28 | } else {
29 | Write-Verbose -Message "Module Installed, Importing $($ModuleName)"
30 | Import-Module -Name $ModuleName -Force -RequiredVersion $Version
31 | }
32 | } else {
33 | Write-Verbose -Message "$($ModuleName) Missing, installing Module"
34 | Install-Module -Name $ModuleName -Force
35 | Import-Module -Name $ModuleName -Force -RequiredVersion $Version
36 | }
37 | }
38 | }
39 | }
40 |
41 | # Grab nuget bits, install modules, set build variables, start build.
42 | Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null
43 |
44 | Resolve-Module Psake, PSDeploy, Pester, BuildHelpers
45 |
46 | Set-BuildEnvironment -Force
47 |
48 | Invoke-psake .\psake.ps1
49 | exit ( [int]( -not $psake.build_success ) )
50 |
--------------------------------------------------------------------------------
/deploy.psdeploy.ps1:
--------------------------------------------------------------------------------
1 | # Generic module deployment.
2 | # This stuff should be moved to psake for a cleaner deployment view
3 |
4 | # ASSUMPTIONS:
5 |
6 | # folder structure of:
7 | # - RepoFolder
8 | # - This PSDeploy file
9 | # - ModuleName
10 | # - ModuleName.psd1
11 |
12 | # Nuget key in $ENV:NugetApiKey
13 |
14 | # Set-BuildEnvironment from BuildHelpers module has populated ENV:BHProjectName
15 |
16 | # Publish to gallery with a few restrictions
17 | if (
18 | $env:BHPSModulePath -and
19 | $env:BHBuildSystem -ne 'Unknown' -and
20 | $env:BHBranchName -eq "master" -and
21 | $env:BHCommitMessage -match '!deploy'
22 | ) {
23 | Write-Verbose "Deploying to PSGallery!"
24 | Deploy Module {
25 | By PSGalleryModule {
26 | FromSource $ENV:BHPSModulePath
27 | To PSGallery
28 | WithOptions @{
29 | ApiKey = $ENV:NugetApiKey
30 | }
31 | }
32 | }
33 | } else {
34 | "Skipping deployment: To deploy, ensure that...`n" +
35 | "`t* You are in a known build system (Current: $ENV:BHBuildSystem)`n" +
36 | "`t* You are committing to the master branch (Current: $ENV:BHBranchName) `n" +
37 | "`t* Your commit message includes !deploy (Current: $ENV:BHCommitMessage)" |
38 | Write-Host
39 | }
40 |
41 | # Publish to AppVeyor if we're in AppVeyor
42 | # You can use this to test a build from AppVeyor before pushing to psgallery
43 | # https://psdeploy.readthedocs.io/en/latest/Example-AppVeyorModule-Deployment/
44 |
45 | if (
46 | $env:BHPSModulePath -and
47 | $env:BHBuildSystem -eq 'AppVeyor'
48 | ) {
49 | Deploy DeveloperBuild {
50 | By AppVeyorModule {
51 | FromSource $ENV:BHPSModulePath
52 | To AppVeyor
53 | WithOptions @{
54 | Version = $env:APPVEYOR_BUILD_VERSION
55 | }
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/docs/cmdlets/Clear-PaIkeGateway.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Clear-PaIkeGateway
9 |
10 | ## SYNOPSIS
11 | Clears existing IKE connections
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Clear-PaIkeGateway [-Name] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Clears existing IKE connections
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> Clear-PaIkeGateway -Name 'MyIkeGateway'
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Confirm
34 | Prompts you for confirmation before running the cmdlet.
35 |
36 | ```yaml
37 | Type: SwitchParameter
38 | Parameter Sets: (All)
39 | Aliases: cf
40 |
41 | Required: False
42 | Position: Named
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### -Name
49 | Name of IKE Gateway
50 |
51 | ```yaml
52 | Type: String
53 | Parameter Sets: (All)
54 | Aliases:
55 |
56 | Required: True
57 | Position: 0
58 | Default value: None
59 | Accept pipeline input: False
60 | Accept wildcard characters: False
61 | ```
62 |
63 | ### -WhatIf
64 | Shows what would happen if the cmdlet runs.
65 | The cmdlet is not run.
66 |
67 | ```yaml
68 | Type: SwitchParameter
69 | Parameter Sets: (All)
70 | Aliases: wi
71 |
72 | Required: False
73 | Position: Named
74 | Default value: None
75 | Accept pipeline input: False
76 | Accept wildcard characters: False
77 | ```
78 |
79 | ### CommonParameters
80 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
81 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
82 |
83 | ## INPUTS
84 |
85 | ### None
86 | ## OUTPUTS
87 |
88 | ### System.Object
89 | ## NOTES
90 |
91 | ## RELATED LINKS
92 |
--------------------------------------------------------------------------------
/docs/cmdlets/Clear-PaIpsecTunnel.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Clear-PaIpsecTunnel
9 |
10 | ## SYNOPSIS
11 | Clears existing IPSEC connections.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Clear-PaIpsecTunnel [-Name] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Clears existing IPSEC connections.
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> Clear-PaIpsecTunnel -Name 'MyIpsecTunnel'
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Confirm
34 | Prompts you for confirmation before running the cmdlet.
35 |
36 | ```yaml
37 | Type: SwitchParameter
38 | Parameter Sets: (All)
39 | Aliases: cf
40 |
41 | Required: False
42 | Position: Named
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### -Name
49 | Name of IPSEC Tunnel
50 |
51 | ```yaml
52 | Type: String
53 | Parameter Sets: (All)
54 | Aliases:
55 |
56 | Required: True
57 | Position: 0
58 | Default value: None
59 | Accept pipeline input: False
60 | Accept wildcard characters: False
61 | ```
62 |
63 | ### -WhatIf
64 | Shows what would happen if the cmdlet runs.
65 | The cmdlet is not run.
66 |
67 | ```yaml
68 | Type: SwitchParameter
69 | Parameter Sets: (All)
70 | Aliases: wi
71 |
72 | Required: False
73 | Position: Named
74 | Default value: None
75 | Accept pipeline input: False
76 | Accept wildcard characters: False
77 | ```
78 |
79 | ### CommonParameters
80 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
81 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
82 |
83 | ## INPUTS
84 |
85 | ### None
86 | ## OUTPUTS
87 |
88 | ### System.Object
89 | ## NOTES
90 |
91 | ## RELATED LINKS
92 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaAddress.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaAddress
9 |
10 | ## SYNOPSIS
11 | Retrieve address objects from Palo Alto device.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaAddress [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Retrieve address objects from Palo Alto device.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Name
32 | {{Fill Name Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: False
40 | Position: 0
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### CommonParameters
47 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
48 |
49 | ## INPUTS
50 |
51 | ## OUTPUTS
52 |
53 | ## NOTES
54 |
55 | ## RELATED LINKS
56 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaAddressGroup.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaAddressGroup
9 |
10 | ## SYNOPSIS
11 | Retrieve address objects from Palo Alto device.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaAddressGroup [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Retrieve address objects from Palo Alto device.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Name
32 | {{Fill Name Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: False
40 | Position: 0
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### CommonParameters
47 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
48 |
49 | ## INPUTS
50 |
51 | ## OUTPUTS
52 |
53 | ## NOTES
54 |
55 | ## RELATED LINKS
56 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaConfigDiff.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaConfigDiff
9 |
10 | ## SYNOPSIS
11 | Checks to see if there's a difference in the candidate and running configuration on a Palo Alto Device.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaConfigDiff []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Checks to see if there's a difference in the candidate and running configuration on a Palo Alto Device.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 | Get-PaConfigDiff
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### CommonParameters
32 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
33 |
34 | ## INPUTS
35 |
36 | ## OUTPUTS
37 |
38 | ## NOTES
39 |
40 | ## RELATED LINKS
41 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaCustomReport.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaCustomReport
9 |
10 | ## SYNOPSIS
11 | Wrapper for -WhatIf output, like Write-Verbose
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaCustomReport [[-Name] ] [[-Vsys] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Wrapper for -WhatIf output, like Write-Verbose
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 | Write-WhatIf "This is what happens when you do a thing."
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Name
32 | {{Fill Name Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: False
40 | Position: 0
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### -Vsys
47 | {{Fill Vsys Description}}
48 |
49 | ```yaml
50 | Type: String
51 | Parameter Sets: (All)
52 | Aliases:
53 |
54 | Required: False
55 | Position: 1
56 | Default value: None
57 | Accept pipeline input: False
58 | Accept wildcard characters: False
59 | ```
60 |
61 | ### CommonParameters
62 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
63 |
64 | ## INPUTS
65 |
66 | ## OUTPUTS
67 |
68 | ## NOTES
69 |
70 | ## RELATED LINKS
71 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaHaSetup.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaHaSetup
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaHaSetup []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### CommonParameters
34 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
35 |
36 | ## INPUTS
37 |
38 | ### None
39 | ## OUTPUTS
40 |
41 | ### System.Object
42 | ## NOTES
43 |
44 | ## RELATED LINKS
45 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaIkeGatewayConfig.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaIkeGatewayConfig
9 |
10 | ## SYNOPSIS
11 | Retrieves configurations for IKE Gateways.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaIkeGatewayConfig [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Retrieves configurations for IKE Gateways.
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> Get-PaIkeGatewayConfig -Name 'MyIkeGateway'
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Name
34 | Name of IKE Gateway
35 |
36 | ```yaml
37 | Type: String
38 | Parameter Sets: (All)
39 | Aliases:
40 |
41 | Required: False
42 | Position: 0
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### CommonParameters
49 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
50 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
51 |
52 | ## INPUTS
53 |
54 | ### None
55 | ## OUTPUTS
56 |
57 | ### System.Object
58 | ## NOTES
59 |
60 | ## RELATED LINKS
61 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaInterface.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaInterface
9 |
10 | ## SYNOPSIS
11 | Retrieve interface information from Palo Alto device.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaInterface [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Retrieve interface information from Palo Alto device.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Name
32 | {{Fill Name Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: False
40 | Position: 0
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### CommonParameters
47 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
48 |
49 | ## INPUTS
50 |
51 | ## OUTPUTS
52 |
53 | ## NOTES
54 |
55 | ## RELATED LINKS
56 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaIpsecTunnel.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaIpsecTunnel
9 |
10 | ## SYNOPSIS
11 | Retrieves status of IPSEC Tunnel.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaIpsecTunnel [-Name] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Retrieves status of IPSEC Tunnel.
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> Get-PaIpsecTunnel -Name 'MyIpsecTunel'
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Name
34 | Name of IPSEC Tunnel.
35 |
36 | ```yaml
37 | Type: String
38 | Parameter Sets: (All)
39 | Aliases:
40 |
41 | Required: True
42 | Position: 0
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### CommonParameters
49 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
50 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
51 |
52 | ## INPUTS
53 |
54 | ### None
55 | ## OUTPUTS
56 |
57 | ### System.Object
58 | ## NOTES
59 |
60 | ## RELATED LINKS
61 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaIpsecTunnelConfig.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaIpsecTunnelConfig
9 |
10 | ## SYNOPSIS
11 | Retrieves configurations of IpsecTunnel.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaIpsecTunnelConfig [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Retrieves configurations of IpsecTunnel.
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> Get-PaIpsecTunnelConfig -Name 'MyIpsecTunnel'
27 | ```
28 |
29 | Retrieves configuration of IPSEC Tunnel named 'MyIpsecTunnel'.
30 |
31 | ## PARAMETERS
32 |
33 | ### -Name
34 | Name of IPSEC Tunnel.
35 |
36 | ```yaml
37 | Type: String
38 | Parameter Sets: (All)
39 | Aliases:
40 |
41 | Required: False
42 | Position: 0
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### CommonParameters
49 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
50 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
51 |
52 | ## INPUTS
53 |
54 | ### None
55 | ## OUTPUTS
56 |
57 | ### System.Object
58 | ## NOTES
59 |
60 | ## RELATED LINKS
61 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaNatPolicy.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaNatPolicy
9 |
10 | ## SYNOPSIS
11 | Retrieve address objects from Palo Alto device.
12 |
13 | ## SYNTAX
14 |
15 | ### postrulebase
16 | ```
17 | Get-PaNatPolicy [[-Name] ] [-PostRulebase] []
18 | ```
19 |
20 | ### prerulebase
21 | ```
22 | Get-PaNatPolicy [[-Name] ] [-PreRulebase] []
23 | ```
24 |
25 | ### rulebase
26 | ```
27 | Get-PaNatPolicy [[-Name] ] []
28 | ```
29 |
30 | ## DESCRIPTION
31 | Retrieve address objects from Palo Alto device.
32 |
33 | ## EXAMPLES
34 |
35 | ### EXAMPLE 1
36 | ```
37 |
38 | ```
39 |
40 | ## PARAMETERS
41 |
42 | ### -Name
43 | {{Fill Name Description}}
44 |
45 | ```yaml
46 | Type: String
47 | Parameter Sets: (All)
48 | Aliases:
49 |
50 | Required: False
51 | Position: 0
52 | Default value: None
53 | Accept pipeline input: False
54 | Accept wildcard characters: False
55 | ```
56 |
57 | ### -PostRulebase
58 | {{Fill PostRulebase Description}}
59 |
60 | ```yaml
61 | Type: SwitchParameter
62 | Parameter Sets: postrulebase
63 | Aliases:
64 |
65 | Required: True
66 | Position: Named
67 | Default value: False
68 | Accept pipeline input: False
69 | Accept wildcard characters: False
70 | ```
71 |
72 | ### -PreRulebase
73 | {{Fill PreRulebase Description}}
74 |
75 | ```yaml
76 | Type: SwitchParameter
77 | Parameter Sets: prerulebase
78 | Aliases:
79 |
80 | Required: True
81 | Position: Named
82 | Default value: False
83 | Accept pipeline input: False
84 | Accept wildcard characters: False
85 | ```
86 |
87 | ### CommonParameters
88 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
89 |
90 | ## INPUTS
91 |
92 | ## OUTPUTS
93 |
94 | ## NOTES
95 |
96 | ## RELATED LINKS
97 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaPanoramaConfig.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaPanoramaConfig
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaPanoramaConfig []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### CommonParameters
34 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
35 |
36 | ## INPUTS
37 |
38 | ### None
39 | ## OUTPUTS
40 |
41 | ### System.Object
42 | ## NOTES
43 |
44 | ## RELATED LINKS
45 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaReportJob.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaReportJob
9 |
10 | ## SYNOPSIS
11 | Gets Report Job status from Palo Alto Device.
12 |
13 | ## SYNTAX
14 |
15 | ### singlejob (Default)
16 | ```
17 | Get-PaReportJob [-JobId] [-Wait] [-ShowProgress] []
18 | ```
19 |
20 | ### alljobs
21 | ```
22 | Get-PaReportJob [[-JobId] ] []
23 | ```
24 |
25 | ## DESCRIPTION
26 | Gets Report Job status from Palo Alto Device.
27 |
28 | ## EXAMPLES
29 |
30 | ### Example 1
31 | ```powershell
32 | PS C:\> {{ Add example code here }}
33 | ```
34 |
35 | {{ Add example description here }}
36 |
37 | ## PARAMETERS
38 |
39 | ### -JobId
40 | {{Fill JobId Description}}
41 |
42 | ```yaml
43 | Type: Int32
44 | Parameter Sets: singlejob
45 | Aliases:
46 |
47 | Required: True
48 | Position: 0
49 | Default value: 0
50 | Accept pipeline input: False
51 | Accept wildcard characters: False
52 | ```
53 |
54 | ```yaml
55 | Type: Int32
56 | Parameter Sets: alljobs
57 | Aliases:
58 |
59 | Required: False
60 | Position: 0
61 | Default value: 0
62 | Accept pipeline input: False
63 | Accept wildcard characters: False
64 | ```
65 |
66 | ### -ShowProgress
67 | {{Fill ShowProgress Description}}
68 |
69 | ```yaml
70 | Type: SwitchParameter
71 | Parameter Sets: singlejob
72 | Aliases:
73 |
74 | Required: False
75 | Position: Named
76 | Default value: False
77 | Accept pipeline input: False
78 | Accept wildcard characters: False
79 | ```
80 |
81 | ### -Wait
82 | {{Fill Wait Description}}
83 |
84 | ```yaml
85 | Type: SwitchParameter
86 | Parameter Sets: singlejob
87 | Aliases:
88 |
89 | Required: False
90 | Position: Named
91 | Default value: False
92 | Accept pipeline input: False
93 | Accept wildcard characters: False
94 | ```
95 |
96 | ### CommonParameters
97 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
98 |
99 | ## INPUTS
100 |
101 | ## OUTPUTS
102 |
103 | ## NOTES
104 |
105 | ## RELATED LINKS
106 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaSecurityPolicy.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaSecurityPolicy
9 |
10 | ## SYNOPSIS
11 | Retrieve Security Policies from Palo Alto device.
12 |
13 | ## SYNTAX
14 |
15 | ### postrulebase
16 | ```
17 | Get-PaSecurityPolicy [[-Name] ] [-PostRulebase] []
18 | ```
19 |
20 | ### prerulebase
21 | ```
22 | Get-PaSecurityPolicy [[-Name] ] [-PreRulebase] []
23 | ```
24 |
25 | ### rulebase
26 | ```
27 | Get-PaSecurityPolicy [[-Name] ] []
28 | ```
29 |
30 | ## DESCRIPTION
31 | Retrieve Security Policies from Palo Alto device.
32 |
33 | ## EXAMPLES
34 |
35 | ### EXAMPLE 1
36 | ```
37 |
38 | ```
39 |
40 | ## PARAMETERS
41 |
42 | ### -Name
43 | {{Fill Name Description}}
44 |
45 | ```yaml
46 | Type: String
47 | Parameter Sets: (All)
48 | Aliases:
49 |
50 | Required: False
51 | Position: 0
52 | Default value: None
53 | Accept pipeline input: False
54 | Accept wildcard characters: False
55 | ```
56 |
57 | ### -PostRulebase
58 | {{Fill PostRulebase Description}}
59 |
60 | ```yaml
61 | Type: SwitchParameter
62 | Parameter Sets: postrulebase
63 | Aliases:
64 |
65 | Required: True
66 | Position: Named
67 | Default value: False
68 | Accept pipeline input: False
69 | Accept wildcard characters: False
70 | ```
71 |
72 | ### -PreRulebase
73 | {{Fill PreRulebase Description}}
74 |
75 | ```yaml
76 | Type: SwitchParameter
77 | Parameter Sets: prerulebase
78 | Aliases:
79 |
80 | Required: True
81 | Position: Named
82 | Default value: False
83 | Accept pipeline input: False
84 | Accept wildcard characters: False
85 | ```
86 |
87 | ### CommonParameters
88 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
89 |
90 | ## INPUTS
91 |
92 | ## OUTPUTS
93 |
94 | ## NOTES
95 |
96 | ## RELATED LINKS
97 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaService.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaService
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaService [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Name
34 | {{Fill Name Description}}
35 |
36 | ```yaml
37 | Type: String
38 | Parameter Sets: (All)
39 | Aliases:
40 |
41 | Required: False
42 | Position: 0
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### CommonParameters
49 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
50 |
51 | ## INPUTS
52 |
53 | ### None
54 | ## OUTPUTS
55 |
56 | ### System.Object
57 | ## NOTES
58 |
59 | ## RELATED LINKS
60 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaServiceGroup.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaServiceGroup
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaServiceGroup [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Name
34 | {{Fill Name Description}}
35 |
36 | ```yaml
37 | Type: String
38 | Parameter Sets: (All)
39 | Aliases:
40 |
41 | Required: False
42 | Position: 0
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### CommonParameters
49 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
50 |
51 | ## INPUTS
52 |
53 | ### None
54 | ## OUTPUTS
55 |
56 | ### System.Object
57 | ## NOTES
58 |
59 | ## RELATED LINKS
60 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaSessionInfo.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaSessionInfo
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaSessionInfo []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### CommonParameters
34 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
35 |
36 | ## INPUTS
37 |
38 | ### None
39 | ## OUTPUTS
40 |
41 | ### System.Object
42 | ## NOTES
43 |
44 | ## RELATED LINKS
45 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaTag.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaTag
9 |
10 | ## SYNOPSIS
11 | Retrieve tag objects from Palo Alto device.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaTag [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Retrieve tag objects from Palo Alto device.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Name
32 | {{Fill Name Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: False
40 | Position: 0
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### CommonParameters
47 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
48 |
49 | ## INPUTS
50 |
51 | ## OUTPUTS
52 |
53 | ## NOTES
54 |
55 | ## RELATED LINKS
56 |
--------------------------------------------------------------------------------
/docs/cmdlets/Get-PaUrlCategory.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-PaUrlCategory
9 |
10 | ## SYNOPSIS
11 | Retrieve Custom Url Categories from Palo Alto device.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-PaUrlCategory [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Retrieve Custom Url Categories from Palo Alto device.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Name
32 | {{Fill Name Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: False
40 | Position: 0
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### CommonParameters
47 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
48 |
49 | ## INPUTS
50 |
51 | ## OUTPUTS
52 |
53 | ## NOTES
54 |
55 | ## RELATED LINKS
56 |
--------------------------------------------------------------------------------
/docs/cmdlets/Invoke-PaApiOperation.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Invoke-PaApiOperation
9 |
10 | ## SYNOPSIS
11 | Invokes the Palo Alto Operation Api.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Invoke-PaApiOperation [-Cmd] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Invokes the Palo Alto Operation Api.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Cmd
32 | Operational command to run.
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: True
40 | Position: 0
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### -Confirm
47 | Prompts you for confirmation before running the cmdlet.
48 |
49 | ```yaml
50 | Type: SwitchParameter
51 | Parameter Sets: (All)
52 | Aliases: cf
53 |
54 | Required: False
55 | Position: Named
56 | Default value: None
57 | Accept pipeline input: False
58 | Accept wildcard characters: False
59 | ```
60 |
61 | ### -WhatIf
62 | Shows what would happen if the cmdlet runs.
63 | The cmdlet is not run.
64 |
65 | ```yaml
66 | Type: SwitchParameter
67 | Parameter Sets: (All)
68 | Aliases: wi
69 |
70 | Required: False
71 | Position: Named
72 | Default value: None
73 | Accept pipeline input: False
74 | Accept wildcard characters: False
75 | ```
76 |
77 | ### CommonParameters
78 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
79 |
80 | ## INPUTS
81 |
82 | ## OUTPUTS
83 |
84 | ## NOTES
85 |
86 | ## RELATED LINKS
87 |
--------------------------------------------------------------------------------
/docs/cmdlets/Invoke-PaApiReport.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Invoke-PaApiReport
9 |
10 | ## SYNOPSIS
11 | Invokes a Palo Alto Report Api.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Invoke-PaApiReport [-ReportType] [-ReportName] [-Cmd] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Invokes a Palo Alto Report Api.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Cmd
32 | {{Fill Cmd Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: True
40 | Position: 2
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### -ReportName
47 | {{Fill ReportName Description}}
48 |
49 | ```yaml
50 | Type: String
51 | Parameter Sets: (All)
52 | Aliases:
53 |
54 | Required: True
55 | Position: 1
56 | Default value: None
57 | Accept pipeline input: False
58 | Accept wildcard characters: False
59 | ```
60 |
61 | ### -ReportType
62 | {{Fill ReportType Description}}
63 |
64 | ```yaml
65 | Type: String
66 | Parameter Sets: (All)
67 | Aliases:
68 |
69 | Required: True
70 | Position: 0
71 | Default value: None
72 | Accept pipeline input: False
73 | Accept wildcard characters: False
74 | ```
75 |
76 | ### CommonParameters
77 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
78 |
79 | ## INPUTS
80 |
81 | ## OUTPUTS
82 |
83 | ## NOTES
84 |
85 | ## RELATED LINKS
86 |
--------------------------------------------------------------------------------
/docs/cmdlets/Invoke-PaCommit.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Invoke-PaCommit
9 |
10 | ## SYNOPSIS
11 | Commits Palo Alto configuration.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Invoke-PaCommit [-Force] [-Wait] [-ShowProgress] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Commits Palo Alto configuration.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Confirm
32 | Prompts you for confirmation before running the cmdlet.
33 |
34 | ```yaml
35 | Type: SwitchParameter
36 | Parameter Sets: (All)
37 | Aliases: cf
38 |
39 | Required: False
40 | Position: Named
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### -Force
47 | {{Fill Force Description}}
48 |
49 | ```yaml
50 | Type: SwitchParameter
51 | Parameter Sets: (All)
52 | Aliases:
53 |
54 | Required: False
55 | Position: Named
56 | Default value: False
57 | Accept pipeline input: False
58 | Accept wildcard characters: False
59 | ```
60 |
61 | ### -ShowProgress
62 | {{Fill ShowProgress Description}}
63 |
64 | ```yaml
65 | Type: SwitchParameter
66 | Parameter Sets: (All)
67 | Aliases:
68 |
69 | Required: False
70 | Position: Named
71 | Default value: False
72 | Accept pipeline input: False
73 | Accept wildcard characters: False
74 | ```
75 |
76 | ### -Wait
77 | {{Fill Wait Description}}
78 |
79 | ```yaml
80 | Type: SwitchParameter
81 | Parameter Sets: (All)
82 | Aliases:
83 |
84 | Required: False
85 | Position: Named
86 | Default value: False
87 | Accept pipeline input: False
88 | Accept wildcard characters: False
89 | ```
90 |
91 | ### -WhatIf
92 | Shows what would happen if the cmdlet runs.
93 | The cmdlet is not run.
94 |
95 | ```yaml
96 | Type: SwitchParameter
97 | Parameter Sets: (All)
98 | Aliases: wi
99 |
100 | Required: False
101 | Position: Named
102 | Default value: None
103 | Accept pipeline input: False
104 | Accept wildcard characters: False
105 | ```
106 |
107 | ### CommonParameters
108 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
109 |
110 | ## INPUTS
111 |
112 | ## OUTPUTS
113 |
114 | ## NOTES
115 |
116 | ## RELATED LINKS
117 |
--------------------------------------------------------------------------------
/docs/cmdlets/Invoke-PaCustomReport.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Invoke-PaCustomReport
9 |
10 | ## SYNOPSIS
11 | Runs a Custom Palo Alto Report and retrieves results.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Invoke-PaCustomReport [-Name] [-ShowProgress] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Runs a Custom Palo Alto Report and retrieves results.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Name
32 | {{Fill Name Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 |
39 | Required: True
40 | Position: 0
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### -ShowProgress
47 | {{Fill ShowProgress Description}}
48 |
49 | ```yaml
50 | Type: SwitchParameter
51 | Parameter Sets: (All)
52 | Aliases:
53 |
54 | Required: False
55 | Position: Named
56 | Default value: False
57 | Accept pipeline input: False
58 | Accept wildcard characters: False
59 | ```
60 |
61 | ### CommonParameters
62 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
63 |
64 | ## INPUTS
65 |
66 | ## OUTPUTS
67 |
68 | ## NOTES
69 |
70 | ## RELATED LINKS
71 |
--------------------------------------------------------------------------------
/docs/cmdlets/New-PaIkeGateway.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # New-PaIkeGateway
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | New-PaIkeGateway []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### CommonParameters
34 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
35 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
36 |
37 | ## INPUTS
38 |
39 | ### None
40 | ## OUTPUTS
41 |
42 | ### System.Object
43 | ## NOTES
44 |
45 | ## RELATED LINKS
46 |
--------------------------------------------------------------------------------
/docs/cmdlets/New-PaIkeGatewayConfig.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # New-PaIkeGatewayConfig
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | New-PaIkeGatewayConfig [[-Name] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Name
34 | {{Fill Name Description}}
35 |
36 | ```yaml
37 | Type: String
38 | Parameter Sets: (All)
39 | Aliases:
40 |
41 | Required: False
42 | Position: 0
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### CommonParameters
49 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
50 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
51 |
52 | ## INPUTS
53 |
54 | ### None
55 | ## OUTPUTS
56 |
57 | ### System.Object
58 | ## NOTES
59 |
60 | ## RELATED LINKS
61 |
--------------------------------------------------------------------------------
/docs/cmdlets/New-PaIpsecTunnel.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # New-PaIpsecTunnel
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | New-PaIpsecTunnel []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### CommonParameters
34 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
35 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
36 |
37 | ## INPUTS
38 |
39 | ### None
40 | ## OUTPUTS
41 |
42 | ### System.Object
43 | ## NOTES
44 |
45 | ## RELATED LINKS
46 |
--------------------------------------------------------------------------------
/docs/cmdlets/New-PaSecurityPolicy.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # New-PaSecurityPolicy
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | New-PaSecurityPolicy [-Name] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Confirm
34 | Prompts you for confirmation before running the cmdlet.
35 |
36 | ```yaml
37 | Type: SwitchParameter
38 | Parameter Sets: (All)
39 | Aliases: cf
40 |
41 | Required: False
42 | Position: Named
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### -Name
49 | {{Fill Name Description}}
50 |
51 | ```yaml
52 | Type: String
53 | Parameter Sets: (All)
54 | Aliases:
55 |
56 | Required: True
57 | Position: 0
58 | Default value: None
59 | Accept pipeline input: False
60 | Accept wildcard characters: False
61 | ```
62 |
63 | ### -WhatIf
64 | Shows what would happen if the cmdlet runs.
65 | The cmdlet is not run.
66 |
67 | ```yaml
68 | Type: SwitchParameter
69 | Parameter Sets: (All)
70 | Aliases: wi
71 |
72 | Required: False
73 | Position: Named
74 | Default value: None
75 | Accept pipeline input: False
76 | Accept wildcard characters: False
77 | ```
78 |
79 | ### CommonParameters
80 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
81 |
82 | ## INPUTS
83 |
84 | ### None
85 | ## OUTPUTS
86 |
87 | ### System.Object
88 | ## NOTES
89 |
90 | ## RELATED LINKS
91 |
--------------------------------------------------------------------------------
/docs/cmdlets/New-PaTag.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # New-PaTag
9 |
10 | ## SYNOPSIS
11 | Creates a Tag object.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | New-PaTag [-Name] [[-Color] ] [[-Comments] ] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Creates a Tag object.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Color
32 | {{Fill Color Description}}
33 |
34 | ```yaml
35 | Type: String
36 | Parameter Sets: (All)
37 | Aliases:
38 | Accepted values: Red, Green, Blue, Yellow, Copper, Orange, Purple, Gray, Light Green, Cyan, Light Gray, Blue Gray, Lime, Black, Gold, Brown, Green
39 |
40 | Required: False
41 | Position: 1
42 | Default value: None
43 | Accept pipeline input: False
44 | Accept wildcard characters: False
45 | ```
46 |
47 | ### -Comments
48 | {{Fill Comments Description}}
49 |
50 | ```yaml
51 | Type: String
52 | Parameter Sets: (All)
53 | Aliases:
54 |
55 | Required: False
56 | Position: 2
57 | Default value: None
58 | Accept pipeline input: False
59 | Accept wildcard characters: False
60 | ```
61 |
62 | ### -Name
63 | {{Fill Name Description}}
64 |
65 | ```yaml
66 | Type: String
67 | Parameter Sets: (All)
68 | Aliases:
69 |
70 | Required: True
71 | Position: 0
72 | Default value: None
73 | Accept pipeline input: False
74 | Accept wildcard characters: False
75 | ```
76 |
77 | ### CommonParameters
78 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
79 |
80 | ## INPUTS
81 |
82 | ## OUTPUTS
83 |
84 | ## NOTES
85 |
86 | ## RELATED LINKS
87 |
--------------------------------------------------------------------------------
/docs/cmdlets/Remove-PaAddress.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Remove-PaAddress
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ### name
16 | ```
17 | Remove-PaAddress [-Name] [-WhatIf] [-Confirm] []
18 | ```
19 |
20 | ### paobject
21 | ```
22 | Remove-PaAddress [-PaAddress] [-WhatIf] [-Confirm] []
23 | ```
24 |
25 | ## DESCRIPTION
26 | {{Fill in the Description}}
27 |
28 | ## EXAMPLES
29 |
30 | ### Example 1
31 | ```powershell
32 | PS C:\> {{ Add example code here }}
33 | ```
34 |
35 | {{ Add example description here }}
36 |
37 | ## PARAMETERS
38 |
39 | ### -Confirm
40 | Prompts you for confirmation before running the cmdlet.
41 |
42 | ```yaml
43 | Type: SwitchParameter
44 | Parameter Sets: (All)
45 | Aliases: cf
46 |
47 | Required: False
48 | Position: Named
49 | Default value: None
50 | Accept pipeline input: False
51 | Accept wildcard characters: False
52 | ```
53 |
54 | ### -Name
55 | {{Fill Name Description}}
56 |
57 | ```yaml
58 | Type: String
59 | Parameter Sets: name
60 | Aliases:
61 |
62 | Required: True
63 | Position: 0
64 | Default value: None
65 | Accept pipeline input: True (ByValue)
66 | Accept wildcard characters: False
67 | ```
68 |
69 | ### -PaAddress
70 | {{Fill PaAddress Description}}
71 |
72 | ```yaml
73 | Type: PaAddress
74 | Parameter Sets: paobject
75 | Aliases:
76 |
77 | Required: True
78 | Position: 0
79 | Default value: None
80 | Accept pipeline input: True (ByValue)
81 | Accept wildcard characters: False
82 | ```
83 |
84 | ### -WhatIf
85 | Shows what would happen if the cmdlet runs.
86 | The cmdlet is not run.
87 |
88 | ```yaml
89 | Type: SwitchParameter
90 | Parameter Sets: (All)
91 | Aliases: wi
92 |
93 | Required: False
94 | Position: Named
95 | Default value: None
96 | Accept pipeline input: False
97 | Accept wildcard characters: False
98 | ```
99 |
100 | ### CommonParameters
101 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
102 |
103 | ## INPUTS
104 |
105 | ### System.String
106 | ### PaAddress
107 | ## OUTPUTS
108 |
109 | ### System.Object
110 | ## NOTES
111 |
112 | ## RELATED LINKS
113 |
--------------------------------------------------------------------------------
/docs/cmdlets/Remove-PaAddressGroup.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Remove-PaAddressGroup
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ### name
16 | ```
17 | Remove-PaAddressGroup [-Name] [-WhatIf] [-Confirm] []
18 | ```
19 |
20 | ### paobject
21 | ```
22 | Remove-PaAddressGroup [-PaAddressGroup] [-WhatIf] [-Confirm] []
23 | ```
24 |
25 | ## DESCRIPTION
26 | {{Fill in the Description}}
27 |
28 | ## EXAMPLES
29 |
30 | ### Example 1
31 | ```powershell
32 | PS C:\> {{ Add example code here }}
33 | ```
34 |
35 | {{ Add example description here }}
36 |
37 | ## PARAMETERS
38 |
39 | ### -Confirm
40 | Prompts you for confirmation before running the cmdlet.
41 |
42 | ```yaml
43 | Type: SwitchParameter
44 | Parameter Sets: (All)
45 | Aliases: cf
46 |
47 | Required: False
48 | Position: Named
49 | Default value: None
50 | Accept pipeline input: False
51 | Accept wildcard characters: False
52 | ```
53 |
54 | ### -Name
55 | {{Fill Name Description}}
56 |
57 | ```yaml
58 | Type: String
59 | Parameter Sets: name
60 | Aliases:
61 |
62 | Required: True
63 | Position: 0
64 | Default value: None
65 | Accept pipeline input: True (ByValue)
66 | Accept wildcard characters: False
67 | ```
68 |
69 | ### -PaAddressGroup
70 | {{Fill PaAddressGroup Description}}
71 |
72 | ```yaml
73 | Type: PaAddressGroup
74 | Parameter Sets: paobject
75 | Aliases:
76 |
77 | Required: True
78 | Position: 0
79 | Default value: None
80 | Accept pipeline input: True (ByValue)
81 | Accept wildcard characters: False
82 | ```
83 |
84 | ### -WhatIf
85 | Shows what would happen if the cmdlet runs.
86 | The cmdlet is not run.
87 |
88 | ```yaml
89 | Type: SwitchParameter
90 | Parameter Sets: (All)
91 | Aliases: wi
92 |
93 | Required: False
94 | Position: Named
95 | Default value: None
96 | Accept pipeline input: False
97 | Accept wildcard characters: False
98 | ```
99 |
100 | ### CommonParameters
101 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
102 |
103 | ## INPUTS
104 |
105 | ### System.String
106 | ### PaAddressGroup
107 | ## OUTPUTS
108 |
109 | ### System.Object
110 | ## NOTES
111 |
112 | ## RELATED LINKS
113 |
--------------------------------------------------------------------------------
/docs/cmdlets/Remove-PaSecurityPolicy.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Remove-PaSecurityPolicy
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ### name
16 | ```
17 | Remove-PaSecurityPolicy [-Name] [-WhatIf] [-Confirm] []
18 | ```
19 |
20 | ### paobject
21 | ```
22 | Remove-PaSecurityPolicy [-PaSecurityPolicy] [-WhatIf] [-Confirm] []
23 | ```
24 |
25 | ## DESCRIPTION
26 | {{Fill in the Description}}
27 |
28 | ## EXAMPLES
29 |
30 | ### Example 1
31 | ```powershell
32 | PS C:\> {{ Add example code here }}
33 | ```
34 |
35 | {{ Add example description here }}
36 |
37 | ## PARAMETERS
38 |
39 | ### -Confirm
40 | Prompts you for confirmation before running the cmdlet.
41 |
42 | ```yaml
43 | Type: SwitchParameter
44 | Parameter Sets: (All)
45 | Aliases: cf
46 |
47 | Required: False
48 | Position: Named
49 | Default value: None
50 | Accept pipeline input: False
51 | Accept wildcard characters: False
52 | ```
53 |
54 | ### -Name
55 | {{Fill Name Description}}
56 |
57 | ```yaml
58 | Type: String
59 | Parameter Sets: name
60 | Aliases:
61 |
62 | Required: True
63 | Position: 0
64 | Default value: None
65 | Accept pipeline input: True (ByValue)
66 | Accept wildcard characters: False
67 | ```
68 |
69 | ### -PaSecurityPolicy
70 | {{Fill PaSecurityPolicy Description}}
71 |
72 | ```yaml
73 | Type: PaSecurityPolicy
74 | Parameter Sets: paobject
75 | Aliases:
76 |
77 | Required: True
78 | Position: 0
79 | Default value: None
80 | Accept pipeline input: True (ByValue)
81 | Accept wildcard characters: False
82 | ```
83 |
84 | ### -WhatIf
85 | Shows what would happen if the cmdlet runs.
86 | The cmdlet is not run.
87 |
88 | ```yaml
89 | Type: SwitchParameter
90 | Parameter Sets: (All)
91 | Aliases: wi
92 |
93 | Required: False
94 | Position: Named
95 | Default value: None
96 | Accept pipeline input: False
97 | Accept wildcard characters: False
98 | ```
99 |
100 | ### CommonParameters
101 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
102 |
103 | ## INPUTS
104 |
105 | ### System.String
106 | ### PaSecurityPolicy
107 | ## OUTPUTS
108 |
109 | ### System.Object
110 | ## NOTES
111 |
112 | ## RELATED LINKS
113 |
--------------------------------------------------------------------------------
/docs/cmdlets/Remove-PaTag.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Remove-PaTag
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ### name
16 | ```
17 | Remove-PaTag [-Name] [-WhatIf] [-Confirm] []
18 | ```
19 |
20 | ### paobject
21 | ```
22 | Remove-PaTag [-PaTag] [-WhatIf] [-Confirm] []
23 | ```
24 |
25 | ## DESCRIPTION
26 | {{Fill in the Description}}
27 |
28 | ## EXAMPLES
29 |
30 | ### Example 1
31 | ```powershell
32 | PS C:\> {{ Add example code here }}
33 | ```
34 |
35 | {{ Add example description here }}
36 |
37 | ## PARAMETERS
38 |
39 | ### -Confirm
40 | Prompts you for confirmation before running the cmdlet.
41 |
42 | ```yaml
43 | Type: SwitchParameter
44 | Parameter Sets: (All)
45 | Aliases: cf
46 |
47 | Required: False
48 | Position: Named
49 | Default value: None
50 | Accept pipeline input: False
51 | Accept wildcard characters: False
52 | ```
53 |
54 | ### -Name
55 | {{Fill Name Description}}
56 |
57 | ```yaml
58 | Type: String
59 | Parameter Sets: name
60 | Aliases:
61 |
62 | Required: True
63 | Position: 0
64 | Default value: None
65 | Accept pipeline input: True (ByValue)
66 | Accept wildcard characters: False
67 | ```
68 |
69 | ### -PaTag
70 | {{Fill PaTag Description}}
71 |
72 | ```yaml
73 | Type: PaTag
74 | Parameter Sets: paobject
75 | Aliases:
76 |
77 | Required: True
78 | Position: 0
79 | Default value: None
80 | Accept pipeline input: True (ByValue)
81 | Accept wildcard characters: False
82 | ```
83 |
84 | ### -WhatIf
85 | Shows what would happen if the cmdlet runs.
86 | The cmdlet is not run.
87 |
88 | ```yaml
89 | Type: SwitchParameter
90 | Parameter Sets: (All)
91 | Aliases: wi
92 |
93 | Required: False
94 | Position: Named
95 | Default value: None
96 | Accept pipeline input: False
97 | Accept wildcard characters: False
98 | ```
99 |
100 | ### CommonParameters
101 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
102 |
103 | ## INPUTS
104 |
105 | ### System.String
106 | ### PaTag
107 | ## OUTPUTS
108 |
109 | ### System.Object
110 | ## NOTES
111 |
112 | ## RELATED LINKS
113 |
--------------------------------------------------------------------------------
/docs/cmdlets/Resolve-PaAddress.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Resolve-PaAddress
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Resolve-PaAddress [-Name] [[-Addresses] ] [[-AddressGroups] ]
17 | []
18 | ```
19 |
20 | ## DESCRIPTION
21 | {{Fill in the Description}}
22 |
23 | ## EXAMPLES
24 |
25 | ### Example 1
26 | ```powershell
27 | PS C:\> {{ Add example code here }}
28 | ```
29 |
30 | {{ Add example description here }}
31 |
32 | ## PARAMETERS
33 |
34 | ### -AddressGroups
35 | {{Fill AddressGroups Description}}
36 |
37 | ```yaml
38 | Type: PaAddressGroup[]
39 | Parameter Sets: (All)
40 | Aliases:
41 |
42 | Required: False
43 | Position: 2
44 | Default value: None
45 | Accept pipeline input: False
46 | Accept wildcard characters: False
47 | ```
48 |
49 | ### -Addresses
50 | {{Fill Addresses Description}}
51 |
52 | ```yaml
53 | Type: PaAddress[]
54 | Parameter Sets: (All)
55 | Aliases:
56 |
57 | Required: False
58 | Position: 1
59 | Default value: None
60 | Accept pipeline input: False
61 | Accept wildcard characters: False
62 | ```
63 |
64 | ### -Name
65 | {{Fill Name Description}}
66 |
67 | ```yaml
68 | Type: String
69 | Parameter Sets: (All)
70 | Aliases:
71 |
72 | Required: True
73 | Position: 0
74 | Default value: None
75 | Accept pipeline input: True (ByValue)
76 | Accept wildcard characters: False
77 | ```
78 |
79 | ### CommonParameters
80 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
81 |
82 | ## INPUTS
83 |
84 | ### System.String
85 | ## OUTPUTS
86 |
87 | ### System.Object
88 | ## NOTES
89 |
90 | ## RELATED LINKS
91 |
--------------------------------------------------------------------------------
/docs/cmdlets/Resolve-PaNatPolicy.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Resolve-PaNatPolicy
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Resolve-PaNatPolicy [-PaNatPolicy] [[-Addresses] ]
17 | [[-AddressGroups] ] [[-Services] ] [[-ServiceGroups] ]
18 | []
19 | ```
20 |
21 | ## DESCRIPTION
22 | {{Fill in the Description}}
23 |
24 | ## EXAMPLES
25 |
26 | ### Example 1
27 | ```powershell
28 | PS C:\> {{ Add example code here }}
29 | ```
30 |
31 | {{ Add example description here }}
32 |
33 | ## PARAMETERS
34 |
35 | ### -AddressGroups
36 | {{Fill AddressGroups Description}}
37 |
38 | ```yaml
39 | Type: PaAddressGroup[]
40 | Parameter Sets: (All)
41 | Aliases:
42 |
43 | Required: False
44 | Position: 2
45 | Default value: None
46 | Accept pipeline input: False
47 | Accept wildcard characters: False
48 | ```
49 |
50 | ### -Addresses
51 | {{Fill Addresses Description}}
52 |
53 | ```yaml
54 | Type: PaAddress[]
55 | Parameter Sets: (All)
56 | Aliases:
57 |
58 | Required: False
59 | Position: 1
60 | Default value: None
61 | Accept pipeline input: False
62 | Accept wildcard characters: False
63 | ```
64 |
65 | ### -PaNatPolicy
66 | {{Fill PaNatPolicy Description}}
67 |
68 | ```yaml
69 | Type: PaNatPolicy
70 | Parameter Sets: (All)
71 | Aliases:
72 |
73 | Required: True
74 | Position: 0
75 | Default value: None
76 | Accept pipeline input: True (ByValue)
77 | Accept wildcard characters: False
78 | ```
79 |
80 | ### -ServiceGroups
81 | {{Fill ServiceGroups Description}}
82 |
83 | ```yaml
84 | Type: PaServiceGroup[]
85 | Parameter Sets: (All)
86 | Aliases:
87 |
88 | Required: False
89 | Position: 4
90 | Default value: None
91 | Accept pipeline input: False
92 | Accept wildcard characters: False
93 | ```
94 |
95 | ### -Services
96 | {{Fill Services Description}}
97 |
98 | ```yaml
99 | Type: PaService[]
100 | Parameter Sets: (All)
101 | Aliases:
102 |
103 | Required: False
104 | Position: 3
105 | Default value: None
106 | Accept pipeline input: False
107 | Accept wildcard characters: False
108 | ```
109 |
110 | ### CommonParameters
111 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
112 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
113 |
114 | ## INPUTS
115 |
116 | ### PaNatPolicy
117 | ## OUTPUTS
118 |
119 | ### System.Object
120 | ## NOTES
121 |
122 | ## RELATED LINKS
123 |
--------------------------------------------------------------------------------
/docs/cmdlets/Resolve-PaSecurityPolicy.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Resolve-PaSecurityPolicy
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Resolve-PaSecurityPolicy [-PaSecurityPolicy] [[-Addresses] ]
17 | [[-AddressGroups] ] [[-Services] ] [[-ServiceGroups] ]
18 | []
19 | ```
20 |
21 | ## DESCRIPTION
22 | {{Fill in the Description}}
23 |
24 | ## EXAMPLES
25 |
26 | ### Example 1
27 | ```powershell
28 | PS C:\> {{ Add example code here }}
29 | ```
30 |
31 | {{ Add example description here }}
32 |
33 | ## PARAMETERS
34 |
35 | ### -AddressGroups
36 | {{Fill AddressGroups Description}}
37 |
38 | ```yaml
39 | Type: PaAddressGroup[]
40 | Parameter Sets: (All)
41 | Aliases:
42 |
43 | Required: False
44 | Position: 2
45 | Default value: None
46 | Accept pipeline input: False
47 | Accept wildcard characters: False
48 | ```
49 |
50 | ### -Addresses
51 | {{Fill Addresses Description}}
52 |
53 | ```yaml
54 | Type: PaAddress[]
55 | Parameter Sets: (All)
56 | Aliases:
57 |
58 | Required: False
59 | Position: 1
60 | Default value: None
61 | Accept pipeline input: False
62 | Accept wildcard characters: False
63 | ```
64 |
65 | ### -PaSecurityPolicy
66 | {{Fill PaSecurityPolicy Description}}
67 |
68 | ```yaml
69 | Type: PaSecurityPolicy
70 | Parameter Sets: (All)
71 | Aliases:
72 |
73 | Required: True
74 | Position: 0
75 | Default value: None
76 | Accept pipeline input: True (ByValue)
77 | Accept wildcard characters: False
78 | ```
79 |
80 | ### -ServiceGroups
81 | {{Fill ServiceGroups Description}}
82 |
83 | ```yaml
84 | Type: PaServiceGroup[]
85 | Parameter Sets: (All)
86 | Aliases:
87 |
88 | Required: False
89 | Position: 4
90 | Default value: None
91 | Accept pipeline input: False
92 | Accept wildcard characters: False
93 | ```
94 |
95 | ### -Services
96 | {{Fill Services Description}}
97 |
98 | ```yaml
99 | Type: PaService[]
100 | Parameter Sets: (All)
101 | Aliases:
102 |
103 | Required: False
104 | Position: 3
105 | Default value: None
106 | Accept pipeline input: False
107 | Accept wildcard characters: False
108 | ```
109 |
110 | ### CommonParameters
111 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
112 |
113 | ## INPUTS
114 |
115 | ### PaSecurityPolicy
116 | ## OUTPUTS
117 |
118 | ### System.Object
119 | ## NOTES
120 |
121 | ## RELATED LINKS
122 |
--------------------------------------------------------------------------------
/docs/cmdlets/Resolve-PaService.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Resolve-PaService
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Resolve-PaService [-Name] [[-Services] ] [[-ServiceGroups] ]
17 | []
18 | ```
19 |
20 | ## DESCRIPTION
21 | {{Fill in the Description}}
22 |
23 | ## EXAMPLES
24 |
25 | ### Example 1
26 | ```powershell
27 | PS C:\> {{ Add example code here }}
28 | ```
29 |
30 | {{ Add example description here }}
31 |
32 | ## PARAMETERS
33 |
34 | ### -Name
35 | {{Fill Name Description}}
36 |
37 | ```yaml
38 | Type: String
39 | Parameter Sets: (All)
40 | Aliases:
41 |
42 | Required: True
43 | Position: 0
44 | Default value: None
45 | Accept pipeline input: True (ByValue)
46 | Accept wildcard characters: False
47 | ```
48 |
49 | ### -ServiceGroups
50 | {{Fill ServiceGroups Description}}
51 |
52 | ```yaml
53 | Type: PaServiceGroup[]
54 | Parameter Sets: (All)
55 | Aliases:
56 |
57 | Required: False
58 | Position: 2
59 | Default value: None
60 | Accept pipeline input: False
61 | Accept wildcard characters: False
62 | ```
63 |
64 | ### -Services
65 | {{Fill Services Description}}
66 |
67 | ```yaml
68 | Type: PaService[]
69 | Parameter Sets: (All)
70 | Aliases:
71 |
72 | Required: False
73 | Position: 1
74 | Default value: None
75 | Accept pipeline input: False
76 | Accept wildcard characters: False
77 | ```
78 |
79 | ### CommonParameters
80 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
81 |
82 | ## INPUTS
83 |
84 | ### System.String
85 | ## OUTPUTS
86 |
87 | ### System.Object
88 | ## NOTES
89 |
90 | ## RELATED LINKS
91 |
--------------------------------------------------------------------------------
/docs/cmdlets/Restart-PaIpsecTunnel.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Restart-PaIpsecTunnel
9 |
10 | ## SYNOPSIS
11 | Restarts active IPSEC Tunnel.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Restart-PaIpsecTunnel [-Name] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Clears exising IPSEC and IKE connections for a given tunnel then restarts them with the 'test' command.
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> Restart-PaIpsecTunnel -Name 'MyIpsecTunnel'
27 | ```
28 |
29 | Clears existing IPSEC Tunnel connection.
30 |
31 | ## PARAMETERS
32 |
33 | ### -Name
34 | Name of IPSEC Tunnel.
35 |
36 | ```yaml
37 | Type: String
38 | Parameter Sets: (All)
39 | Aliases:
40 |
41 | Required: True
42 | Position: 0
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### CommonParameters
49 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
50 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
51 |
52 | ## INPUTS
53 |
54 | ### None
55 | ## OUTPUTS
56 |
57 | ### System.Object
58 | ## NOTES
59 |
60 | ## RELATED LINKS
61 |
--------------------------------------------------------------------------------
/docs/cmdlets/Set-PaNatPolicy.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Set-PaNatPolicy
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Set-PaNatPolicy [-PaNatPolicy] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Confirm
34 | Prompts you for confirmation before running the cmdlet.
35 |
36 | ```yaml
37 | Type: SwitchParameter
38 | Parameter Sets: (All)
39 | Aliases: cf
40 |
41 | Required: False
42 | Position: Named
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### -PaNatPolicy
49 | {{Fill PaNatPolicy Description}}
50 |
51 | ```yaml
52 | Type: PaNatPolicy
53 | Parameter Sets: (All)
54 | Aliases:
55 |
56 | Required: True
57 | Position: 0
58 | Default value: None
59 | Accept pipeline input: True (ByValue)
60 | Accept wildcard characters: False
61 | ```
62 |
63 | ### -WhatIf
64 | Shows what would happen if the cmdlet runs.
65 | The cmdlet is not run.
66 |
67 | ```yaml
68 | Type: SwitchParameter
69 | Parameter Sets: (All)
70 | Aliases: wi
71 |
72 | Required: False
73 | Position: Named
74 | Default value: None
75 | Accept pipeline input: False
76 | Accept wildcard characters: False
77 | ```
78 |
79 | ### CommonParameters
80 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
81 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
82 |
83 | ## INPUTS
84 |
85 | ### PaNatPolicy
86 | ## OUTPUTS
87 |
88 | ### System.Object
89 | ## NOTES
90 |
91 | ## RELATED LINKS
92 |
--------------------------------------------------------------------------------
/docs/cmdlets/Set-PaTargetDeviceGroup.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Set-PaTargetDeviceGroup
9 |
10 | ## SYNOPSIS
11 | Changes target Device Group for current session.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Set-PaTargetDeviceGroup [-Name] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Changes target Device Group for current session.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 | Set-PaTargetDeviceGroup -Name "remote-sites"
27 | ```
28 |
29 | Changes context in panorama to the "remote-sites" Device Group
30 |
31 | ## PARAMETERS
32 |
33 | ### -Name
34 | Name of the desired Device Group.
35 |
36 | ```yaml
37 | Type: String
38 | Parameter Sets: (All)
39 | Aliases:
40 |
41 | Required: True
42 | Position: 0
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### CommonParameters
49 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
50 |
51 | ## INPUTS
52 |
53 | ## OUTPUTS
54 |
55 | ## NOTES
56 |
57 | ## RELATED LINKS
58 |
--------------------------------------------------------------------------------
/docs/cmdlets/Set-PaTargetVsys.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Set-PaTargetVsys
9 |
10 | ## SYNOPSIS
11 | Changes target Vsys for current session.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Set-PaTargetVsys [-Name] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | Changes target Vsys for current session.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 |
27 | ```
28 |
29 | ## PARAMETERS
30 |
31 | ### -Confirm
32 | Prompts you for confirmation before running the cmdlet.
33 |
34 | ```yaml
35 | Type: SwitchParameter
36 | Parameter Sets: (All)
37 | Aliases: cf
38 |
39 | Required: False
40 | Position: Named
41 | Default value: None
42 | Accept pipeline input: False
43 | Accept wildcard characters: False
44 | ```
45 |
46 | ### -Name
47 | {{Fill Name Description}}
48 |
49 | ```yaml
50 | Type: String
51 | Parameter Sets: (All)
52 | Aliases:
53 |
54 | Required: True
55 | Position: 0
56 | Default value: None
57 | Accept pipeline input: False
58 | Accept wildcard characters: False
59 | ```
60 |
61 | ### -WhatIf
62 | Shows what would happen if the cmdlet runs.
63 | The cmdlet is not run.
64 |
65 | ```yaml
66 | Type: SwitchParameter
67 | Parameter Sets: (All)
68 | Aliases: wi
69 |
70 | Required: False
71 | Position: Named
72 | Default value: None
73 | Accept pipeline input: False
74 | Accept wildcard characters: False
75 | ```
76 |
77 | ### CommonParameters
78 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
79 |
80 | ## INPUTS
81 |
82 | ## OUTPUTS
83 |
84 | ## NOTES
85 |
86 | ## RELATED LINKS
87 |
--------------------------------------------------------------------------------
/docs/cmdlets/Test-PaIkeGateway.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Test-PaIkeGateway
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Test-PaIkeGateway [-Name] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Confirm
34 | Prompts you for confirmation before running the cmdlet.
35 |
36 | ```yaml
37 | Type: SwitchParameter
38 | Parameter Sets: (All)
39 | Aliases: cf
40 |
41 | Required: False
42 | Position: Named
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### -Name
49 | {{Fill Name Description}}
50 |
51 | ```yaml
52 | Type: String
53 | Parameter Sets: (All)
54 | Aliases:
55 |
56 | Required: True
57 | Position: 0
58 | Default value: None
59 | Accept pipeline input: False
60 | Accept wildcard characters: False
61 | ```
62 |
63 | ### -WhatIf
64 | Shows what would happen if the cmdlet runs.
65 | The cmdlet is not run.
66 |
67 | ```yaml
68 | Type: SwitchParameter
69 | Parameter Sets: (All)
70 | Aliases: wi
71 |
72 | Required: False
73 | Position: Named
74 | Default value: None
75 | Accept pipeline input: False
76 | Accept wildcard characters: False
77 | ```
78 |
79 | ### CommonParameters
80 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
81 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
82 |
83 | ## INPUTS
84 |
85 | ### None
86 | ## OUTPUTS
87 |
88 | ### System.Object
89 | ## NOTES
90 |
91 | ## RELATED LINKS
92 |
--------------------------------------------------------------------------------
/docs/cmdlets/Test-PaIpsecTunnel.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: PowerAlto-help.xml
3 | Module Name: PowerAlto
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Test-PaIpsecTunnel
9 |
10 | ## SYNOPSIS
11 | {{Fill in the Synopsis}}
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Test-PaIpsecTunnel [-Name] [-WhatIf] [-Confirm] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | {{Fill in the Description}}
21 |
22 | ## EXAMPLES
23 |
24 | ### Example 1
25 | ```powershell
26 | PS C:\> {{ Add example code here }}
27 | ```
28 |
29 | {{ Add example description here }}
30 |
31 | ## PARAMETERS
32 |
33 | ### -Confirm
34 | Prompts you for confirmation before running the cmdlet.
35 |
36 | ```yaml
37 | Type: SwitchParameter
38 | Parameter Sets: (All)
39 | Aliases: cf
40 |
41 | Required: False
42 | Position: Named
43 | Default value: None
44 | Accept pipeline input: False
45 | Accept wildcard characters: False
46 | ```
47 |
48 | ### -Name
49 | {{Fill Name Description}}
50 |
51 | ```yaml
52 | Type: String
53 | Parameter Sets: (All)
54 | Aliases:
55 |
56 | Required: True
57 | Position: 0
58 | Default value: None
59 | Accept pipeline input: False
60 | Accept wildcard characters: False
61 | ```
62 |
63 | ### -WhatIf
64 | Shows what would happen if the cmdlet runs.
65 | The cmdlet is not run.
66 |
67 | ```yaml
68 | Type: SwitchParameter
69 | Parameter Sets: (All)
70 | Aliases: wi
71 |
72 | Required: False
73 | Position: Named
74 | Default value: None
75 | Accept pipeline input: False
76 | Accept wildcard characters: False
77 | ```
78 |
79 | ### CommonParameters
80 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
81 | For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
82 |
83 | ## INPUTS
84 |
85 | ### None
86 | ## OUTPUTS
87 |
88 | ### System.Object
89 | ## NOTES
90 |
91 | ## RELATED LINKS
92 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # PowerAlto
2 |
3 | PowerAlto is a PowerShell module used to interact with Palo Alto Firewalls as well as Panorama.
4 |
5 | ## Installation
6 |
7 | As Classes (introduced in PowerShell 5) are heavily used in PowerAlto, PowerShell 5 or PowerShell Core is required to run this module.
8 |
9 | ```powershell
10 | Install-Module PowerAlto
11 | ```
12 |
13 | ## Usage
14 |
15 | Basic usage of this module consists of connecting to a device and then running API calls. The initial connection can be performed with a PSCredential object or with an API key.
16 |
17 | ### Connecting
18 |
19 | ```powershell
20 | # Connecting with a PSCredential
21 | Get-PaDevice -DeviceAddress pa.example.com -Credential (Get-Credential)
22 |
23 | # Connecting with an API key
24 | Get-PaDevice -DeviceAddress pa.example.com -ApiKey 'mysupersecretapikey'
25 | ```
26 |
27 | ### Generic API Calls
28 |
29 | The following generic cmdlets are available to make config, operational, report, and commit api calls.
30 |
31 | * Invoke-PaApiConfig
32 | * Invoke-PaApiOperation
33 | * Invoke-PaApiReport
34 | * Invoke-PaCommit
35 |
36 | ### Specific API Calls
37 |
38 | More specific cmdlets are available for commonly performed tasks.
39 |
40 | * Get-PaAddress
41 | * Get-PaAddressGroup
42 | * Get-PaConfigDiff
43 | * Get-PaCustomReport
44 | * Get-PaDevice
45 | * Get-PaInterface
46 | * Get-PaJob
47 | * Get-PaNatPolicy
48 | * Get-PaReportJob
49 | * Get-PaSecurityPolicy
50 | * Get-PaTag
51 | * Get-PaUrlCategory
52 | * Invoke-PaCustomReport
53 | * Move-PaSecurityPolicy
54 | * New-PaTag
55 | * Remove-PaAddress
56 | * Remove-PaAddressGroup
57 | * Remove-PaSecurityPolicy
58 | * Remove-PaTag
59 | * Set-PaAddress
60 | * Set-PaAddressGroup
61 | * Set-PaCustomReport
62 | * Set-PaSecurityPolicy
63 | * Set-PaTag
64 | * Set-PaTargetDeviceGroup
65 | * Set-PaTargetVsys
66 | * Set-PaUrlCategory
67 |
--------------------------------------------------------------------------------