Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Powershell

AddPIFirewall Class

  • Last UpdatedDec 15, 2025
  • 3 minute read
AddPIFirewall Class

Add an entry in the PI Firewall Table

The Add-PIFirewall cmdlet adds an entry in the PI Firewall table

The connection parameter specifies which connection to a PI Data Archive to use.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellOSICmdletBaseWithConnection
            OSIsoft.PowerShellAddPIFirewall

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)

Syntax

[CmdletAttribute("Add", "PIFirewall", SupportsShouldProcess = true)]
public class AddPIFirewall : OSICmdletBaseWithConnection
<CmdletAttribute("Add", "PIFirewall", SupportsShouldProcess := true)>
Public Class AddPIFirewall
	Inherits OSICmdletBaseWithConnection

Dim instance As AddPIFirewall
[CmdletAttribute(L"Add", L"PIFirewall", SupportsShouldProcess = true)]
public ref class AddPIFirewall : public OSICmdletBaseWithConnection
[<CmdletAttribute("Add", "PIFirewall", SupportsShouldProcess = true)>]
type AddPIFirewall =  
    class
        inherit OSICmdletBaseWithConnection
    end

The AddPIFirewall type exposes the following members.

Constructors

  NameDescription
Public method
AddPIFirewall

Properties

  NameDescription
Public property
Connection

Connection to a PI Data Archive for which to add the PI Firewall entry

(Overrides OSICmdletBaseWithConnectionConnection.)
Public property
Hostmask

Hostmask of the PI Firewall entry to add

Public property
Value

Value of the PI Firewall entry to add. Valid values are:

"Allow" : "Disallow"

Examples

Add-PIFirewall -Hostmask "192.168.0.56" -Value Disallow -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Adds an entry in the PI Firewall table disallowing connections from IP Address 192.168.0.56 on the "PISRV1" PI Data Archive server.

See Also

TitleResults for “How to create a CRG?”Also Available in