J81.NSToolkit.Config/Public/ns-functions-config-network.ps1
function Invoke-NSClearInterface { <# .SYNOPSIS Clear Networking commands. config Object. .DESCRIPTION Configuration for interface resource. .PARAMETER Id Interface number, in C/U format, where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. * LA - Indicates a link aggregation port. * LO - Indicates a loop back port. U is a unique integer for representing an interface in a particular port group. .EXAMPLE PS C:\>Invoke-NSClearInterface -id <string> An example how to clear Interface config Object(s). .NOTES File Name : Invoke-NSClearInterface Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/Interface/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id ) begin { Write-Verbose "Invoke-NSClearInterface: Starting" } process { try { $payload = @{ id = $id } if ( $PSCmdlet.ShouldProcess($Name, "Clear Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type Interface -Action clear -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSClearInterface: Finished" } } function Invoke-NSUpdateInterface { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for interface resource. .PARAMETER Id Interface number, in C/U format, where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. * LA - Indicates a link aggregation port. * LO - Indicates a loop back port. U is a unique integer for representing an interface in a particular port group. .PARAMETER Speed Ethernet speed of the interface, in Mbps. Notes: * If you set the speed as AUTO, the Citrix ADC attempts to auto-negotiate or auto-sense the link speed of the interface when it is UP. You must enable auto negotiation on the interface. * If you set a speed other than AUTO, you must specify the same speed for the peer network device. Mismatched speed and duplex settings between the peer devices of a link lead to link errors, packet loss, and other errors. Some interfaces do not support certain speeds. If you specify an unsupported speed, an error message appears. Possible values = AUTO, 10, 100, 1000, 10000, 25000, 40000, 50000, 100000 .PARAMETER Duplex The duplex mode for the interface. Notes:* If you set the duplex mode to AUTO, the Citrix ADC attempts to auto-negotiate the duplex mode of the interface when it is UP. You must enable auto negotiation on the interface. If you set a duplex mode other than AUTO, you must specify the same duplex mode for the peer network device. Mismatched speed and duplex settings between the peer devices of a link lead to link errors, packet loss, and other errors. Possible values = AUTO, HALF, FULL .PARAMETER Flowctl 802.3x flow control setting for the interface. The 802.3x specification does not define flow control for 10 Mbps and 100 Mbps speeds, but if a Gigabit Ethernet interface operates at those speeds, the flow control settings can be applied. The flow control setting that is finally applied to an interface depends on auto-negotiation. With the ON option, the peer negotiates the flow control, but the appliance then forces two-way flow control for the interface. Possible values = OFF, RX, TX, RXTX, ON .PARAMETER Autoneg Auto-negotiation state of the interface. With the ENABLED setting, the Citrix ADC auto-negotiates the speed and duplex settings with the peer network device on the link. The Citrix ADC appliance auto-negotiates the settings of only those parameters (speed or duplex mode) for which the value is set as AUTO. Possible values = DISABLED, ENABLED .PARAMETER Hamonitor In a High Availability (HA) configuration, monitor the interface for failure events. In an HA configuration, an interface that has HA MON enabled and is not bound to any Failover Interface Set (FIS), is a critical interface. Failure or disabling of any critical interface triggers HA failover. Possible values = ON, OFF .PARAMETER Haheartbeat In a High Availability (HA) or Cluster configuration, configure the interface for sending heartbeats. In an HA or Cluster configuration, an interface that has HA Heartbeat disabled should not send the heartbeats. Possible values = OFF, ON .PARAMETER Mtu The Maximum Transmission Unit (MTU) is the largest packet size, measured in bytes excluding 14 bytes ethernet header and 4 bytes CRC, that can be transmitted and received by an interface. The default value of MTU is 1500 on all the interface of Citrix ADC, some Cloud Platforms will restrict Citrix ADC to use the lesser default value. Any MTU value more than 1500 is called Jumbo MTU and will make the interface as jumbo enabled. The Maximum Jumbo MTU in Citrix ADC is 9216, however, some Virtualized / Cloud Platforms will have lesser Maximum Jumbo MTU Value (9000). In the case of Cluster, the Backplane interface requires an MTU value of 78 bytes more than the Max MTU configured on any other Data-Plane Interface. When the Data plane interfaces are all at default 1500 MTU, Cluster Back Plane will be automatically set to 1578 (1500 + 78) MTU. If a Backplane interface is reset to Data Plane Interface, then the 1578 MTU will be automatically reset to the default MTU of 1500(or whatever lesser default value). If any data plane interface of a Cluster is configured with a Jumbo MTU ( > 1500), then all backplane interfaces require to be configured with a minimum MTU of 'Highest Data Plane MTU in the Cluster + 78'. That makes the maximum Jumbo MTU for any Data-Plane Interface in a Cluster System to be '9138 (9216 - 78)., where 9216 is the maximum Jumbo MTU. On certain Virtualized / Cloud Platforms, the maximum possible MTU is restricted to a lesser value, Similar calculation can be applied, Maximum Data Plane MTU in Cluster = (Maximum possible MTU - 78). Maximum value = 9216 .PARAMETER Ringsize The receive ringsize of the interface. A higher number provides more number of buffers in handling incoming traffic. Maximum value = 16384 .PARAMETER Ringtype The receive ringtype of the interface (Fixed or Elastic). A fixed ring type pre-allocates configured number of buffers irrespective of traffic rate. In contrast, an elastic ring, expands and shrinks based on incoming traffic rate. Possible values = Elastic, Fixed .PARAMETER Tagall Add a four-byte 802.1q tag to every packet sent on this interface. The ON setting applies the tag for this interface's native VLAN. OFF applies the tag for all VLANs other than the native VLAN. Possible values = ON, OFF .PARAMETER Trunk This argument is deprecated by tagall. Possible values = ON, OFF .PARAMETER Trunkmode Accept and send 802.1q VLAN tagged packets, based on Allowed Vlan List of this interface. Possible values = ON, OFF .PARAMETER Trunkallowedvlan VLAN ID or range of VLAN IDs will be allowed on this trunk interface. In the command line interface, separate the range with a hyphen. For example: 40-90. .PARAMETER Lacpmode Bind the interface to a LA channel created by the Link Aggregation control protocol (LACP). Available settings function as follows: * Active - The LA channel port of the Citrix ADC generates LACPDU messages on a regular basis, regardless of any need expressed by its peer device to receive them. * Passive - The LA channel port of the Citrix ADC does not transmit LACPDU messages unless the peer device port is in the active mode. That is, the port does not speak unless spoken to. * Disabled - Unbinds the interface from the LA channel. If this is the only interface in the LA channel, the LA channel is removed. Possible values = DISABLED, ACTIVE, PASSIVE .PARAMETER Lacpkey Integer identifying the LACP LA channel to which the interface is to be bound. For an LA channel of the Citrix ADC, this digit specifies the variable x of an LA channel in LA/x notation, where x can range from 1 to 8. For example, if you specify 3 as the LACP key for an LA channel, the interface is bound to the LA channel LA/3. For an LA channel of a cluster configuration, this digit specifies the variable y of a cluster LA channel in CLA/(y-4) notation, where y can range from 5 to 8. For example, if you specify 6 as the LACP key for a cluster LA channel, the interface is bound to the cluster LA channel CLA/2. Maximum value = 8 .PARAMETER Lagtype Type of entity (Citrix ADC or cluster configuration) for which to create the channel. Possible values = NODE, CLUSTER .PARAMETER Lacppriority LACP port priority, expressed as an integer. The lower the number, the higher the priority. The Citrix ADC limits the number of interfaces in an LA channel to sixteen. Maximum value = 65535 .PARAMETER Lacptimeout Interval at which the Citrix ADC sends LACPDU messages to the peer device on the LA channel. Available settings function as follows: LONG - 30 seconds. SHORT - 1 second. Possible values = LONG, SHORT .PARAMETER Ifalias Alias name for the interface. Used only to enhance readability. To perform any operations, you have to specify the interface ID. .PARAMETER Throughput Low threshold value for the throughput of the interface, in Mbps. In an HA configuration, failover is triggered if the interface has HA MON enabled and the throughput is below the specified the threshold. Maximum value = 160000 .PARAMETER Linkredundancy Link Redundancy for Cluster LAG. Possible values = ON, OFF .PARAMETER Bandwidthhigh High threshold value for the bandwidth usage of the interface, in Mbps. The Citrix ADC generates an SNMP trap message when the bandwidth usage of the interface is greater than or equal to the specified high threshold value. Maximum value = 160000 .PARAMETER Bandwidthnormal Normal threshold value for the bandwidth usage of the interface, in Mbps. When the bandwidth usage of the interface becomes less than or equal to the specified normal threshold after exceeding the high threshold, the Citrix ADC generates an SNMP trap message to indicate that the bandwidth usage has returned to normal. Maximum value = 160000 .PARAMETER Lldpmode Link Layer Discovery Protocol (LLDP) mode for an interface. The resultant LLDP mode of an interface depends on the LLDP mode configured at the global and the interface levels. Possible values = NONE, TRANSMITTER, RECEIVER, TRANSCEIVER .PARAMETER Lrsetpriority LRSET port priority, expressed as an integer ranging from 1 to 1024. The highest priority is 1. The Citrix ADC limits the number of interfaces in an LRSET to 8. Within a LRSET the highest LR Priority Interface is considered as the first candidate for the Active interface, if the interface is UP. Maximum value = 1024 .PARAMETER PassThru Return details about the created Interface item. .EXAMPLE PS C:\>Invoke-NSUpdateInterface -id <string> An example how to update Interface config Object(s). .NOTES File Name : Invoke-NSUpdateInterface Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/Interface/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [ValidateSet('AUTO', '10', '100', '1000', '10000', '25000', '40000', '50000', '100000')] [string]$Speed, [ValidateSet('AUTO', 'HALF', 'FULL')] [string]$Duplex, [ValidateSet('OFF', 'RX', 'TX', 'RXTX', 'ON')] [string]$Flowctl, [ValidateSet('DISABLED', 'ENABLED')] [string]$Autoneg, [ValidateSet('ON', 'OFF')] [string]$Hamonitor, [ValidateSet('OFF', 'ON')] [string]$Haheartbeat, [double]$Mtu, [double]$Ringsize, [ValidateSet('Elastic', 'Fixed')] [string]$Ringtype, [ValidateSet('ON', 'OFF')] [string]$Tagall, [ValidateSet('ON', 'OFF')] [string]$Trunk, [ValidateSet('ON', 'OFF')] [string]$Trunkmode, [ValidateLength(1, 4094)] [string[]]$Trunkallowedvlan, [ValidateSet('DISABLED', 'ACTIVE', 'PASSIVE')] [string]$Lacpmode, [double]$Lacpkey, [ValidateSet('NODE', 'CLUSTER')] [string]$Lagtype, [double]$Lacppriority, [ValidateSet('LONG', 'SHORT')] [string]$Lacptimeout, [string]$Ifalias, [double]$Throughput, [ValidateSet('ON', 'OFF')] [string]$Linkredundancy, [double]$Bandwidthhigh, [double]$Bandwidthnormal, [ValidateSet('NONE', 'TRANSMITTER', 'RECEIVER', 'TRANSCEIVER')] [string]$Lldpmode, [double]$Lrsetpriority, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateInterface: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('speed') ) { $payload.Add('speed', $speed) } if ( $PSBoundParameters.ContainsKey('duplex') ) { $payload.Add('duplex', $duplex) } if ( $PSBoundParameters.ContainsKey('flowctl') ) { $payload.Add('flowctl', $flowctl) } if ( $PSBoundParameters.ContainsKey('autoneg') ) { $payload.Add('autoneg', $autoneg) } if ( $PSBoundParameters.ContainsKey('hamonitor') ) { $payload.Add('hamonitor', $hamonitor) } if ( $PSBoundParameters.ContainsKey('haheartbeat') ) { $payload.Add('haheartbeat', $haheartbeat) } if ( $PSBoundParameters.ContainsKey('mtu') ) { $payload.Add('mtu', $mtu) } if ( $PSBoundParameters.ContainsKey('ringsize') ) { $payload.Add('ringsize', $ringsize) } if ( $PSBoundParameters.ContainsKey('ringtype') ) { $payload.Add('ringtype', $ringtype) } if ( $PSBoundParameters.ContainsKey('tagall') ) { $payload.Add('tagall', $tagall) } if ( $PSBoundParameters.ContainsKey('trunk') ) { $payload.Add('trunk', $trunk) } if ( $PSBoundParameters.ContainsKey('trunkmode') ) { $payload.Add('trunkmode', $trunkmode) } if ( $PSBoundParameters.ContainsKey('trunkallowedvlan') ) { $payload.Add('trunkallowedvlan', $trunkallowedvlan) } if ( $PSBoundParameters.ContainsKey('lacpmode') ) { $payload.Add('lacpmode', $lacpmode) } if ( $PSBoundParameters.ContainsKey('lacpkey') ) { $payload.Add('lacpkey', $lacpkey) } if ( $PSBoundParameters.ContainsKey('lagtype') ) { $payload.Add('lagtype', $lagtype) } if ( $PSBoundParameters.ContainsKey('lacppriority') ) { $payload.Add('lacppriority', $lacppriority) } if ( $PSBoundParameters.ContainsKey('lacptimeout') ) { $payload.Add('lacptimeout', $lacptimeout) } if ( $PSBoundParameters.ContainsKey('ifalias') ) { $payload.Add('ifalias', $ifalias) } if ( $PSBoundParameters.ContainsKey('throughput') ) { $payload.Add('throughput', $throughput) } if ( $PSBoundParameters.ContainsKey('linkredundancy') ) { $payload.Add('linkredundancy', $linkredundancy) } if ( $PSBoundParameters.ContainsKey('bandwidthhigh') ) { $payload.Add('bandwidthhigh', $bandwidthhigh) } if ( $PSBoundParameters.ContainsKey('bandwidthnormal') ) { $payload.Add('bandwidthnormal', $bandwidthnormal) } if ( $PSBoundParameters.ContainsKey('lldpmode') ) { $payload.Add('lldpmode', $lldpmode) } if ( $PSBoundParameters.ContainsKey('lrsetpriority') ) { $payload.Add('lrsetpriority', $lrsetpriority) } if ( $PSCmdlet.ShouldProcess("Interface", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type Interface -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetInterface -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateInterface: Finished" } } function Invoke-NSUnsetInterface { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for interface resource. .PARAMETER Id Interface number, in C/U format, where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. * LA - Indicates a link aggregation port. * LO - Indicates a loop back port. U is a unique integer for representing an interface in a particular port group. .PARAMETER Speed Ethernet speed of the interface, in Mbps. Notes: * If you set the speed as AUTO, the Citrix ADC attempts to auto-negotiate or auto-sense the link speed of the interface when it is UP. You must enable auto negotiation on the interface. * If you set a speed other than AUTO, you must specify the same speed for the peer network device. Mismatched speed and duplex settings between the peer devices of a link lead to link errors, packet loss, and other errors. Some interfaces do not support certain speeds. If you specify an unsupported speed, an error message appears. Possible values = AUTO, 10, 100, 1000, 10000, 25000, 40000, 50000, 100000 .PARAMETER Duplex The duplex mode for the interface. Notes:* If you set the duplex mode to AUTO, the Citrix ADC attempts to auto-negotiate the duplex mode of the interface when it is UP. You must enable auto negotiation on the interface. If you set a duplex mode other than AUTO, you must specify the same duplex mode for the peer network device. Mismatched speed and duplex settings between the peer devices of a link lead to link errors, packet loss, and other errors. Possible values = AUTO, HALF, FULL .PARAMETER Flowctl 802.3x flow control setting for the interface. The 802.3x specification does not define flow control for 10 Mbps and 100 Mbps speeds, but if a Gigabit Ethernet interface operates at those speeds, the flow control settings can be applied. The flow control setting that is finally applied to an interface depends on auto-negotiation. With the ON option, the peer negotiates the flow control, but the appliance then forces two-way flow control for the interface. Possible values = OFF, RX, TX, RXTX, ON .PARAMETER Autoneg Auto-negotiation state of the interface. With the ENABLED setting, the Citrix ADC auto-negotiates the speed and duplex settings with the peer network device on the link. The Citrix ADC appliance auto-negotiates the settings of only those parameters (speed or duplex mode) for which the value is set as AUTO. Possible values = DISABLED, ENABLED .PARAMETER Hamonitor In a High Availability (HA) configuration, monitor the interface for failure events. In an HA configuration, an interface that has HA MON enabled and is not bound to any Failover Interface Set (FIS), is a critical interface. Failure or disabling of any critical interface triggers HA failover. Possible values = ON, OFF .PARAMETER Haheartbeat In a High Availability (HA) or Cluster configuration, configure the interface for sending heartbeats. In an HA or Cluster configuration, an interface that has HA Heartbeat disabled should not send the heartbeats. Possible values = OFF, ON .PARAMETER Mtu The Maximum Transmission Unit (MTU) is the largest packet size, measured in bytes excluding 14 bytes ethernet header and 4 bytes CRC, that can be transmitted and received by an interface. The default value of MTU is 1500 on all the interface of Citrix ADC, some Cloud Platforms will restrict Citrix ADC to use the lesser default value. Any MTU value more than 1500 is called Jumbo MTU and will make the interface as jumbo enabled. The Maximum Jumbo MTU in Citrix ADC is 9216, however, some Virtualized / Cloud Platforms will have lesser Maximum Jumbo MTU Value (9000). In the case of Cluster, the Backplane interface requires an MTU value of 78 bytes more than the Max MTU configured on any other Data-Plane Interface. When the Data plane interfaces are all at default 1500 MTU, Cluster Back Plane will be automatically set to 1578 (1500 + 78) MTU. If a Backplane interface is reset to Data Plane Interface, then the 1578 MTU will be automatically reset to the default MTU of 1500(or whatever lesser default value). If any data plane interface of a Cluster is configured with a Jumbo MTU ( > 1500), then all backplane interfaces require to be configured with a minimum MTU of 'Highest Data Plane MTU in the Cluster + 78'. That makes the maximum Jumbo MTU for any Data-Plane Interface in a Cluster System to be '9138 (9216 - 78)., where 9216 is the maximum Jumbo MTU. On certain Virtualized / Cloud Platforms, the maximum possible MTU is restricted to a lesser value, Similar calculation can be applied, Maximum Data Plane MTU in Cluster = (Maximum possible MTU - 78). Maximum value = 9216 .PARAMETER Ringsize The receive ringsize of the interface. A higher number provides more number of buffers in handling incoming traffic. Maximum value = 16384 .PARAMETER Ringtype The receive ringtype of the interface (Fixed or Elastic). A fixed ring type pre-allocates configured number of buffers irrespective of traffic rate. In contrast, an elastic ring, expands and shrinks based on incoming traffic rate. Possible values = Elastic, Fixed .PARAMETER Tagall Add a four-byte 802.1q tag to every packet sent on this interface. The ON setting applies the tag for this interface's native VLAN. OFF applies the tag for all VLANs other than the native VLAN. Possible values = ON, OFF .PARAMETER Trunk This argument is deprecated by tagall. Possible values = ON, OFF .PARAMETER Trunkmode Accept and send 802.1q VLAN tagged packets, based on Allowed Vlan List of this interface. Possible values = ON, OFF .PARAMETER Trunkallowedvlan VLAN ID or range of VLAN IDs will be allowed on this trunk interface. In the command line interface, separate the range with a hyphen. For example: 40-90. .PARAMETER Lacpmode Bind the interface to a LA channel created by the Link Aggregation control protocol (LACP). Available settings function as follows: * Active - The LA channel port of the Citrix ADC generates LACPDU messages on a regular basis, regardless of any need expressed by its peer device to receive them. * Passive - The LA channel port of the Citrix ADC does not transmit LACPDU messages unless the peer device port is in the active mode. That is, the port does not speak unless spoken to. * Disabled - Unbinds the interface from the LA channel. If this is the only interface in the LA channel, the LA channel is removed. Possible values = DISABLED, ACTIVE, PASSIVE .PARAMETER Lacppriority LACP port priority, expressed as an integer. The lower the number, the higher the priority. The Citrix ADC limits the number of interfaces in an LA channel to sixteen. Maximum value = 65535 .PARAMETER Lacptimeout Interval at which the Citrix ADC sends LACPDU messages to the peer device on the LA channel. Available settings function as follows: LONG - 30 seconds. SHORT - 1 second. Possible values = LONG, SHORT .PARAMETER Ifalias Alias name for the interface. Used only to enhance readability. To perform any operations, you have to specify the interface ID. .PARAMETER Throughput Low threshold value for the throughput of the interface, in Mbps. In an HA configuration, failover is triggered if the interface has HA MON enabled and the throughput is below the specified the threshold. Maximum value = 160000 .PARAMETER Linkredundancy Link Redundancy for Cluster LAG. Possible values = ON, OFF .PARAMETER Bandwidthhigh High threshold value for the bandwidth usage of the interface, in Mbps. The Citrix ADC generates an SNMP trap message when the bandwidth usage of the interface is greater than or equal to the specified high threshold value. Maximum value = 160000 .PARAMETER Bandwidthnormal Normal threshold value for the bandwidth usage of the interface, in Mbps. When the bandwidth usage of the interface becomes less than or equal to the specified normal threshold after exceeding the high threshold, the Citrix ADC generates an SNMP trap message to indicate that the bandwidth usage has returned to normal. Maximum value = 160000 .PARAMETER Lldpmode Link Layer Discovery Protocol (LLDP) mode for an interface. The resultant LLDP mode of an interface depends on the LLDP mode configured at the global and the interface levels. Possible values = NONE, TRANSMITTER, RECEIVER, TRANSCEIVER .PARAMETER Lrsetpriority LRSET port priority, expressed as an integer ranging from 1 to 1024. The highest priority is 1. The Citrix ADC limits the number of interfaces in an LRSET to 8. Within a LRSET the highest LR Priority Interface is considered as the first candidate for the Active interface, if the interface is UP. Maximum value = 1024 .EXAMPLE PS C:\>Invoke-NSUnsetInterface -id <string> An example how to unset Interface config Object(s). .NOTES File Name : Invoke-NSUnsetInterface Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/Interface Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Id, [Boolean]$speed, [Boolean]$duplex, [Boolean]$flowctl, [Boolean]$autoneg, [Boolean]$hamonitor, [Boolean]$haheartbeat, [Boolean]$mtu, [Boolean]$ringsize, [Boolean]$ringtype, [Boolean]$tagall, [Boolean]$trunk, [Boolean]$trunkmode, [Boolean]$trunkallowedvlan, [Boolean]$lacpmode, [Boolean]$lacppriority, [Boolean]$lacptimeout, [Boolean]$ifalias, [Boolean]$throughput, [Boolean]$linkredundancy, [Boolean]$bandwidthhigh, [Boolean]$bandwidthnormal, [Boolean]$lldpmode, [Boolean]$lrsetpriority ) begin { Write-Verbose "Invoke-NSUnsetInterface: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('speed') ) { $payload.Add('speed', $speed) } if ( $PSBoundParameters.ContainsKey('duplex') ) { $payload.Add('duplex', $duplex) } if ( $PSBoundParameters.ContainsKey('flowctl') ) { $payload.Add('flowctl', $flowctl) } if ( $PSBoundParameters.ContainsKey('autoneg') ) { $payload.Add('autoneg', $autoneg) } if ( $PSBoundParameters.ContainsKey('hamonitor') ) { $payload.Add('hamonitor', $hamonitor) } if ( $PSBoundParameters.ContainsKey('haheartbeat') ) { $payload.Add('haheartbeat', $haheartbeat) } if ( $PSBoundParameters.ContainsKey('mtu') ) { $payload.Add('mtu', $mtu) } if ( $PSBoundParameters.ContainsKey('ringsize') ) { $payload.Add('ringsize', $ringsize) } if ( $PSBoundParameters.ContainsKey('ringtype') ) { $payload.Add('ringtype', $ringtype) } if ( $PSBoundParameters.ContainsKey('tagall') ) { $payload.Add('tagall', $tagall) } if ( $PSBoundParameters.ContainsKey('trunk') ) { $payload.Add('trunk', $trunk) } if ( $PSBoundParameters.ContainsKey('trunkmode') ) { $payload.Add('trunkmode', $trunkmode) } if ( $PSBoundParameters.ContainsKey('trunkallowedvlan') ) { $payload.Add('trunkallowedvlan', $trunkallowedvlan) } if ( $PSBoundParameters.ContainsKey('lacpmode') ) { $payload.Add('lacpmode', $lacpmode) } if ( $PSBoundParameters.ContainsKey('lacppriority') ) { $payload.Add('lacppriority', $lacppriority) } if ( $PSBoundParameters.ContainsKey('lacptimeout') ) { $payload.Add('lacptimeout', $lacptimeout) } if ( $PSBoundParameters.ContainsKey('ifalias') ) { $payload.Add('ifalias', $ifalias) } if ( $PSBoundParameters.ContainsKey('throughput') ) { $payload.Add('throughput', $throughput) } if ( $PSBoundParameters.ContainsKey('linkredundancy') ) { $payload.Add('linkredundancy', $linkredundancy) } if ( $PSBoundParameters.ContainsKey('bandwidthhigh') ) { $payload.Add('bandwidthhigh', $bandwidthhigh) } if ( $PSBoundParameters.ContainsKey('bandwidthnormal') ) { $payload.Add('bandwidthnormal', $bandwidthnormal) } if ( $PSBoundParameters.ContainsKey('lldpmode') ) { $payload.Add('lldpmode', $lldpmode) } if ( $PSBoundParameters.ContainsKey('lrsetpriority') ) { $payload.Add('lrsetpriority', $lrsetpriority) } if ( $PSCmdlet.ShouldProcess("$id", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type Interface -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetInterface: Finished" } } function Invoke-NSEnableInterface { <# .SYNOPSIS Enable Networking commands. config Object. .DESCRIPTION Configuration for interface resource. .PARAMETER Id Interface number, in C/U format, where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. * LA - Indicates a link aggregation port. * LO - Indicates a loop back port. U is a unique integer for representing an interface in a particular port group. .EXAMPLE PS C:\>Invoke-NSEnableInterface -id <string> An example how to enable Interface config Object(s). .NOTES File Name : Invoke-NSEnableInterface Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/Interface/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id ) begin { Write-Verbose "Invoke-NSEnableInterface: Starting" } process { try { $payload = @{ id = $id } if ( $PSCmdlet.ShouldProcess($Name, "Enable Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type Interface -Action enable -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSEnableInterface: Finished" } } function Invoke-NSDisableInterface { <# .SYNOPSIS Disable Networking commands. config Object. .DESCRIPTION Configuration for interface resource. .PARAMETER Id Interface number, in C/U format, where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. * LA - Indicates a link aggregation port. * LO - Indicates a loop back port. U is a unique integer for representing an interface in a particular port group. .EXAMPLE PS C:\>Invoke-NSDisableInterface -id <string> An example how to disable Interface config Object(s). .NOTES File Name : Invoke-NSDisableInterface Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/Interface/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id ) begin { Write-Verbose "Invoke-NSDisableInterface: Starting" } process { try { $payload = @{ id = $id } if ( $PSCmdlet.ShouldProcess($Name, "Disable Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type Interface -Action disable -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDisableInterface: Finished" } } function Invoke-NSResetInterface { <# .SYNOPSIS Reset Networking commands. config Object. .DESCRIPTION Configuration for interface resource. .PARAMETER Id Interface number, in C/U format, where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. * LA - Indicates a link aggregation port. * LO - Indicates a loop back port. U is a unique integer for representing an interface in a particular port group. .EXAMPLE PS C:\>Invoke-NSResetInterface -id <string> An example how to reset Interface config Object(s). .NOTES File Name : Invoke-NSResetInterface Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/Interface/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id ) begin { Write-Verbose "Invoke-NSResetInterface: Starting" } process { try { $payload = @{ id = $id } if ( $PSCmdlet.ShouldProcess($Name, "Reset Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type Interface -Action reset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSResetInterface: Finished" } } function Invoke-NSGetInterface { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for interface resource. .PARAMETER Id Interface number, in C/U format, where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. * LA - Indicates a link aggregation port. * LO - Indicates a loop back port. U is a unique integer for representing an interface in a particular port group. .PARAMETER GetAll Retrieve all Interface object(s). .PARAMETER Count If specified, the count of the Interface object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetInterface Get data. .EXAMPLE PS C:\>Invoke-NSGetInterface -GetAll Get all Interface data. .EXAMPLE PS C:\>Invoke-NSGetInterface -Count Get the number of Interface objects. .EXAMPLE PS C:\>Invoke-NSGetInterface -name <string> Get Interface object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetInterface -Filter @{ 'name'='<value>' } Get Interface data with a filter. .NOTES File Name : Invoke-NSGetInterface Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/Interface/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetInterface: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all Interface objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type Interface -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for Interface objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type Interface -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving Interface objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type Interface -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving Interface configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type Interface -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving Interface configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type Interface -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetInterface: Ended" } } function Invoke-NSUpdateAppalgparam { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for AppAlg Param resource. .PARAMETER Pptpgreidletimeout Interval in sec, after which data sessions of PPTP GRE is cleared. Maximum value = 9000 .EXAMPLE PS C:\>Invoke-NSUpdateAppalgparam An example how to update appalgparam config Object(s). .NOTES File Name : Invoke-NSUpdateAppalgparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/appalgparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Pptpgreidletimeout ) begin { Write-Verbose "Invoke-NSUpdateAppalgparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('pptpgreidletimeout') ) { $payload.Add('pptpgreidletimeout', $pptpgreidletimeout) } if ( $PSCmdlet.ShouldProcess("appalgparam", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appalgparam -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateAppalgparam: Finished" } } function Invoke-NSUnsetAppalgparam { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for AppAlg Param resource. .PARAMETER Pptpgreidletimeout Interval in sec, after which data sessions of PPTP GRE is cleared. Maximum value = 9000 .EXAMPLE PS C:\>Invoke-NSUnsetAppalgparam An example how to unset appalgparam config Object(s). .NOTES File Name : Invoke-NSUnsetAppalgparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/appalgparam Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$pptpgreidletimeout ) begin { Write-Verbose "Invoke-NSUnsetAppalgparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('pptpgreidletimeout') ) { $payload.Add('pptpgreidletimeout', $pptpgreidletimeout) } if ( $PSCmdlet.ShouldProcess("appalgparam", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type appalgparam -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetAppalgparam: Finished" } } function Invoke-NSGetAppalgparam { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for AppAlg Param resource. .PARAMETER GetAll Retrieve all appalgparam object(s). .PARAMETER Count If specified, the count of the appalgparam object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetAppalgparam Get data. .EXAMPLE PS C:\>Invoke-NSGetAppalgparam -GetAll Get all appalgparam data. .EXAMPLE PS C:\>Invoke-NSGetAppalgparam -name <string> Get appalgparam object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetAppalgparam -Filter @{ 'name'='<value>' } Get appalgparam data with a filter. .NOTES File Name : Invoke-NSGetAppalgparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/appalgparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetAppalgparam: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all appalgparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appalgparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for appalgparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appalgparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving appalgparam objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appalgparam -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving appalgparam configuration for property ''" } else { Write-Verbose "Retrieving appalgparam configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appalgparam -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetAppalgparam: Ended" } } function Invoke-NSAddArp { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for arp resource. .PARAMETER Ipaddress IP address of the network device that you want to add to the ARP table. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Mac MAC address of the network device. .PARAMETER Ifnum Interface through which the network device is accessible. Specify the interface in (slot/port) notation. For example, 1/3. .PARAMETER Vxlan ID of the VXLAN on which the IP address of this ARP entry is reachable. Maximum value = 16777215 .PARAMETER Vtep IP address of the VXLAN tunnel endpoint (VTEP) through which the IP address of this ARP entry is reachable. .PARAMETER Vlan The VLAN ID through which packets are to be sent after matching the ARP entry. This is a numeric value. .PARAMETER Ownernode The owner node for the Arp entry. Maximum value = 31 .EXAMPLE PS C:\>Invoke-NSAddArp -ipaddress <string> -mac <string> An example how to add arp config Object(s). .NOTES File Name : Invoke-NSAddArp Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/arp/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Ipaddress, [double]$Td, [Parameter(Mandatory)] [string]$Mac, [string]$Ifnum, [double]$Vxlan, [ValidateScript({ $_.Length -gt 1 })] [string]$Vtep, [double]$Vlan, [double]$Ownernode ) begin { Write-Verbose "Invoke-NSAddArp: Starting" } process { try { $payload = @{ ipaddress = $ipaddress mac = $mac } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSBoundParameters.ContainsKey('vxlan') ) { $payload.Add('vxlan', $vxlan) } if ( $PSBoundParameters.ContainsKey('vtep') ) { $payload.Add('vtep', $vtep) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSCmdlet.ShouldProcess("arp", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type arp -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddArp: Finished" } } function Invoke-NSDeleteArp { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for arp resource. .PARAMETER Ipaddress IP address of the network device that you want to add to the ARP table. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER All Remove all ARP entries from the ARP table of the Citrix ADC. .PARAMETER Ownernode The owner node for the Arp entry. Maximum value = 31 .EXAMPLE PS C:\>Invoke-NSDeleteArp -Ipaddress <string> An example how to delete arp config Object(s). .NOTES File Name : Invoke-NSDeleteArp Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/arp/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Ipaddress, [double]$Td, [boolean]$All, [double]$Ownernode ) begin { Write-Verbose "Invoke-NSDeleteArp: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Td') ) { $arguments.Add('td', $Td) } if ( $PSBoundParameters.ContainsKey('All') ) { $arguments.Add('all', $All) } if ( $PSBoundParameters.ContainsKey('Ownernode') ) { $arguments.Add('ownernode', $Ownernode) } if ( $PSCmdlet.ShouldProcess("$ipaddress", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type arp -NitroPath nitro/v1/config -Resource $ipaddress -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteArp: Finished" } } function Invoke-NSSendArp { <# .SYNOPSIS Send Networking commands. config Object. .DESCRIPTION Configuration for arp resource. .PARAMETER Ipaddress IP address of the network device that you want to add to the ARP table. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER All Remove all ARP entries from the ARP table of the Citrix ADC. .EXAMPLE PS C:\>Invoke-NSSendArp An example how to send arp config Object(s). .NOTES File Name : Invoke-NSSendArp Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/arp/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Ipaddress, [double]$Td, [boolean]$All ) begin { Write-Verbose "Invoke-NSSendArp: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('all') ) { $payload.Add('all', $all) } if ( $PSCmdlet.ShouldProcess($Name, "Send Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type arp -Action send -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSSendArp: Finished" } } function Invoke-NSGetArp { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for arp resource. .PARAMETER Ipaddress IP address of the network device that you want to add to the ARP table. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownernode The owner node for the Arp entry. Maximum value = 31 .PARAMETER Nodeid Unique number that identifies the cluster node. Maximum value = 31 .PARAMETER GetAll Retrieve all arp object(s). .PARAMETER Count If specified, the count of the arp object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetArp Get data. .EXAMPLE PS C:\>Invoke-NSGetArp -GetAll Get all arp data. .EXAMPLE PS C:\>Invoke-NSGetArp -Count Get the number of arp objects. .EXAMPLE PS C:\>Invoke-NSGetArp -name <string> Get arp object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetArp -Filter @{ 'name'='<value>' } Get arp data with a filter. .NOTES File Name : Invoke-NSGetArp Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/arp/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByArgument')] [ValidateScript({ $_.Length -gt 1 })] [string]$Ipaddress, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Td, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Ownernode, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Nodeid, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetArp: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all arp objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type arp -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for arp objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type arp -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving arp objects by arguments" $arguments = @{ } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $arguments.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('td') ) { $arguments.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $arguments.Add('ownernode', $ownernode) } if ( $PSBoundParameters.ContainsKey('nodeid') ) { $arguments.Add('nodeid', $nodeid) } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type arp -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving arp configuration for property ''" } else { Write-Verbose "Retrieving arp configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type arp -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetArp: Ended" } } function Invoke-NSUpdateArpparam { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Global arp parameters resource. .PARAMETER Timeout Time-out value (aging time) for the dynamically learned ARP entries, in seconds. The new value applies only to ARP entries that are dynamically learned after the new value is set. Previously existing ARP entries expire after the previously configured aging time. Maximum value = 1200 .PARAMETER Spoofvalidation enable/disable arp spoofing validation. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUpdateArpparam An example how to update arpparam config Object(s). .NOTES File Name : Invoke-NSUpdateArpparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/arpparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Timeout, [ValidateSet('ENABLED', 'DISABLED')] [string]$Spoofvalidation ) begin { Write-Verbose "Invoke-NSUpdateArpparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('timeout') ) { $payload.Add('timeout', $timeout) } if ( $PSBoundParameters.ContainsKey('spoofvalidation') ) { $payload.Add('spoofvalidation', $spoofvalidation) } if ( $PSCmdlet.ShouldProcess("arpparam", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type arpparam -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateArpparam: Finished" } } function Invoke-NSUnsetArpparam { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for Global arp parameters resource. .PARAMETER Timeout Time-out value (aging time) for the dynamically learned ARP entries, in seconds. The new value applies only to ARP entries that are dynamically learned after the new value is set. Previously existing ARP entries expire after the previously configured aging time. Maximum value = 1200 .PARAMETER Spoofvalidation enable/disable arp spoofing validation. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetArpparam An example how to unset arpparam config Object(s). .NOTES File Name : Invoke-NSUnsetArpparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/arpparam Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$timeout, [Boolean]$spoofvalidation ) begin { Write-Verbose "Invoke-NSUnsetArpparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('timeout') ) { $payload.Add('timeout', $timeout) } if ( $PSBoundParameters.ContainsKey('spoofvalidation') ) { $payload.Add('spoofvalidation', $spoofvalidation) } if ( $PSCmdlet.ShouldProcess("arpparam", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type arpparam -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetArpparam: Finished" } } function Invoke-NSGetArpparam { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Global arp parameters resource. .PARAMETER GetAll Retrieve all arpparam object(s). .PARAMETER Count If specified, the count of the arpparam object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetArpparam Get data. .EXAMPLE PS C:\>Invoke-NSGetArpparam -GetAll Get all arpparam data. .EXAMPLE PS C:\>Invoke-NSGetArpparam -name <string> Get arpparam object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetArpparam -Filter @{ 'name'='<value>' } Get arpparam data with a filter. .NOTES File Name : Invoke-NSGetArpparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/arpparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetArpparam: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all arpparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type arpparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for arpparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type arpparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving arpparam objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type arpparam -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving arpparam configuration for property ''" } else { Write-Verbose "Retrieving arpparam configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type arpparam -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetArpparam: Ended" } } function Invoke-NSAddBridgegroup { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for bridge group resource. .PARAMETER Id An integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Dynamicrouting Enable dynamic routing for this bridgegroup. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on all VLANs bound to this bridgegroup. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created bridgegroup item. .EXAMPLE PS C:\>Invoke-NSAddBridgegroup -id <double> An example how to add bridgegroup config Object(s). .NOTES File Name : Invoke-NSAddBridgegroup Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dynamicrouting = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Ipv6dynamicrouting = 'DISABLED', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddBridgegroup: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSCmdlet.ShouldProcess("bridgegroup", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type bridgegroup -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetBridgegroup -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddBridgegroup: Finished" } } function Invoke-NSDeleteBridgegroup { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for bridge group resource. .PARAMETER Id An integer that uniquely identifies the bridge group. Maximum value = 1000 .EXAMPLE PS C:\>Invoke-NSDeleteBridgegroup -Id <double> An example how to delete bridgegroup config Object(s). .NOTES File Name : Invoke-NSDeleteBridgegroup Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id ) begin { Write-Verbose "Invoke-NSDeleteBridgegroup: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type bridgegroup -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteBridgegroup: Finished" } } function Invoke-NSUpdateBridgegroup { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for bridge group resource. .PARAMETER Id An integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Dynamicrouting Enable dynamic routing for this bridgegroup. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on all VLANs bound to this bridgegroup. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created bridgegroup item. .EXAMPLE PS C:\>Invoke-NSUpdateBridgegroup -id <double> An example how to update bridgegroup config Object(s). .NOTES File Name : Invoke-NSUpdateBridgegroup Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dynamicrouting, [ValidateSet('ENABLED', 'DISABLED')] [string]$Ipv6dynamicrouting, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateBridgegroup: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSCmdlet.ShouldProcess("bridgegroup", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type bridgegroup -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetBridgegroup -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateBridgegroup: Finished" } } function Invoke-NSUnsetBridgegroup { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for bridge group resource. .PARAMETER Id An integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Dynamicrouting Enable dynamic routing for this bridgegroup. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on all VLANs bound to this bridgegroup. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetBridgegroup -id <double> An example how to unset bridgegroup config Object(s). .NOTES File Name : Invoke-NSUnsetBridgegroup Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Id, [Boolean]$dynamicrouting, [Boolean]$ipv6dynamicrouting ) begin { Write-Verbose "Invoke-NSUnsetBridgegroup: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSCmdlet.ShouldProcess("$id", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type bridgegroup -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetBridgegroup: Finished" } } function Invoke-NSGetBridgegroup { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for bridge group resource. .PARAMETER Id An integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER GetAll Retrieve all bridgegroup object(s). .PARAMETER Count If specified, the count of the bridgegroup object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetBridgegroup Get data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroup -GetAll Get all bridgegroup data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroup -Count Get the number of bridgegroup objects. .EXAMPLE PS C:\>Invoke-NSGetBridgegroup -name <string> Get bridgegroup object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetBridgegroup -Filter @{ 'name'='<value>' } Get bridgegroup data with a filter. .NOTES File Name : Invoke-NSGetBridgegroup Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetBridgegroup: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all bridgegroup objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for bridgegroup objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving bridgegroup objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving bridgegroup configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving bridgegroup configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetBridgegroup: Ended" } } function Invoke-NSGetBridgegroupBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to bridgegroup. .PARAMETER Id The name of the bridge group. Maximum value = 1000 .PARAMETER GetAll Retrieve all bridgegroup_binding object(s). .PARAMETER Count If specified, the count of the bridgegroup_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupBinding -GetAll Get all bridgegroup_binding data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupBinding -name <string> Get bridgegroup_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupBinding -Filter @{ 'name'='<value>' } Get bridgegroup_binding data with a filter. .NOTES File Name : Invoke-NSGetBridgegroupBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetBridgegroupBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all bridgegroup_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for bridgegroup_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving bridgegroup_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving bridgegroup_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving bridgegroup_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetBridgegroupBinding: Ended" } } function Invoke-NSAddBridgegroupNsip6Binding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Ipaddress The IP address assigned to the bridge group. .PARAMETER Netmask A subnet mask associated with the network address. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .PARAMETER PassThru Return details about the created bridgegroup_nsip6_binding item. .EXAMPLE PS C:\>Invoke-NSAddBridgegroupNsip6Binding -id <double> An example how to add bridgegroup_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSAddBridgegroupNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [ValidateScript({ $_.Length -gt 1 })] [string]$Netmask, [double]$Td, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddBridgegroupNsip6Binding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("bridgegroup_nsip6_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type bridgegroup_nsip6_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetBridgegroupNsip6Binding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddBridgegroupNsip6Binding: Finished" } } function Invoke-NSDeleteBridgegroupNsip6Binding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Ipaddress The IP address assigned to the bridge group. .PARAMETER Netmask A subnet mask associated with the network address. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .EXAMPLE PS C:\>Invoke-NSDeleteBridgegroupNsip6Binding -Id <double> An example how to delete bridgegroup_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSDeleteBridgegroupNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask, [double]$Td, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteBridgegroupNsip6Binding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSBoundParameters.ContainsKey('Td') ) { $arguments.Add('td', $Td) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type bridgegroup_nsip6_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteBridgegroupNsip6Binding: Finished" } } function Invoke-NSGetBridgegroupNsip6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip6 that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER GetAll Retrieve all bridgegroup_nsip6_binding object(s). .PARAMETER Count If specified, the count of the bridgegroup_nsip6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsip6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsip6Binding -GetAll Get all bridgegroup_nsip6_binding data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsip6Binding -Count Get the number of bridgegroup_nsip6_binding objects. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsip6Binding -name <string> Get bridgegroup_nsip6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsip6Binding -Filter @{ 'name'='<value>' } Get bridgegroup_nsip6_binding data with a filter. .NOTES File Name : Invoke-NSGetBridgegroupNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetBridgegroupNsip6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all bridgegroup_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for bridgegroup_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving bridgegroup_nsip6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving bridgegroup_nsip6_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip6_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving bridgegroup_nsip6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetBridgegroupNsip6Binding: Ended" } } function Invoke-NSAddBridgegroupNsipBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Ipaddress The IP address assigned to the bridge group. .PARAMETER Netmask The network mask for the subnet defined for the bridge group. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .PARAMETER PassThru Return details about the created bridgegroup_nsip_binding item. .EXAMPLE PS C:\>Invoke-NSAddBridgegroupNsipBinding -id <double> An example how to add bridgegroup_nsip_binding config Object(s). .NOTES File Name : Invoke-NSAddBridgegroupNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask, [double]$Td, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddBridgegroupNsipBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("bridgegroup_nsip_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type bridgegroup_nsip_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetBridgegroupNsipBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddBridgegroupNsipBinding: Finished" } } function Invoke-NSDeleteBridgegroupNsipBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Ipaddress The IP address assigned to the bridge group. .PARAMETER Netmask The network mask for the subnet defined for the bridge group. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .EXAMPLE PS C:\>Invoke-NSDeleteBridgegroupNsipBinding -Id <double> An example how to delete bridgegroup_nsip_binding config Object(s). .NOTES File Name : Invoke-NSDeleteBridgegroupNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask, [double]$Td, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteBridgegroupNsipBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSBoundParameters.ContainsKey('Td') ) { $arguments.Add('td', $Td) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type bridgegroup_nsip_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteBridgegroupNsipBinding: Finished" } } function Invoke-NSGetBridgegroupNsipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER GetAll Retrieve all bridgegroup_nsip_binding object(s). .PARAMETER Count If specified, the count of the bridgegroup_nsip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsipBinding -GetAll Get all bridgegroup_nsip_binding data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsipBinding -Count Get the number of bridgegroup_nsip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsipBinding -name <string> Get bridgegroup_nsip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupNsipBinding -Filter @{ 'name'='<value>' } Get bridgegroup_nsip_binding data with a filter. .NOTES File Name : Invoke-NSGetBridgegroupNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetBridgegroupNsipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all bridgegroup_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for bridgegroup_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving bridgegroup_nsip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving bridgegroup_nsip_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving bridgegroup_nsip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_nsip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetBridgegroupNsipBinding: Ended" } } function Invoke-NSAddBridgegroupVlanBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the vlan that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Vlan Names of all member VLANs. .PARAMETER PassThru Return details about the created bridgegroup_vlan_binding item. .EXAMPLE PS C:\>Invoke-NSAddBridgegroupVlanBinding -id <double> An example how to add bridgegroup_vlan_binding config Object(s). .NOTES File Name : Invoke-NSAddBridgegroupVlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_vlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [double]$Vlan, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddBridgegroupVlanBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSCmdlet.ShouldProcess("bridgegroup_vlan_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type bridgegroup_vlan_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetBridgegroupVlanBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddBridgegroupVlanBinding: Finished" } } function Invoke-NSDeleteBridgegroupVlanBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the vlan that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER Vlan Names of all member VLANs. .EXAMPLE PS C:\>Invoke-NSDeleteBridgegroupVlanBinding -Id <double> An example how to delete bridgegroup_vlan_binding config Object(s). .NOTES File Name : Invoke-NSDeleteBridgegroupVlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_vlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [double]$Vlan ) begin { Write-Verbose "Invoke-NSDeleteBridgegroupVlanBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Vlan') ) { $arguments.Add('vlan', $Vlan) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type bridgegroup_vlan_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteBridgegroupVlanBinding: Finished" } } function Invoke-NSGetBridgegroupVlanBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the vlan that can be bound to bridgegroup. .PARAMETER Id The integer that uniquely identifies the bridge group. Maximum value = 1000 .PARAMETER GetAll Retrieve all bridgegroup_vlan_binding object(s). .PARAMETER Count If specified, the count of the bridgegroup_vlan_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupVlanBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupVlanBinding -GetAll Get all bridgegroup_vlan_binding data. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupVlanBinding -Count Get the number of bridgegroup_vlan_binding objects. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupVlanBinding -name <string> Get bridgegroup_vlan_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetBridgegroupVlanBinding -Filter @{ 'name'='<value>' } Get bridgegroup_vlan_binding data with a filter. .NOTES File Name : Invoke-NSGetBridgegroupVlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgegroup_vlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetBridgegroupVlanBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all bridgegroup_vlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_vlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for bridgegroup_vlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_vlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving bridgegroup_vlan_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_vlan_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving bridgegroup_vlan_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_vlan_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving bridgegroup_vlan_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgegroup_vlan_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetBridgegroupVlanBinding: Ended" } } function Invoke-NSAddBridgetable { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for bridge table entry resource. .PARAMETER Mac The MAC address of the target. .PARAMETER Vxlan The VXLAN to which this address is associated. Maximum value = 16777215 .PARAMETER Vtep The IP address of the destination VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides. .PARAMETER Vni The VXLAN VNI Network Identifier (or VXLAN Segment ID) to use to connect to the remote VXLAN tunnel endpoint. If omitted the value specified as vxlan will be used. Maximum value = 16777215 .PARAMETER Devicevlan The vlan on which to send multicast packets when the VXLAN tunnel endpoint is a muticast group address. Maximum value = 4094 .EXAMPLE PS C:\>Invoke-NSAddBridgetable -mac <string> -vxlan <double> -vtep <string> An example how to add bridgetable config Object(s). .NOTES File Name : Invoke-NSAddBridgetable Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgetable/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Mac, [Parameter(Mandatory)] [double]$Vxlan, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Vtep, [double]$Vni, [double]$Devicevlan ) begin { Write-Verbose "Invoke-NSAddBridgetable: Starting" } process { try { $payload = @{ mac = $mac vxlan = $vxlan vtep = $vtep } if ( $PSBoundParameters.ContainsKey('vni') ) { $payload.Add('vni', $vni) } if ( $PSBoundParameters.ContainsKey('devicevlan') ) { $payload.Add('devicevlan', $devicevlan) } if ( $PSCmdlet.ShouldProcess("bridgetable", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type bridgetable -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddBridgetable: Finished" } } function Invoke-NSDeleteBridgetable { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for bridge table entry resource. .PARAMETER Mac The MAC address of the target. .PARAMETER Vxlan The VXLAN to which this address is associated. Maximum value = 16777215 .PARAMETER Vtep The IP address of the destination VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides. .PARAMETER Devicevlan The vlan on which to send multicast packets when the VXLAN tunnel endpoint is a muticast group address. Maximum value = 4094 .EXAMPLE PS C:\>Invoke-NSDeleteBridgetable An example how to delete bridgetable config Object(s). .NOTES File Name : Invoke-NSDeleteBridgetable Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgetable/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Mac, [double]$Vxlan, [string]$Vtep, [double]$Devicevlan ) begin { Write-Verbose "Invoke-NSDeleteBridgetable: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Mac') ) { $arguments.Add('mac', $Mac) } if ( $PSBoundParameters.ContainsKey('Vxlan') ) { $arguments.Add('vxlan', $Vxlan) } if ( $PSBoundParameters.ContainsKey('Vtep') ) { $arguments.Add('vtep', $Vtep) } if ( $PSBoundParameters.ContainsKey('Devicevlan') ) { $arguments.Add('devicevlan', $Devicevlan) } if ( $PSCmdlet.ShouldProcess("bridgetable", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type bridgetable -NitroPath nitro/v1/config -Resource $ -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteBridgetable: Finished" } } function Invoke-NSUpdateBridgetable { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for bridge table entry resource. .PARAMETER Bridgeage Time-out value for the bridge table entries, in seconds. The new value applies only to the entries that are dynamically learned after the new value is set. Previously existing bridge table entries expire after the previously configured time-out value. Maximum value = 300 .EXAMPLE PS C:\>Invoke-NSUpdateBridgetable An example how to update bridgetable config Object(s). .NOTES File Name : Invoke-NSUpdateBridgetable Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgetable/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Bridgeage ) begin { Write-Verbose "Invoke-NSUpdateBridgetable: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('bridgeage') ) { $payload.Add('bridgeage', $bridgeage) } if ( $PSCmdlet.ShouldProcess("bridgetable", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type bridgetable -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateBridgetable: Finished" } } function Invoke-NSUnsetBridgetable { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for bridge table entry resource. .PARAMETER Bridgeage Time-out value for the bridge table entries, in seconds. The new value applies only to the entries that are dynamically learned after the new value is set. Previously existing bridge table entries expire after the previously configured time-out value. Maximum value = 300 .EXAMPLE PS C:\>Invoke-NSUnsetBridgetable An example how to unset bridgetable config Object(s). .NOTES File Name : Invoke-NSUnsetBridgetable Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgetable Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$bridgeage ) begin { Write-Verbose "Invoke-NSUnsetBridgetable: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('bridgeage') ) { $payload.Add('bridgeage', $bridgeage) } if ( $PSCmdlet.ShouldProcess("bridgetable", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type bridgetable -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetBridgetable: Finished" } } function Invoke-NSClearBridgetable { <# .SYNOPSIS Clear Networking commands. config Object. .DESCRIPTION Configuration for bridge table entry resource. .PARAMETER Vlan VLAN whose entries are to be removed. Maximum value = 4094 .PARAMETER Ifnum INTERFACE whose entries are to be removed. .PARAMETER Vxlan The VXLAN to which this address is associated. Maximum value = 16777215 .EXAMPLE PS C:\>Invoke-NSClearBridgetable An example how to clear bridgetable config Object(s). .NOTES File Name : Invoke-NSClearBridgetable Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgetable/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Vlan, [string]$Ifnum, [double]$Vxlan ) begin { Write-Verbose "Invoke-NSClearBridgetable: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSBoundParameters.ContainsKey('vxlan') ) { $payload.Add('vxlan', $vxlan) } if ( $PSCmdlet.ShouldProcess($Name, "Clear Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type bridgetable -Action clear -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSClearBridgetable: Finished" } } function Invoke-NSGetBridgetable { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for bridge table entry resource. .PARAMETER Nodeid Unique number that identifies the cluster node. Maximum value = 31 .PARAMETER GetAll Retrieve all bridgetable object(s). .PARAMETER Count If specified, the count of the bridgetable object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetBridgetable Get data. .EXAMPLE PS C:\>Invoke-NSGetBridgetable -GetAll Get all bridgetable data. .EXAMPLE PS C:\>Invoke-NSGetBridgetable -Count Get the number of bridgetable objects. .EXAMPLE PS C:\>Invoke-NSGetBridgetable -name <string> Get bridgetable object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetBridgetable -Filter @{ 'name'='<value>' } Get bridgetable data with a filter. .NOTES File Name : Invoke-NSGetBridgetable Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/bridgetable/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByArgument')] [double]$Nodeid, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetBridgetable: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all bridgetable objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgetable -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for bridgetable objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgetable -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving bridgetable objects by arguments" $arguments = @{ } if ( $PSBoundParameters.ContainsKey('nodeid') ) { $arguments.Add('nodeid', $nodeid) } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgetable -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving bridgetable configuration for property ''" } else { Write-Verbose "Retrieving bridgetable configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type bridgetable -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetBridgetable: Ended" } } function Invoke-NSAddChannel { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for channel resource. .PARAMETER Id ID for the LA channel or cluster LA channel or LR channel to be created. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. Cannot be changed after the LA channel is created. .PARAMETER Ifnum Interfaces to be bound to the LA channel of a Citrix ADC or to the LA channel of a cluster configuration. For an LA channel of a Citrix ADC, specify an interface in C/U notation (for example, 1/3). For an LA channel of a cluster configuration, specify an interface in N/C/U notation (for example, 2/1/3). where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. U is a unique integer for representing an interface in a particular port group. N is the ID of the node to which an interface belongs in a cluster configuration. Use spaces to separate multiple entries. .PARAMETER State Enable or disable the LA channel. Possible values = ENABLED, DISABLED .PARAMETER Mode The initital mode for the LA channel. Possible values = MANUAL, AUTO .PARAMETER Conndistr The 'connection' distribution mode for the LA channel. Possible values = DISABLED, ENABLED .PARAMETER Macdistr The 'MAC' distribution mode for the LA channel. Possible values = SOURCE, DESTINATION, BOTH .PARAMETER Lamac Specifies a MAC address for the LA channels configured in Citrix ADC virtual appliances (VPX). This MAC address is persistent after each reboot. If you don't specify this parameter, a MAC address is generated randomly for each LA channel. These MAC addresses change after each reboot. .PARAMETER Speed Ethernet speed of the channel, in Mbps. If the speed of any bound interface is greater than or equal to the value set for this parameter, the state of the interface is UP. Otherwise, the state is INACTIVE. Bound Interfaces whose state is INACTIVE do not process any traffic. Possible values = AUTO, 10, 100, 1000, 10000, 25000, 40000, 50000, 100000 .PARAMETER Flowctl Specifies the flow control type for this LA channel to manage the flow of frames. Flow control is a function as mentioned in clause 31 of the IEEE 802.3 standard. Flow control allows congested ports to pause traffic from the peer device. Flow control is achieved by sending PAUSE frames. Possible values = OFF, RX, TX, RXTX, ON .PARAMETER Hamonitor In a High Availability (HA) configuration, monitor the LA channel for failure events. Failure of any LA channel that has HA MON enabled triggers HA failover. Possible values = ON, OFF .PARAMETER Haheartbeat In a High Availability (HA) configuration, configure the LA channel for sending heartbeats. LA channel that has HA Heartbeat disabled should not send the heartbeats. Possible values = OFF, ON .PARAMETER Tagall Adds a four-byte 802.1q tag to every packet sent on this channel. The ON setting applies tags for all VLANs that are bound to this channel. OFF applies the tag for all VLANs other than the native VLAN. Possible values = ON, OFF .PARAMETER Trunk This is deprecated by tagall. Possible values = ON, OFF .PARAMETER Ifalias Alias name for the LA channel. Used only to enhance readability. To perform any operations, you have to specify the LA channel ID. .PARAMETER Throughput Low threshold value for the throughput of the LA channel, in Mbps. In an high availability (HA) configuration, failover is triggered when the LA channel has HA MON enabled and the throughput is below the specified threshold. Maximum value = 160000 .PARAMETER Bandwidthhigh High threshold value for the bandwidth usage of the LA channel, in Mbps. The Citrix ADC generates an SNMP trap message when the bandwidth usage of the LA channel is greater than or equal to the specified high threshold value. Maximum value = 160000 .PARAMETER Bandwidthnormal Normal threshold value for the bandwidth usage of the LA channel, in Mbps. When the bandwidth usage of the LA channel returns to less than or equal to the specified normal threshold after exceeding the high threshold, the Citrix ADC generates an SNMP trap message to indicate that the bandwidth usage has returned to normal. Maximum value = 160000 .PARAMETER PassThru Return details about the created channel item. .EXAMPLE PS C:\>Invoke-NSAddChannel -id <string> An example how to add channel config Object(s). .NOTES File Name : Invoke-NSAddChannel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [string[]]$Ifnum, [ValidateSet('ENABLED', 'DISABLED')] [string]$State = 'ENABLED', [ValidateSet('MANUAL', 'AUTO')] [string]$Mode, [ValidateSet('DISABLED', 'ENABLED')] [string]$Conndistr, [ValidateSet('SOURCE', 'DESTINATION', 'BOTH')] [string]$Macdistr, [string]$Lamac, [ValidateSet('AUTO', '10', '100', '1000', '10000', '25000', '40000', '50000', '100000')] [string]$Speed = 'AUTO', [ValidateSet('OFF', 'RX', 'TX', 'RXTX', 'ON')] [string]$Flowctl = 'OFF', [ValidateSet('ON', 'OFF')] [string]$Hamonitor = 'ON', [ValidateSet('OFF', 'ON')] [string]$Haheartbeat = 'ON', [ValidateSet('ON', 'OFF')] [string]$Tagall = 'OFF', [ValidateSet('ON', 'OFF')] [string]$Trunk = 'OFF', [string]$Ifalias = '" "', [double]$Throughput, [double]$Bandwidthhigh, [double]$Bandwidthnormal, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddChannel: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) } if ( $PSBoundParameters.ContainsKey('mode') ) { $payload.Add('mode', $mode) } if ( $PSBoundParameters.ContainsKey('conndistr') ) { $payload.Add('conndistr', $conndistr) } if ( $PSBoundParameters.ContainsKey('macdistr') ) { $payload.Add('macdistr', $macdistr) } if ( $PSBoundParameters.ContainsKey('lamac') ) { $payload.Add('lamac', $lamac) } if ( $PSBoundParameters.ContainsKey('speed') ) { $payload.Add('speed', $speed) } if ( $PSBoundParameters.ContainsKey('flowctl') ) { $payload.Add('flowctl', $flowctl) } if ( $PSBoundParameters.ContainsKey('hamonitor') ) { $payload.Add('hamonitor', $hamonitor) } if ( $PSBoundParameters.ContainsKey('haheartbeat') ) { $payload.Add('haheartbeat', $haheartbeat) } if ( $PSBoundParameters.ContainsKey('tagall') ) { $payload.Add('tagall', $tagall) } if ( $PSBoundParameters.ContainsKey('trunk') ) { $payload.Add('trunk', $trunk) } if ( $PSBoundParameters.ContainsKey('ifalias') ) { $payload.Add('ifalias', $ifalias) } if ( $PSBoundParameters.ContainsKey('throughput') ) { $payload.Add('throughput', $throughput) } if ( $PSBoundParameters.ContainsKey('bandwidthhigh') ) { $payload.Add('bandwidthhigh', $bandwidthhigh) } if ( $PSBoundParameters.ContainsKey('bandwidthnormal') ) { $payload.Add('bandwidthnormal', $bandwidthnormal) } if ( $PSCmdlet.ShouldProcess("channel", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type channel -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetChannel -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddChannel: Finished" } } function Invoke-NSDeleteChannel { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for channel resource. .PARAMETER Id ID for the LA channel or cluster LA channel or LR channel to be created. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. Cannot be changed after the LA channel is created. .EXAMPLE PS C:\>Invoke-NSDeleteChannel -Id <string> An example how to delete channel config Object(s). .NOTES File Name : Invoke-NSDeleteChannel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id ) begin { Write-Verbose "Invoke-NSDeleteChannel: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type channel -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteChannel: Finished" } } function Invoke-NSUpdateChannel { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for channel resource. .PARAMETER Id ID for the LA channel or cluster LA channel or LR channel to be created. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. Cannot be changed after the LA channel is created. .PARAMETER State Enable or disable the LA channel. Possible values = ENABLED, DISABLED .PARAMETER Mode The initital mode for the LA channel. Possible values = MANUAL, AUTO .PARAMETER Conndistr The 'connection' distribution mode for the LA channel. Possible values = DISABLED, ENABLED .PARAMETER Macdistr The 'MAC' distribution mode for the LA channel. Possible values = SOURCE, DESTINATION, BOTH .PARAMETER Lamac Specifies a MAC address for the LA channels configured in Citrix ADC virtual appliances (VPX). This MAC address is persistent after each reboot. If you don't specify this parameter, a MAC address is generated randomly for each LA channel. These MAC addresses change after each reboot. .PARAMETER Speed Ethernet speed of the channel, in Mbps. If the speed of any bound interface is greater than or equal to the value set for this parameter, the state of the interface is UP. Otherwise, the state is INACTIVE. Bound Interfaces whose state is INACTIVE do not process any traffic. Possible values = AUTO, 10, 100, 1000, 10000, 25000, 40000, 50000, 100000 .PARAMETER Mtu The Maximum Transmission Unit (MTU) is the largest packet size, measured in bytes excluding 14 bytes ethernet header and 4 bytes CRC, that can be transmitted and received by an interface. The default value of MTU is 1500 on all the interface of Citrix ADC, some Cloud Platforms will restrict Citrix ADC to use the lesser default value. Any MTU value more than 1500 is called Jumbo MTU and will make the interface as jumbo enabled. The Maximum Jumbo MTU in Citrix ADC is 9216, however, some Virtualized / Cloud Platforms will have lesser Maximum Jumbo MTU Value (9000). In the case of Cluster, the Backplane interface requires an MTU value of 78 bytes more than the Max MTU configured on any other Data-Plane Interface. When the Data plane interfaces are all at default 1500 MTU, Cluster Back Plane will be automatically set to 1578 (1500 + 78) MTU. If a Backplane interface is reset to Data Plane Interface, then the 1578 MTU will be automatically reset to the default MTU of 1500(or whatever lesser default value). If any data plane interface of a Cluster is configured with a Jumbo MTU ( > 1500), then all backplane interfaces require to be configured with a minimum MTU of 'Highest Data Plane MTU in the Cluster + 78'. That makes the maximum Jumbo MTU for any Data-Plane Interface in a Cluster System to be '9138 (9216 - 78)., where 9216 is the maximum Jumbo MTU. On certain Virtualized / Cloud Platforms, the maximum possible MTU is restricted to a lesser value, Similar calculation can be applied, Maximum Data Plane MTU in Cluster = (Maximum possible MTU - 78). . Maximum value = 9216 .PARAMETER Flowctl Specifies the flow control type for this LA channel to manage the flow of frames. Flow control is a function as mentioned in clause 31 of the IEEE 802.3 standard. Flow control allows congested ports to pause traffic from the peer device. Flow control is achieved by sending PAUSE frames. Possible values = OFF, RX, TX, RXTX, ON .PARAMETER Hamonitor In a High Availability (HA) configuration, monitor the LA channel for failure events. Failure of any LA channel that has HA MON enabled triggers HA failover. Possible values = ON, OFF .PARAMETER Haheartbeat In a High Availability (HA) configuration, configure the LA channel for sending heartbeats. LA channel that has HA Heartbeat disabled should not send the heartbeats. Possible values = OFF, ON .PARAMETER Tagall Adds a four-byte 802.1q tag to every packet sent on this channel. The ON setting applies tags for all VLANs that are bound to this channel. OFF applies the tag for all VLANs other than the native VLAN. Possible values = ON, OFF .PARAMETER Trunk This is deprecated by tagall. Possible values = ON, OFF .PARAMETER Ifalias Alias name for the LA channel. Used only to enhance readability. To perform any operations, you have to specify the LA channel ID. .PARAMETER Throughput Low threshold value for the throughput of the LA channel, in Mbps. In an high availability (HA) configuration, failover is triggered when the LA channel has HA MON enabled and the throughput is below the specified threshold. Maximum value = 160000 .PARAMETER Lrminthroughput Specifies the minimum throughput threshold (in Mbps) to be met by the active subchannel. Setting this parameter automatically divides an LACP channel into logical subchannels, with one subchannel active and the others in standby mode. When the maximum supported throughput of the active channel falls below the lrMinThroughput value, link failover occurs and a standby subchannel becomes active. Maximum value = 80000 .PARAMETER Linkredundancy Link Redundancy for Cluster LAG. Possible values = ON, OFF .PARAMETER Bandwidthhigh High threshold value for the bandwidth usage of the LA channel, in Mbps. The Citrix ADC generates an SNMP trap message when the bandwidth usage of the LA channel is greater than or equal to the specified high threshold value. Maximum value = 160000 .PARAMETER Bandwidthnormal Normal threshold value for the bandwidth usage of the LA channel, in Mbps. When the bandwidth usage of the LA channel returns to less than or equal to the specified normal threshold after exceeding the high threshold, the Citrix ADC generates an SNMP trap message to indicate that the bandwidth usage has returned to normal. Maximum value = 160000 .PARAMETER PassThru Return details about the created channel item. .EXAMPLE PS C:\>Invoke-NSUpdateChannel -id <string> An example how to update channel config Object(s). .NOTES File Name : Invoke-NSUpdateChannel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [ValidateSet('ENABLED', 'DISABLED')] [string]$State, [ValidateSet('MANUAL', 'AUTO')] [string]$Mode, [ValidateSet('DISABLED', 'ENABLED')] [string]$Conndistr, [ValidateSet('SOURCE', 'DESTINATION', 'BOTH')] [string]$Macdistr, [string]$Lamac, [ValidateSet('AUTO', '10', '100', '1000', '10000', '25000', '40000', '50000', '100000')] [string]$Speed, [double]$Mtu, [ValidateSet('OFF', 'RX', 'TX', 'RXTX', 'ON')] [string]$Flowctl, [ValidateSet('ON', 'OFF')] [string]$Hamonitor, [ValidateSet('OFF', 'ON')] [string]$Haheartbeat, [ValidateSet('ON', 'OFF')] [string]$Tagall, [ValidateSet('ON', 'OFF')] [string]$Trunk, [string]$Ifalias, [double]$Throughput, [double]$Lrminthroughput, [ValidateSet('ON', 'OFF')] [string]$Linkredundancy, [double]$Bandwidthhigh, [double]$Bandwidthnormal, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateChannel: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) } if ( $PSBoundParameters.ContainsKey('mode') ) { $payload.Add('mode', $mode) } if ( $PSBoundParameters.ContainsKey('conndistr') ) { $payload.Add('conndistr', $conndistr) } if ( $PSBoundParameters.ContainsKey('macdistr') ) { $payload.Add('macdistr', $macdistr) } if ( $PSBoundParameters.ContainsKey('lamac') ) { $payload.Add('lamac', $lamac) } if ( $PSBoundParameters.ContainsKey('speed') ) { $payload.Add('speed', $speed) } if ( $PSBoundParameters.ContainsKey('mtu') ) { $payload.Add('mtu', $mtu) } if ( $PSBoundParameters.ContainsKey('flowctl') ) { $payload.Add('flowctl', $flowctl) } if ( $PSBoundParameters.ContainsKey('hamonitor') ) { $payload.Add('hamonitor', $hamonitor) } if ( $PSBoundParameters.ContainsKey('haheartbeat') ) { $payload.Add('haheartbeat', $haheartbeat) } if ( $PSBoundParameters.ContainsKey('tagall') ) { $payload.Add('tagall', $tagall) } if ( $PSBoundParameters.ContainsKey('trunk') ) { $payload.Add('trunk', $trunk) } if ( $PSBoundParameters.ContainsKey('ifalias') ) { $payload.Add('ifalias', $ifalias) } if ( $PSBoundParameters.ContainsKey('throughput') ) { $payload.Add('throughput', $throughput) } if ( $PSBoundParameters.ContainsKey('lrminthroughput') ) { $payload.Add('lrminthroughput', $lrminthroughput) } if ( $PSBoundParameters.ContainsKey('linkredundancy') ) { $payload.Add('linkredundancy', $linkredundancy) } if ( $PSBoundParameters.ContainsKey('bandwidthhigh') ) { $payload.Add('bandwidthhigh', $bandwidthhigh) } if ( $PSBoundParameters.ContainsKey('bandwidthnormal') ) { $payload.Add('bandwidthnormal', $bandwidthnormal) } if ( $PSCmdlet.ShouldProcess("channel", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type channel -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetChannel -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateChannel: Finished" } } function Invoke-NSUnsetChannel { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for channel resource. .PARAMETER Id ID for the LA channel or cluster LA channel or LR channel to be created. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. Cannot be changed after the LA channel is created. .PARAMETER State Enable or disable the LA channel. Possible values = ENABLED, DISABLED .PARAMETER Mode The initital mode for the LA channel. Possible values = MANUAL, AUTO .PARAMETER Conndistr The 'connection' distribution mode for the LA channel. Possible values = DISABLED, ENABLED .PARAMETER Macdistr The 'MAC' distribution mode for the LA channel. Possible values = SOURCE, DESTINATION, BOTH .PARAMETER Speed Ethernet speed of the channel, in Mbps. If the speed of any bound interface is greater than or equal to the value set for this parameter, the state of the interface is UP. Otherwise, the state is INACTIVE. Bound Interfaces whose state is INACTIVE do not process any traffic. Possible values = AUTO, 10, 100, 1000, 10000, 25000, 40000, 50000, 100000 .PARAMETER Mtu The Maximum Transmission Unit (MTU) is the largest packet size, measured in bytes excluding 14 bytes ethernet header and 4 bytes CRC, that can be transmitted and received by an interface. The default value of MTU is 1500 on all the interface of Citrix ADC, some Cloud Platforms will restrict Citrix ADC to use the lesser default value. Any MTU value more than 1500 is called Jumbo MTU and will make the interface as jumbo enabled. The Maximum Jumbo MTU in Citrix ADC is 9216, however, some Virtualized / Cloud Platforms will have lesser Maximum Jumbo MTU Value (9000). In the case of Cluster, the Backplane interface requires an MTU value of 78 bytes more than the Max MTU configured on any other Data-Plane Interface. When the Data plane interfaces are all at default 1500 MTU, Cluster Back Plane will be automatically set to 1578 (1500 + 78) MTU. If a Backplane interface is reset to Data Plane Interface, then the 1578 MTU will be automatically reset to the default MTU of 1500(or whatever lesser default value). If any data plane interface of a Cluster is configured with a Jumbo MTU ( > 1500), then all backplane interfaces require to be configured with a minimum MTU of 'Highest Data Plane MTU in the Cluster + 78'. That makes the maximum Jumbo MTU for any Data-Plane Interface in a Cluster System to be '9138 (9216 - 78)., where 9216 is the maximum Jumbo MTU. On certain Virtualized / Cloud Platforms, the maximum possible MTU is restricted to a lesser value, Similar calculation can be applied, Maximum Data Plane MTU in Cluster = (Maximum possible MTU - 78). . Maximum value = 9216 .PARAMETER Flowctl Specifies the flow control type for this LA channel to manage the flow of frames. Flow control is a function as mentioned in clause 31 of the IEEE 802.3 standard. Flow control allows congested ports to pause traffic from the peer device. Flow control is achieved by sending PAUSE frames. Possible values = OFF, RX, TX, RXTX, ON .PARAMETER Hamonitor In a High Availability (HA) configuration, monitor the LA channel for failure events. Failure of any LA channel that has HA MON enabled triggers HA failover. Possible values = ON, OFF .PARAMETER Haheartbeat In a High Availability (HA) configuration, configure the LA channel for sending heartbeats. LA channel that has HA Heartbeat disabled should not send the heartbeats. Possible values = OFF, ON .PARAMETER Tagall Adds a four-byte 802.1q tag to every packet sent on this channel. The ON setting applies tags for all VLANs that are bound to this channel. OFF applies the tag for all VLANs other than the native VLAN. Possible values = ON, OFF .PARAMETER Trunk This is deprecated by tagall. Possible values = ON, OFF .PARAMETER Ifalias Alias name for the LA channel. Used only to enhance readability. To perform any operations, you have to specify the LA channel ID. .PARAMETER Throughput Low threshold value for the throughput of the LA channel, in Mbps. In an high availability (HA) configuration, failover is triggered when the LA channel has HA MON enabled and the throughput is below the specified threshold. Maximum value = 160000 .PARAMETER Lrminthroughput Specifies the minimum throughput threshold (in Mbps) to be met by the active subchannel. Setting this parameter automatically divides an LACP channel into logical subchannels, with one subchannel active and the others in standby mode. When the maximum supported throughput of the active channel falls below the lrMinThroughput value, link failover occurs and a standby subchannel becomes active. Maximum value = 80000 .PARAMETER Linkredundancy Link Redundancy for Cluster LAG. Possible values = ON, OFF .PARAMETER Bandwidthhigh High threshold value for the bandwidth usage of the LA channel, in Mbps. The Citrix ADC generates an SNMP trap message when the bandwidth usage of the LA channel is greater than or equal to the specified high threshold value. Maximum value = 160000 .PARAMETER Bandwidthnormal Normal threshold value for the bandwidth usage of the LA channel, in Mbps. When the bandwidth usage of the LA channel returns to less than or equal to the specified normal threshold after exceeding the high threshold, the Citrix ADC generates an SNMP trap message to indicate that the bandwidth usage has returned to normal. Maximum value = 160000 .EXAMPLE PS C:\>Invoke-NSUnsetChannel -id <string> An example how to unset channel config Object(s). .NOTES File Name : Invoke-NSUnsetChannel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Id, [Boolean]$state, [Boolean]$mode, [Boolean]$conndistr, [Boolean]$macdistr, [Boolean]$speed, [Boolean]$mtu, [Boolean]$flowctl, [Boolean]$hamonitor, [Boolean]$haheartbeat, [Boolean]$tagall, [Boolean]$trunk, [Boolean]$ifalias, [Boolean]$throughput, [Boolean]$lrminthroughput, [Boolean]$linkredundancy, [Boolean]$bandwidthhigh, [Boolean]$bandwidthnormal ) begin { Write-Verbose "Invoke-NSUnsetChannel: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) } if ( $PSBoundParameters.ContainsKey('mode') ) { $payload.Add('mode', $mode) } if ( $PSBoundParameters.ContainsKey('conndistr') ) { $payload.Add('conndistr', $conndistr) } if ( $PSBoundParameters.ContainsKey('macdistr') ) { $payload.Add('macdistr', $macdistr) } if ( $PSBoundParameters.ContainsKey('speed') ) { $payload.Add('speed', $speed) } if ( $PSBoundParameters.ContainsKey('mtu') ) { $payload.Add('mtu', $mtu) } if ( $PSBoundParameters.ContainsKey('flowctl') ) { $payload.Add('flowctl', $flowctl) } if ( $PSBoundParameters.ContainsKey('hamonitor') ) { $payload.Add('hamonitor', $hamonitor) } if ( $PSBoundParameters.ContainsKey('haheartbeat') ) { $payload.Add('haheartbeat', $haheartbeat) } if ( $PSBoundParameters.ContainsKey('tagall') ) { $payload.Add('tagall', $tagall) } if ( $PSBoundParameters.ContainsKey('trunk') ) { $payload.Add('trunk', $trunk) } if ( $PSBoundParameters.ContainsKey('ifalias') ) { $payload.Add('ifalias', $ifalias) } if ( $PSBoundParameters.ContainsKey('throughput') ) { $payload.Add('throughput', $throughput) } if ( $PSBoundParameters.ContainsKey('lrminthroughput') ) { $payload.Add('lrminthroughput', $lrminthroughput) } if ( $PSBoundParameters.ContainsKey('linkredundancy') ) { $payload.Add('linkredundancy', $linkredundancy) } if ( $PSBoundParameters.ContainsKey('bandwidthhigh') ) { $payload.Add('bandwidthhigh', $bandwidthhigh) } if ( $PSBoundParameters.ContainsKey('bandwidthnormal') ) { $payload.Add('bandwidthnormal', $bandwidthnormal) } if ( $PSCmdlet.ShouldProcess("$id", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type channel -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetChannel: Finished" } } function Invoke-NSGetChannel { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for channel resource. .PARAMETER Id ID for the LA channel or cluster LA channel or LR channel to be created. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. Cannot be changed after the LA channel is created. .PARAMETER GetAll Retrieve all channel object(s). .PARAMETER Count If specified, the count of the channel object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetChannel Get data. .EXAMPLE PS C:\>Invoke-NSGetChannel -GetAll Get all channel data. .EXAMPLE PS C:\>Invoke-NSGetChannel -Count Get the number of channel objects. .EXAMPLE PS C:\>Invoke-NSGetChannel -name <string> Get channel object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetChannel -Filter @{ 'name'='<value>' } Get channel data with a filter. .NOTES File Name : Invoke-NSGetChannel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetChannel: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all channel objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for channel objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving channel objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving channel configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving channel configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetChannel: Ended" } } function Invoke-NSGetChannelBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to channel. .PARAMETER Id ID of an LA channel or LA channel in cluster configuration whose details you want the Citrix ADC to display. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or a cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. .PARAMETER GetAll Retrieve all channel_binding object(s). .PARAMETER Count If specified, the count of the channel_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetChannelBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetChannelBinding -GetAll Get all channel_binding data. .EXAMPLE PS C:\>Invoke-NSGetChannelBinding -name <string> Get channel_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetChannelBinding -Filter @{ 'name'='<value>' } Get channel_binding data with a filter. .NOTES File Name : Invoke-NSGetChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Id, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetChannelBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving channel_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving channel_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving channel_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetChannelBinding: Ended" } } function Invoke-NSAddChannelInterfaceBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to channel. .PARAMETER Id ID of the LA channel or the cluster LA channel to which you want to bind interfaces. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or a cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. .PARAMETER Ifnum Interfaces to be bound to the LA channel of a Citrix ADC or to the LA channel of a cluster configuration. For an LA channel of a Citrix ADC, specify an interface in C/U notation (for example, 1/3). For an LA channel of a cluster configuration, specify an interface in N/C/U notation (for example, 2/1/3). where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. U is a unique integer for representing an interface in a particular port group. N is the ID of the node to which an interface belongs in a cluster configuration. Use spaces to separate multiple entries. .PARAMETER PassThru Return details about the created channel_interface_binding item. .EXAMPLE PS C:\>Invoke-NSAddChannelInterfaceBinding -id <string> An example how to add channel_interface_binding config Object(s). .NOTES File Name : Invoke-NSAddChannelInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [string[]]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddChannelInterfaceBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSCmdlet.ShouldProcess("channel_interface_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type channel_interface_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetChannelInterfaceBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddChannelInterfaceBinding: Finished" } } function Invoke-NSDeleteChannelInterfaceBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to channel. .PARAMETER Id ID of the LA channel or the cluster LA channel to which you want to bind interfaces. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or a cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. .PARAMETER Ifnum Interfaces to be bound to the LA channel of a Citrix ADC or to the LA channel of a cluster configuration. For an LA channel of a Citrix ADC, specify an interface in C/U notation (for example, 1/3). For an LA channel of a cluster configuration, specify an interface in N/C/U notation (for example, 2/1/3). where C can take one of the following values: * 0 - Indicates a management interface. * 1 - Indicates a 1 Gbps port. * 10 - Indicates a 10 Gbps port. U is a unique integer for representing an interface in a particular port group. N is the ID of the node to which an interface belongs in a cluster configuration. Use spaces to separate multiple entries. .EXAMPLE PS C:\>Invoke-NSDeleteChannelInterfaceBinding -Id <string> An example how to delete channel_interface_binding config Object(s). .NOTES File Name : Invoke-NSDeleteChannelInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [string[]]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteChannelInterfaceBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type channel_interface_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteChannelInterfaceBinding: Finished" } } function Invoke-NSGetChannelInterfaceBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the interface that can be bound to channel. .PARAMETER Id ID of the LA channel or the cluster LA channel to which you want to bind interfaces. Specify an LA channel in LA/x notation, where x can range from 1 to 8 or a cluster LA channel in CLA/x notation or Link redundant channel in LR/x notation, where x can range from 1 to 4. .PARAMETER GetAll Retrieve all channel_interface_binding object(s). .PARAMETER Count If specified, the count of the channel_interface_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetChannelInterfaceBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetChannelInterfaceBinding -GetAll Get all channel_interface_binding data. .EXAMPLE PS C:\>Invoke-NSGetChannelInterfaceBinding -Count Get the number of channel_interface_binding objects. .EXAMPLE PS C:\>Invoke-NSGetChannelInterfaceBinding -name <string> Get channel_interface_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetChannelInterfaceBinding -Filter @{ 'name'='<value>' } Get channel_interface_binding data with a filter. .NOTES File Name : Invoke-NSGetChannelInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/channel_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetChannelInterfaceBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all channel_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for channel_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving channel_interface_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_interface_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving channel_interface_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_interface_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving channel_interface_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type channel_interface_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetChannelInterfaceBinding: Ended" } } function Invoke-NSGetCi { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for "CI" resource. .PARAMETER GetAll Retrieve all ci object(s). .PARAMETER Count If specified, the count of the ci object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetCi Get data. .EXAMPLE PS C:\>Invoke-NSGetCi -GetAll Get all ci data. .EXAMPLE PS C:\>Invoke-NSGetCi -Count Get the number of ci objects. .EXAMPLE PS C:\>Invoke-NSGetCi -name <string> Get ci object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetCi -Filter @{ 'name'='<value>' } Get ci data with a filter. .NOTES File Name : Invoke-NSGetCi Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ci/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetCi: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all ci objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ci -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ci objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ci -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ci objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ci -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ci configuration for property ''" } else { Write-Verbose "Retrieving ci configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ci -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetCi: Ended" } } function Invoke-NSAddFis { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for "FIS" resource. .PARAMETER Name Name for the FIS to be created. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). Note: In a cluster setup, the FIS name on each node must be unique. .PARAMETER Ownernode ID of the cluster node for which you are creating the FIS. Can be configured only through the cluster IP address. Maximum value = 31 .PARAMETER PassThru Return details about the created fis item. .EXAMPLE PS C:\>Invoke-NSAddFis -name <string> An example how to add fis config Object(s). .NOTES File Name : Invoke-NSAddFis Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [double]$Ownernode, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddFis: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSCmdlet.ShouldProcess("fis", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type fis -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetFis -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddFis: Finished" } } function Invoke-NSDeleteFis { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for "FIS" resource. .PARAMETER Name Name for the FIS to be created. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). Note: In a cluster setup, the FIS name on each node must be unique. .EXAMPLE PS C:\>Invoke-NSDeleteFis -Name <string> An example how to delete fis config Object(s). .NOTES File Name : Invoke-NSDeleteFis Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteFis: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type fis -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteFis: Finished" } } function Invoke-NSGetFis { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for "FIS" resource. .PARAMETER Name Name for the FIS to be created. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). Note: In a cluster setup, the FIS name on each node must be unique. .PARAMETER GetAll Retrieve all fis object(s). .PARAMETER Count If specified, the count of the fis object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetFis Get data. .EXAMPLE PS C:\>Invoke-NSGetFis -GetAll Get all fis data. .EXAMPLE PS C:\>Invoke-NSGetFis -Count Get the number of fis objects. .EXAMPLE PS C:\>Invoke-NSGetFis -name <string> Get fis object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetFis -Filter @{ 'name'='<value>' } Get fis data with a filter. .NOTES File Name : Invoke-NSGetFis Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetFis: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all fis objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for fis objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving fis objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving fis configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving fis configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetFis: Ended" } } function Invoke-NSGetFisBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to fis. .PARAMETER Name The name of the FIS configured on the appliance. . .PARAMETER GetAll Retrieve all fis_binding object(s). .PARAMETER Count If specified, the count of the fis_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetFisBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetFisBinding -GetAll Get all fis_binding data. .EXAMPLE PS C:\>Invoke-NSGetFisBinding -name <string> Get fis_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetFisBinding -Filter @{ 'name'='<value>' } Get fis_binding data with a filter. .NOTES File Name : Invoke-NSGetFisBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetFisBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all fis_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for fis_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving fis_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving fis_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving fis_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetFisBinding: Ended" } } function Invoke-NSAddFisChannelBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to fis. .PARAMETER Name The name of the FIS to which you want to bind interfaces. .PARAMETER Ifnum Interface to be bound to the FIS, specified in slot/port notation (for example, 1/3). .PARAMETER PassThru Return details about the created fis_channel_binding item. .EXAMPLE PS C:\>Invoke-NSAddFisChannelBinding -name <string> -ifnum <string> An example how to add fis_channel_binding config Object(s). .NOTES File Name : Invoke-NSAddFisChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [string]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddFisChannelBinding: Starting" } process { try { $payload = @{ name = $name ifnum = $ifnum } if ( $PSCmdlet.ShouldProcess("fis_channel_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type fis_channel_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetFisChannelBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddFisChannelBinding: Finished" } } function Invoke-NSDeleteFisChannelBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to fis. .PARAMETER Name The name of the FIS to which you want to bind interfaces. .PARAMETER Ifnum Interface to be bound to the FIS, specified in slot/port notation (for example, 1/3). .EXAMPLE PS C:\>Invoke-NSDeleteFisChannelBinding -Name <string> An example how to delete fis_channel_binding config Object(s). .NOTES File Name : Invoke-NSDeleteFisChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteFisChannelBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type fis_channel_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteFisChannelBinding: Finished" } } function Invoke-NSGetFisChannelBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the channel that can be bound to fis. .PARAMETER Name The name of the FIS to which you want to bind interfaces. .PARAMETER GetAll Retrieve all fis_channel_binding object(s). .PARAMETER Count If specified, the count of the fis_channel_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetFisChannelBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetFisChannelBinding -GetAll Get all fis_channel_binding data. .EXAMPLE PS C:\>Invoke-NSGetFisChannelBinding -Count Get the number of fis_channel_binding objects. .EXAMPLE PS C:\>Invoke-NSGetFisChannelBinding -name <string> Get fis_channel_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetFisChannelBinding -Filter @{ 'name'='<value>' } Get fis_channel_binding data with a filter. .NOTES File Name : Invoke-NSGetFisChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetFisChannelBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all fis_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for fis_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving fis_channel_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_channel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving fis_channel_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_channel_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving fis_channel_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type fis_channel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetFisChannelBinding: Ended" } } function Invoke-NSAddFisInterfaceBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to fis. .PARAMETER Name The name of the FIS to which you want to bind interfaces. .PARAMETER Ifnum Interface to be bound to the FIS, specified in slot/port notation (for example, 1/3). .EXAMPLE PS C:\>Invoke-NSAddFisInterfaceBinding -name <string> -ifnum <string> An example how to add fis_interface_binding config Object(s). .NOTES File Name : Invoke-NSAddFisInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [string]$Ifnum ) begin { Write-Verbose "Invoke-NSAddFisInterfaceBinding: Starting" } process { try { $payload = @{ name = $name ifnum = $ifnum } if ( $PSCmdlet.ShouldProcess("fis_interface_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type fis_interface_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddFisInterfaceBinding: Finished" } } function Invoke-NSDeleteFisInterfaceBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to fis. .PARAMETER Name The name of the FIS to which you want to bind interfaces. .PARAMETER Ifnum Interface to be bound to the FIS, specified in slot/port notation (for example, 1/3). .EXAMPLE PS C:\>Invoke-NSDeleteFisInterfaceBinding -Name <string> An example how to delete fis_interface_binding config Object(s). .NOTES File Name : Invoke-NSDeleteFisInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/fis_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteFisInterfaceBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type fis_interface_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteFisInterfaceBinding: Finished" } } function Invoke-NSAddForwardingsession { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for session forward resource. .PARAMETER Name Name for the forwarding session rule. Can begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. .PARAMETER Network An IPv4 network address or IPv6 prefix of a network from which the forwarded traffic originates or to which it is destined. .PARAMETER Netmask Subnet mask associated with the network. .PARAMETER Acl6name Name of any configured ACL6 whose action is ALLOW. The rule of the ACL6 is used as a forwarding session rule. .PARAMETER Aclname Name of any configured ACL whose action is ALLOW. The rule of the ACL is used as a forwarding session rule. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Connfailover Synchronize connection information with the secondary appliance in a high availability (HA) pair. That is, synchronize all connection-related information for the forwarding session. Possible values = ENABLED, DISABLED .PARAMETER Sourceroutecache Cache the source ip address and mac address of the DA servers. Possible values = ENABLED, DISABLED .PARAMETER Processlocal Enabling this option on forwarding session will not steer the packet to flow processor. Instead, packet will be routed. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created forwardingsession item. .EXAMPLE PS C:\>Invoke-NSAddForwardingsession -name <string> An example how to add forwardingsession config Object(s). .NOTES File Name : Invoke-NSAddForwardingsession Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/forwardingsession/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Network, [ValidateScript({ $_.Length -gt 1 })] [string]$Netmask, [ValidateScript({ $_.Length -gt 1 })] [string]$Acl6name, [ValidateScript({ $_.Length -gt 1 })] [string]$Aclname, [double]$Td, [ValidateSet('ENABLED', 'DISABLED')] [string]$Connfailover = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Sourceroutecache = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Processlocal = 'DISABLED', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddForwardingsession: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('network') ) { $payload.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('acl6name') ) { $payload.Add('acl6name', $acl6name) } if ( $PSBoundParameters.ContainsKey('aclname') ) { $payload.Add('aclname', $aclname) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('connfailover') ) { $payload.Add('connfailover', $connfailover) } if ( $PSBoundParameters.ContainsKey('sourceroutecache') ) { $payload.Add('sourceroutecache', $sourceroutecache) } if ( $PSBoundParameters.ContainsKey('processlocal') ) { $payload.Add('processlocal', $processlocal) } if ( $PSCmdlet.ShouldProcess("forwardingsession", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type forwardingsession -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetForwardingsession -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddForwardingsession: Finished" } } function Invoke-NSUpdateForwardingsession { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for session forward resource. .PARAMETER Name Name for the forwarding session rule. Can begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. .PARAMETER Connfailover Synchronize connection information with the secondary appliance in a high availability (HA) pair. That is, synchronize all connection-related information for the forwarding session. Possible values = ENABLED, DISABLED .PARAMETER Sourceroutecache Cache the source ip address and mac address of the DA servers. Possible values = ENABLED, DISABLED .PARAMETER Processlocal Enabling this option on forwarding session will not steer the packet to flow processor. Instead, packet will be routed. Possible values = ENABLED, DISABLED .PARAMETER Acl6name Name of any configured ACL6 whose action is ALLOW. The rule of the ACL6 is used as a forwarding session rule. .PARAMETER Aclname Name of any configured ACL whose action is ALLOW. The rule of the ACL is used as a forwarding session rule. .PARAMETER PassThru Return details about the created forwardingsession item. .EXAMPLE PS C:\>Invoke-NSUpdateForwardingsession -name <string> An example how to update forwardingsession config Object(s). .NOTES File Name : Invoke-NSUpdateForwardingsession Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/forwardingsession/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateSet('ENABLED', 'DISABLED')] [string]$Connfailover, [ValidateSet('ENABLED', 'DISABLED')] [string]$Sourceroutecache, [ValidateSet('ENABLED', 'DISABLED')] [string]$Processlocal, [ValidateScript({ $_.Length -gt 1 })] [string]$Acl6name, [ValidateScript({ $_.Length -gt 1 })] [string]$Aclname, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateForwardingsession: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('connfailover') ) { $payload.Add('connfailover', $connfailover) } if ( $PSBoundParameters.ContainsKey('sourceroutecache') ) { $payload.Add('sourceroutecache', $sourceroutecache) } if ( $PSBoundParameters.ContainsKey('processlocal') ) { $payload.Add('processlocal', $processlocal) } if ( $PSBoundParameters.ContainsKey('acl6name') ) { $payload.Add('acl6name', $acl6name) } if ( $PSBoundParameters.ContainsKey('aclname') ) { $payload.Add('aclname', $aclname) } if ( $PSCmdlet.ShouldProcess("forwardingsession", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type forwardingsession -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetForwardingsession -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateForwardingsession: Finished" } } function Invoke-NSDeleteForwardingsession { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for session forward resource. .PARAMETER Name Name for the forwarding session rule. Can begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. .EXAMPLE PS C:\>Invoke-NSDeleteForwardingsession -Name <string> An example how to delete forwardingsession config Object(s). .NOTES File Name : Invoke-NSDeleteForwardingsession Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/forwardingsession/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteForwardingsession: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type forwardingsession -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteForwardingsession: Finished" } } function Invoke-NSGetForwardingsession { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for session forward resource. .PARAMETER Name Name for the forwarding session rule. Can begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. .PARAMETER GetAll Retrieve all forwardingsession object(s). .PARAMETER Count If specified, the count of the forwardingsession object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetForwardingsession Get data. .EXAMPLE PS C:\>Invoke-NSGetForwardingsession -GetAll Get all forwardingsession data. .EXAMPLE PS C:\>Invoke-NSGetForwardingsession -Count Get the number of forwardingsession objects. .EXAMPLE PS C:\>Invoke-NSGetForwardingsession -name <string> Get forwardingsession object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetForwardingsession -Filter @{ 'name'='<value>' } Get forwardingsession data with a filter. .NOTES File Name : Invoke-NSGetForwardingsession Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/forwardingsession/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetForwardingsession: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all forwardingsession objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type forwardingsession -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for forwardingsession objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type forwardingsession -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving forwardingsession objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type forwardingsession -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving forwardingsession configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type forwardingsession -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving forwardingsession configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type forwardingsession -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetForwardingsession: Ended" } } function Invoke-NSAddInat { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for inbound nat resource. .PARAMETER Name Name for the Inbound NAT (INAT) entry. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .PARAMETER Publicip Public IP address of packets received on the Citrix ADC. Can be aNetScaler-owned VIP or VIP6 address. .PARAMETER Privateip IP address of the server to which the packet is sent by the Citrix ADC. Can be an IPv4 or IPv6 address. .PARAMETER Mode Stateless translation. Possible values = STATELESS .PARAMETER Tcpproxy Enable TCP proxy, which enables the Citrix ADC to optimize the RNAT TCP traffic by using Layer 4 features. Possible values = ENABLED, DISABLED .PARAMETER Ftp Enable the FTP protocol on the server for transferring files between the client and the server. Possible values = ENABLED, DISABLED .PARAMETER Tftp To enable/disable TFTP (Default DISABLED). Possible values = ENABLED, DISABLED .PARAMETER Usip Enable the Citrix ADC to retain the source IP address of packets before sending the packets to the server. Possible values = ON, OFF .PARAMETER Usnip Enable the Citrix ADC to use a SNIP address as the source IP address of packets before sending the packets to the server. Possible values = ON, OFF .PARAMETER Proxyip Unique IP address used as the source IP address in packets sent to the server. Must be a MIP or SNIP address. .PARAMETER Useproxyport Enable the Citrix ADC to proxy the source port of packets before sending the packets to the server. Possible values = ENABLED, DISABLED .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Connfailover Synchronize connection information with the secondary appliance in a high availability (HA) pair. That is, synchronize all connection-related information for the INAT session. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created inat item. .EXAMPLE PS C:\>Invoke-NSAddInat -name <string> -publicip <string> -privateip <string> An example how to add inat config Object(s). .NOTES File Name : Invoke-NSAddInat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/inat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Publicip, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Privateip, [ValidateSet('STATELESS')] [string]$Mode, [ValidateSet('ENABLED', 'DISABLED')] [string]$Tcpproxy = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Ftp = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Tftp = 'DISABLED', [ValidateSet('ON', 'OFF')] [string]$Usip, [ValidateSet('ON', 'OFF')] [string]$Usnip, [string]$Proxyip, [ValidateSet('ENABLED', 'DISABLED')] [string]$Useproxyport = 'ENABLED', [double]$Td, [ValidateSet('ENABLED', 'DISABLED')] [string]$Connfailover = 'DISABLED', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddInat: Starting" } process { try { $payload = @{ name = $name publicip = $publicip privateip = $privateip } if ( $PSBoundParameters.ContainsKey('mode') ) { $payload.Add('mode', $mode) } if ( $PSBoundParameters.ContainsKey('tcpproxy') ) { $payload.Add('tcpproxy', $tcpproxy) } if ( $PSBoundParameters.ContainsKey('ftp') ) { $payload.Add('ftp', $ftp) } if ( $PSBoundParameters.ContainsKey('tftp') ) { $payload.Add('tftp', $tftp) } if ( $PSBoundParameters.ContainsKey('usip') ) { $payload.Add('usip', $usip) } if ( $PSBoundParameters.ContainsKey('usnip') ) { $payload.Add('usnip', $usnip) } if ( $PSBoundParameters.ContainsKey('proxyip') ) { $payload.Add('proxyip', $proxyip) } if ( $PSBoundParameters.ContainsKey('useproxyport') ) { $payload.Add('useproxyport', $useproxyport) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('connfailover') ) { $payload.Add('connfailover', $connfailover) } if ( $PSCmdlet.ShouldProcess("inat", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type inat -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetInat -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddInat: Finished" } } function Invoke-NSDeleteInat { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for inbound nat resource. .PARAMETER Name Name for the Inbound NAT (INAT) entry. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .EXAMPLE PS C:\>Invoke-NSDeleteInat -Name <string> An example how to delete inat config Object(s). .NOTES File Name : Invoke-NSDeleteInat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/inat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteInat: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type inat -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteInat: Finished" } } function Invoke-NSUpdateInat { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for inbound nat resource. .PARAMETER Name Name for the Inbound NAT (INAT) entry. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .PARAMETER Privateip IP address of the server to which the packet is sent by the Citrix ADC. Can be an IPv4 or IPv6 address. .PARAMETER Tcpproxy Enable TCP proxy, which enables the Citrix ADC to optimize the RNAT TCP traffic by using Layer 4 features. Possible values = ENABLED, DISABLED .PARAMETER Ftp Enable the FTP protocol on the server for transferring files between the client and the server. Possible values = ENABLED, DISABLED .PARAMETER Tftp To enable/disable TFTP (Default DISABLED). Possible values = ENABLED, DISABLED .PARAMETER Usip Enable the Citrix ADC to retain the source IP address of packets before sending the packets to the server. Possible values = ON, OFF .PARAMETER Usnip Enable the Citrix ADC to use a SNIP address as the source IP address of packets before sending the packets to the server. Possible values = ON, OFF .PARAMETER Proxyip Unique IP address used as the source IP address in packets sent to the server. Must be a MIP or SNIP address. .PARAMETER Useproxyport Enable the Citrix ADC to proxy the source port of packets before sending the packets to the server. Possible values = ENABLED, DISABLED .PARAMETER Connfailover Synchronize connection information with the secondary appliance in a high availability (HA) pair. That is, synchronize all connection-related information for the INAT session. Possible values = ENABLED, DISABLED .PARAMETER Mode Stateless translation. Possible values = STATELESS .PARAMETER PassThru Return details about the created inat item. .EXAMPLE PS C:\>Invoke-NSUpdateInat -name <string> An example how to update inat config Object(s). .NOTES File Name : Invoke-NSUpdateInat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/inat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Privateip, [ValidateSet('ENABLED', 'DISABLED')] [string]$Tcpproxy, [ValidateSet('ENABLED', 'DISABLED')] [string]$Ftp, [ValidateSet('ENABLED', 'DISABLED')] [string]$Tftp, [ValidateSet('ON', 'OFF')] [string]$Usip, [ValidateSet('ON', 'OFF')] [string]$Usnip, [string]$Proxyip, [ValidateSet('ENABLED', 'DISABLED')] [string]$Useproxyport, [ValidateSet('ENABLED', 'DISABLED')] [string]$Connfailover, [ValidateSet('STATELESS')] [string]$Mode, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateInat: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('privateip') ) { $payload.Add('privateip', $privateip) } if ( $PSBoundParameters.ContainsKey('tcpproxy') ) { $payload.Add('tcpproxy', $tcpproxy) } if ( $PSBoundParameters.ContainsKey('ftp') ) { $payload.Add('ftp', $ftp) } if ( $PSBoundParameters.ContainsKey('tftp') ) { $payload.Add('tftp', $tftp) } if ( $PSBoundParameters.ContainsKey('usip') ) { $payload.Add('usip', $usip) } if ( $PSBoundParameters.ContainsKey('usnip') ) { $payload.Add('usnip', $usnip) } if ( $PSBoundParameters.ContainsKey('proxyip') ) { $payload.Add('proxyip', $proxyip) } if ( $PSBoundParameters.ContainsKey('useproxyport') ) { $payload.Add('useproxyport', $useproxyport) } if ( $PSBoundParameters.ContainsKey('connfailover') ) { $payload.Add('connfailover', $connfailover) } if ( $PSBoundParameters.ContainsKey('mode') ) { $payload.Add('mode', $mode) } if ( $PSCmdlet.ShouldProcess("inat", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type inat -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetInat -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateInat: Finished" } } function Invoke-NSUnsetInat { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for inbound nat resource. .PARAMETER Name Name for the Inbound NAT (INAT) entry. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .PARAMETER Tcpproxy Enable TCP proxy, which enables the Citrix ADC to optimize the RNAT TCP traffic by using Layer 4 features. Possible values = ENABLED, DISABLED .PARAMETER Ftp Enable the FTP protocol on the server for transferring files between the client and the server. Possible values = ENABLED, DISABLED .PARAMETER Tftp To enable/disable TFTP (Default DISABLED). Possible values = ENABLED, DISABLED .PARAMETER Usip Enable the Citrix ADC to retain the source IP address of packets before sending the packets to the server. Possible values = ON, OFF .PARAMETER Usnip Enable the Citrix ADC to use a SNIP address as the source IP address of packets before sending the packets to the server. Possible values = ON, OFF .PARAMETER Proxyip Unique IP address used as the source IP address in packets sent to the server. Must be a MIP or SNIP address. .PARAMETER Useproxyport Enable the Citrix ADC to proxy the source port of packets before sending the packets to the server. Possible values = ENABLED, DISABLED .PARAMETER Connfailover Synchronize connection information with the secondary appliance in a high availability (HA) pair. That is, synchronize all connection-related information for the INAT session. Possible values = ENABLED, DISABLED .PARAMETER Mode Stateless translation. Possible values = STATELESS .EXAMPLE PS C:\>Invoke-NSUnsetInat -name <string> An example how to unset inat config Object(s). .NOTES File Name : Invoke-NSUnsetInat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/inat Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Boolean]$tcpproxy, [Boolean]$ftp, [Boolean]$tftp, [Boolean]$usip, [Boolean]$usnip, [Boolean]$proxyip, [Boolean]$useproxyport, [Boolean]$connfailover, [Boolean]$mode ) begin { Write-Verbose "Invoke-NSUnsetInat: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('tcpproxy') ) { $payload.Add('tcpproxy', $tcpproxy) } if ( $PSBoundParameters.ContainsKey('ftp') ) { $payload.Add('ftp', $ftp) } if ( $PSBoundParameters.ContainsKey('tftp') ) { $payload.Add('tftp', $tftp) } if ( $PSBoundParameters.ContainsKey('usip') ) { $payload.Add('usip', $usip) } if ( $PSBoundParameters.ContainsKey('usnip') ) { $payload.Add('usnip', $usnip) } if ( $PSBoundParameters.ContainsKey('proxyip') ) { $payload.Add('proxyip', $proxyip) } if ( $PSBoundParameters.ContainsKey('useproxyport') ) { $payload.Add('useproxyport', $useproxyport) } if ( $PSBoundParameters.ContainsKey('connfailover') ) { $payload.Add('connfailover', $connfailover) } if ( $PSBoundParameters.ContainsKey('mode') ) { $payload.Add('mode', $mode) } if ( $PSCmdlet.ShouldProcess("$name", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type inat -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetInat: Finished" } } function Invoke-NSGetInat { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for inbound nat resource. .PARAMETER Name Name for the Inbound NAT (INAT) entry. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .PARAMETER GetAll Retrieve all inat object(s). .PARAMETER Count If specified, the count of the inat object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetInat Get data. .EXAMPLE PS C:\>Invoke-NSGetInat -GetAll Get all inat data. .EXAMPLE PS C:\>Invoke-NSGetInat -Count Get the number of inat objects. .EXAMPLE PS C:\>Invoke-NSGetInat -name <string> Get inat object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetInat -Filter @{ 'name'='<value>' } Get inat data with a filter. .NOTES File Name : Invoke-NSGetInat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/inat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetInat: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all inat objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inat -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for inat objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inat -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving inat objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inat -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving inat configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inat -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving inat configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inat -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetInat: Ended" } } function Invoke-NSUpdateInatparam { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for INAT parameter resource. .PARAMETER Nat46v6prefix The prefix used for translating packets received from private IPv6 servers into IPv4 packets. This prefix has a length of 96 bits (128-32 = 96). The IPv6 servers embed the destination IP address of the IPv4 servers or hosts in the last 32 bits of the destination IP address field of the IPv6 packets. The first 96 bits of the destination IP address field are set as the IPv6 NAT prefix. IPv6 packets addressed to this prefix have to be routed to the Citrix ADC to ensure that the IPv6-IPv4 translation is done by the appliance. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Nat46ignoretos Ignore TOS. Possible values = YES, NO .PARAMETER Nat46zerochecksum Calculate checksum for UDP packets with zero checksum. Possible values = ENABLED, DISABLED .PARAMETER Nat46v6mtu MTU setting for the IPv6 side. If the incoming IPv4 packet greater than this, either fragment or send icmp need fragmentation error. Maximum value = 9216 .PARAMETER Nat46fragheader When disabled, translator will not insert IPv6 fragmentation header for non fragmented IPv4 packets. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created inatparam item. .EXAMPLE PS C:\>Invoke-NSUpdateInatparam An example how to update inatparam config Object(s). .NOTES File Name : Invoke-NSUpdateInatparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/inatparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Nat46v6prefix, [double]$Td, [ValidateSet('YES', 'NO')] [string]$Nat46ignoretos, [ValidateSet('ENABLED', 'DISABLED')] [string]$Nat46zerochecksum, [double]$Nat46v6mtu, [ValidateSet('ENABLED', 'DISABLED')] [string]$Nat46fragheader, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateInatparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('nat46v6prefix') ) { $payload.Add('nat46v6prefix', $nat46v6prefix) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('nat46ignoretos') ) { $payload.Add('nat46ignoretos', $nat46ignoretos) } if ( $PSBoundParameters.ContainsKey('nat46zerochecksum') ) { $payload.Add('nat46zerochecksum', $nat46zerochecksum) } if ( $PSBoundParameters.ContainsKey('nat46v6mtu') ) { $payload.Add('nat46v6mtu', $nat46v6mtu) } if ( $PSBoundParameters.ContainsKey('nat46fragheader') ) { $payload.Add('nat46fragheader', $nat46fragheader) } if ( $PSCmdlet.ShouldProcess("inatparam", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type inatparam -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetInatparam -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateInatparam: Finished" } } function Invoke-NSUnsetInatparam { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for INAT parameter resource. .PARAMETER Nat46v6prefix The prefix used for translating packets received from private IPv6 servers into IPv4 packets. This prefix has a length of 96 bits (128-32 = 96). The IPv6 servers embed the destination IP address of the IPv4 servers or hosts in the last 32 bits of the destination IP address field of the IPv6 packets. The first 96 bits of the destination IP address field are set as the IPv6 NAT prefix. IPv6 packets addressed to this prefix have to be routed to the Citrix ADC to ensure that the IPv6-IPv4 translation is done by the appliance. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .EXAMPLE PS C:\>Invoke-NSUnsetInatparam An example how to unset inatparam config Object(s). .NOTES File Name : Invoke-NSUnsetInatparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/inatparam Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$nat46v6prefix, [Boolean]$td ) begin { Write-Verbose "Invoke-NSUnsetInatparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('nat46v6prefix') ) { $payload.Add('nat46v6prefix', $nat46v6prefix) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSCmdlet.ShouldProcess("inatparam", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type inatparam -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetInatparam: Finished" } } function Invoke-NSGetInatparam { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for INAT parameter resource. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER GetAll Retrieve all inatparam object(s). .PARAMETER Count If specified, the count of the inatparam object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetInatparam Get data. .EXAMPLE PS C:\>Invoke-NSGetInatparam -GetAll Get all inatparam data. .EXAMPLE PS C:\>Invoke-NSGetInatparam -Count Get the number of inatparam objects. .EXAMPLE PS C:\>Invoke-NSGetInatparam -name <string> Get inatparam object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetInatparam -Filter @{ 'name'='<value>' } Get inatparam data with a filter. .NOTES File Name : Invoke-NSGetInatparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/inatparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Td, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetInatparam: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all inatparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inatparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for inatparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inatparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving inatparam objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inatparam -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving inatparam configuration for property 'td'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inatparam -NitroPath nitro/v1/config -Resource $td -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving inatparam configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type inatparam -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetInatparam: Ended" } } function Invoke-NSAddInterfacepair { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for "Interface Pair" resource. .PARAMETER Id The Interface pair id. Maximum value = 255 .PARAMETER Ifnum The constituent interfaces in the interface pair. .PARAMETER PassThru Return details about the created interfacepair item. .EXAMPLE PS C:\>Invoke-NSAddInterfacepair -id <double> An example how to add interfacepair config Object(s). .NOTES File Name : Invoke-NSAddInterfacepair Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/interfacepair/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [ValidateScript({ $_.Length -gt 1 })] [string[]]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddInterfacepair: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSCmdlet.ShouldProcess("interfacepair", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type interfacepair -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetInterfacepair -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddInterfacepair: Finished" } } function Invoke-NSDeleteInterfacepair { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for "Interface Pair" resource. .PARAMETER Id The Interface pair id. Maximum value = 255 .EXAMPLE PS C:\>Invoke-NSDeleteInterfacepair -Id <double> An example how to delete interfacepair config Object(s). .NOTES File Name : Invoke-NSDeleteInterfacepair Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/interfacepair/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id ) begin { Write-Verbose "Invoke-NSDeleteInterfacepair: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type interfacepair -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteInterfacepair: Finished" } } function Invoke-NSGetInterfacepair { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for "Interface Pair" resource. .PARAMETER Id The Interface pair id. Maximum value = 255 .PARAMETER GetAll Retrieve all interfacepair object(s). .PARAMETER Count If specified, the count of the interfacepair object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetInterfacepair Get data. .EXAMPLE PS C:\>Invoke-NSGetInterfacepair -GetAll Get all interfacepair data. .EXAMPLE PS C:\>Invoke-NSGetInterfacepair -Count Get the number of interfacepair objects. .EXAMPLE PS C:\>Invoke-NSGetInterfacepair -name <string> Get interfacepair object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetInterfacepair -Filter @{ 'name'='<value>' } Get interfacepair data with a filter. .NOTES File Name : Invoke-NSGetInterfacepair Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/interfacepair/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetInterfacepair: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all interfacepair objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type interfacepair -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for interfacepair objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type interfacepair -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving interfacepair objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type interfacepair -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving interfacepair configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type interfacepair -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving interfacepair configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type interfacepair -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetInterfacepair: Ended" } } function Invoke-NSAddIp6tunnel { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for ip6 Tunnel resource. .PARAMETER Name Name for the IPv6 Tunnel. Cannot be changed after the service group is created. Must begin with a number or letter, and can consist of letters, numbers, and the @ _ - . (period) : (colon) # and space ( ) characters. .PARAMETER Remote An IPv6 address of the remote Citrix ADC used to set up the tunnel. .PARAMETER Local An IPv6 address of the local Citrix ADC used to set up the tunnel. .PARAMETER Ownergroup The owner node group in a Cluster for the tunnel. .PARAMETER PassThru Return details about the created ip6tunnel item. .EXAMPLE PS C:\>Invoke-NSAddIp6tunnel -name <string> -remote <string> -local <string> An example how to add ip6tunnel config Object(s). .NOTES File Name : Invoke-NSAddIp6tunnel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ip6tunnel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateLength(1, 31)] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Remote, [Parameter(Mandatory)] [string]$Local, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddIp6tunnel: Starting" } process { try { $payload = @{ name = $name remote = $remote local = $local } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("ip6tunnel", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type ip6tunnel -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetIp6tunnel -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddIp6tunnel: Finished" } } function Invoke-NSDeleteIp6tunnel { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for ip6 Tunnel resource. .PARAMETER Name Name for the IPv6 Tunnel. Cannot be changed after the service group is created. Must begin with a number or letter, and can consist of letters, numbers, and the @ _ - . (period) : (colon) # and space ( ) characters. .EXAMPLE PS C:\>Invoke-NSDeleteIp6tunnel -Name <string> An example how to delete ip6tunnel config Object(s). .NOTES File Name : Invoke-NSDeleteIp6tunnel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ip6tunnel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteIp6tunnel: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type ip6tunnel -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteIp6tunnel: Finished" } } function Invoke-NSGetIp6tunnel { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for ip6 Tunnel resource. .PARAMETER Name Name for the IPv6 Tunnel. Cannot be changed after the service group is created. Must begin with a number or letter, and can consist of letters, numbers, and the @ _ - . (period) : (colon) # and space ( ) characters. .PARAMETER GetAll Retrieve all ip6tunnel object(s). .PARAMETER Count If specified, the count of the ip6tunnel object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnel Get data. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnel -GetAll Get all ip6tunnel data. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnel -Count Get the number of ip6tunnel objects. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnel -name <string> Get ip6tunnel object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnel -Filter @{ 'name'='<value>' } Get ip6tunnel data with a filter. .NOTES File Name : Invoke-NSGetIp6tunnel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ip6tunnel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateLength(1, 31)] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetIp6tunnel: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all ip6tunnel objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnel -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ip6tunnel objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnel -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ip6tunnel objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnel -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ip6tunnel configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnel -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving ip6tunnel configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnel -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIp6tunnel: Ended" } } function Invoke-NSUpdateIp6tunnelparam { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for ip6 tunnel parameter resource. .PARAMETER Srcip Common source IPv6 address for all IPv6 tunnels. Must be a SNIP6 or VIP6 address. .PARAMETER Dropfrag Drop any packet that requires fragmentation. Possible values = YES, NO .PARAMETER Dropfragcputhreshold Threshold value, as a percentage of CPU usage, at which to drop packets that require fragmentation. Applies only if dropFragparameter is set to NO. Maximum value = 100 .PARAMETER Srciproundrobin Use a different source IPv6 address for each new session through a particular IPv6 tunnel, as determined by round robin selection of one of the SNIP6 addresses. This setting is ignored if a common global source IPv6 address has been specified for all the IPv6 tunnels. This setting does not apply to a tunnel for which a source IPv6 address has been specified. Possible values = YES, NO .PARAMETER Useclientsourceipv6 Use client source IPv6 address as source IPv6 address for outer tunnel IPv6 header. Possible values = YES, NO .EXAMPLE PS C:\>Invoke-NSUpdateIp6tunnelparam An example how to update ip6tunnelparam config Object(s). .NOTES File Name : Invoke-NSUpdateIp6tunnelparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ip6tunnelparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Srcip, [ValidateSet('YES', 'NO')] [string]$Dropfrag, [double]$Dropfragcputhreshold, [ValidateSet('YES', 'NO')] [string]$Srciproundrobin, [ValidateSet('YES', 'NO')] [string]$Useclientsourceipv6 ) begin { Write-Verbose "Invoke-NSUpdateIp6tunnelparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) } if ( $PSBoundParameters.ContainsKey('dropfrag') ) { $payload.Add('dropfrag', $dropfrag) } if ( $PSBoundParameters.ContainsKey('dropfragcputhreshold') ) { $payload.Add('dropfragcputhreshold', $dropfragcputhreshold) } if ( $PSBoundParameters.ContainsKey('srciproundrobin') ) { $payload.Add('srciproundrobin', $srciproundrobin) } if ( $PSBoundParameters.ContainsKey('useclientsourceipv6') ) { $payload.Add('useclientsourceipv6', $useclientsourceipv6) } if ( $PSCmdlet.ShouldProcess("ip6tunnelparam", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type ip6tunnelparam -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateIp6tunnelparam: Finished" } } function Invoke-NSUnsetIp6tunnelparam { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for ip6 tunnel parameter resource. .PARAMETER Srcip Common source IPv6 address for all IPv6 tunnels. Must be a SNIP6 or VIP6 address. .PARAMETER Dropfrag Drop any packet that requires fragmentation. Possible values = YES, NO .PARAMETER Dropfragcputhreshold Threshold value, as a percentage of CPU usage, at which to drop packets that require fragmentation. Applies only if dropFragparameter is set to NO. Maximum value = 100 .PARAMETER Srciproundrobin Use a different source IPv6 address for each new session through a particular IPv6 tunnel, as determined by round robin selection of one of the SNIP6 addresses. This setting is ignored if a common global source IPv6 address has been specified for all the IPv6 tunnels. This setting does not apply to a tunnel for which a source IPv6 address has been specified. Possible values = YES, NO .PARAMETER Useclientsourceipv6 Use client source IPv6 address as source IPv6 address for outer tunnel IPv6 header. Possible values = YES, NO .EXAMPLE PS C:\>Invoke-NSUnsetIp6tunnelparam An example how to unset ip6tunnelparam config Object(s). .NOTES File Name : Invoke-NSUnsetIp6tunnelparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ip6tunnelparam Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$srcip, [Boolean]$dropfrag, [Boolean]$dropfragcputhreshold, [Boolean]$srciproundrobin, [Boolean]$useclientsourceipv6 ) begin { Write-Verbose "Invoke-NSUnsetIp6tunnelparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) } if ( $PSBoundParameters.ContainsKey('dropfrag') ) { $payload.Add('dropfrag', $dropfrag) } if ( $PSBoundParameters.ContainsKey('dropfragcputhreshold') ) { $payload.Add('dropfragcputhreshold', $dropfragcputhreshold) } if ( $PSBoundParameters.ContainsKey('srciproundrobin') ) { $payload.Add('srciproundrobin', $srciproundrobin) } if ( $PSBoundParameters.ContainsKey('useclientsourceipv6') ) { $payload.Add('useclientsourceipv6', $useclientsourceipv6) } if ( $PSCmdlet.ShouldProcess("ip6tunnelparam", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type ip6tunnelparam -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetIp6tunnelparam: Finished" } } function Invoke-NSGetIp6tunnelparam { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for ip6 tunnel parameter resource. .PARAMETER GetAll Retrieve all ip6tunnelparam object(s). .PARAMETER Count If specified, the count of the ip6tunnelparam object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnelparam Get data. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnelparam -GetAll Get all ip6tunnelparam data. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnelparam -name <string> Get ip6tunnelparam object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIp6tunnelparam -Filter @{ 'name'='<value>' } Get ip6tunnelparam data with a filter. .NOTES File Name : Invoke-NSGetIp6tunnelparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ip6tunnelparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetIp6tunnelparam: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all ip6tunnelparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnelparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ip6tunnelparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnelparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ip6tunnelparam objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnelparam -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ip6tunnelparam configuration for property ''" } else { Write-Verbose "Retrieving ip6tunnelparam configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ip6tunnelparam -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIp6tunnelparam: Ended" } } function Invoke-NSAddIpset { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for network ipset resource. .PARAMETER Name Name for the IP set. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the IP set is created. Choose a name that helps identify the IP set. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER PassThru Return details about the created ipset item. .EXAMPLE PS C:\>Invoke-NSAddIpset -name <string> An example how to add ipset config Object(s). .NOTES File Name : Invoke-NSAddIpset Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [double]$Td, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddIpset: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSCmdlet.ShouldProcess("ipset", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type ipset -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetIpset -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddIpset: Finished" } } function Invoke-NSDeleteIpset { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for network ipset resource. .PARAMETER Name Name for the IP set. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the IP set is created. Choose a name that helps identify the IP set. .EXAMPLE PS C:\>Invoke-NSDeleteIpset -Name <string> An example how to delete ipset config Object(s). .NOTES File Name : Invoke-NSDeleteIpset Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteIpset: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type ipset -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteIpset: Finished" } } function Invoke-NSGetIpset { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for network ipset resource. .PARAMETER Name Name for the IP set. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the IP set is created. Choose a name that helps identify the IP set. .PARAMETER GetAll Retrieve all ipset object(s). .PARAMETER Count If specified, the count of the ipset object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIpset Get data. .EXAMPLE PS C:\>Invoke-NSGetIpset -GetAll Get all ipset data. .EXAMPLE PS C:\>Invoke-NSGetIpset -Count Get the number of ipset objects. .EXAMPLE PS C:\>Invoke-NSGetIpset -name <string> Get ipset object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIpset -Filter @{ 'name'='<value>' } Get ipset data with a filter. .NOTES File Name : Invoke-NSGetIpset Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetIpset: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all ipset objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ipset objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ipset objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ipset configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving ipset configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIpset: Ended" } } function Invoke-NSGetIpsetBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to ipset. .PARAMETER Name Name of the IP set whose details you want to display. .PARAMETER GetAll Retrieve all ipset_binding object(s). .PARAMETER Count If specified, the count of the ipset_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIpsetBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetIpsetBinding -GetAll Get all ipset_binding data. .EXAMPLE PS C:\>Invoke-NSGetIpsetBinding -name <string> Get ipset_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIpsetBinding -Filter @{ 'name'='<value>' } Get ipset_binding data with a filter. .NOTES File Name : Invoke-NSGetIpsetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetIpsetBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all ipset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ipset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ipset_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ipset_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving ipset_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIpsetBinding: Ended" } } function Invoke-NSAddIpsetNsip6Binding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to ipset. .PARAMETER Name Name of the IP set to which to bind IP addresses. .PARAMETER Ipaddress One or more IP addresses bound to the IP set. .PARAMETER PassThru Return details about the created ipset_nsip6_binding item. .EXAMPLE PS C:\>Invoke-NSAddIpsetNsip6Binding -name <string> -ipaddress <string> An example how to add ipset_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSAddIpsetNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Ipaddress, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddIpsetNsip6Binding: Starting" } process { try { $payload = @{ name = $name ipaddress = $ipaddress } if ( $PSCmdlet.ShouldProcess("ipset_nsip6_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type ipset_nsip6_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetIpsetNsip6Binding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddIpsetNsip6Binding: Finished" } } function Invoke-NSDeleteIpsetNsip6Binding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to ipset. .PARAMETER Name Name of the IP set to which to bind IP addresses. .PARAMETER Ipaddress One or more IP addresses bound to the IP set. .EXAMPLE PS C:\>Invoke-NSDeleteIpsetNsip6Binding -Name <string> An example how to delete ipset_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSDeleteIpsetNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Ipaddress ) begin { Write-Verbose "Invoke-NSDeleteIpsetNsip6Binding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type ipset_nsip6_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteIpsetNsip6Binding: Finished" } } function Invoke-NSGetIpsetNsip6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip6 that can be bound to ipset. .PARAMETER Name Name of the IP set to which to bind IP addresses. .PARAMETER GetAll Retrieve all ipset_nsip6_binding object(s). .PARAMETER Count If specified, the count of the ipset_nsip6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsip6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsip6Binding -GetAll Get all ipset_nsip6_binding data. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsip6Binding -Count Get the number of ipset_nsip6_binding objects. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsip6Binding -name <string> Get ipset_nsip6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsip6Binding -Filter @{ 'name'='<value>' } Get ipset_nsip6_binding data with a filter. .NOTES File Name : Invoke-NSGetIpsetNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetIpsetNsip6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all ipset_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ipset_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ipset_nsip6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ipset_nsip6_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip6_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving ipset_nsip6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIpsetNsip6Binding: Ended" } } function Invoke-NSAddIpsetNsipBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to ipset. .PARAMETER Name Name of the IP set to which to bind IP addresses. .PARAMETER Ipaddress One or more IP addresses bound to the IP set. .PARAMETER PassThru Return details about the created ipset_nsip_binding item. .EXAMPLE PS C:\>Invoke-NSAddIpsetNsipBinding -name <string> -ipaddress <string> An example how to add ipset_nsip_binding config Object(s). .NOTES File Name : Invoke-NSAddIpsetNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Ipaddress, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddIpsetNsipBinding: Starting" } process { try { $payload = @{ name = $name ipaddress = $ipaddress } if ( $PSCmdlet.ShouldProcess("ipset_nsip_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type ipset_nsip_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetIpsetNsipBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddIpsetNsipBinding: Finished" } } function Invoke-NSDeleteIpsetNsipBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to ipset. .PARAMETER Name Name of the IP set to which to bind IP addresses. .PARAMETER Ipaddress One or more IP addresses bound to the IP set. .EXAMPLE PS C:\>Invoke-NSDeleteIpsetNsipBinding -Name <string> An example how to delete ipset_nsip_binding config Object(s). .NOTES File Name : Invoke-NSDeleteIpsetNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Ipaddress ) begin { Write-Verbose "Invoke-NSDeleteIpsetNsipBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type ipset_nsip_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteIpsetNsipBinding: Finished" } } function Invoke-NSGetIpsetNsipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip that can be bound to ipset. .PARAMETER Name Name of the IP set to which to bind IP addresses. .PARAMETER GetAll Retrieve all ipset_nsip_binding object(s). .PARAMETER Count If specified, the count of the ipset_nsip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsipBinding -GetAll Get all ipset_nsip_binding data. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsipBinding -Count Get the number of ipset_nsip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsipBinding -name <string> Get ipset_nsip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIpsetNsipBinding -Filter @{ 'name'='<value>' } Get ipset_nsip_binding data with a filter. .NOTES File Name : Invoke-NSGetIpsetNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipset_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetIpsetNsipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all ipset_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ipset_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ipset_nsip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ipset_nsip_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving ipset_nsip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipset_nsip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIpsetNsipBinding: Ended" } } function Invoke-NSAddIptunnel { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for ip Tunnel resource. .PARAMETER Name Name for the IP tunnel. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .PARAMETER Remote Public IPv4 address, of the remote device, used to set up the tunnel. For this parameter, you can alternatively specify a network address. .PARAMETER Remotesubnetmask Subnet mask of the remote IP address of the tunnel. .PARAMETER Local Type of Citrix ADC owned public IPv4 address, configured on the local Citrix ADC and used to set up the tunnel. .PARAMETER Protocol Name of the protocol to be used on this tunnel. Possible values = IPIP, GRE, IPSEC, UDP, GENEVE .PARAMETER Vnid Virtual network identifier (VNID) is the value that identifies a specific virtual network in the data plane. Maximum value = 16777215 .PARAMETER Vlantagging Option to select Vlan Tagging. Possible values = ENABLED, DISABLED .PARAMETER Destport Specifies UDP destination port for Geneve packets. Default port is 6081. Maximum value = 65535 .PARAMETER Tosinherit Default behavior is to copy the ToS field of the internal IP Packet (Payload) to the outer IP packet (Transport packet). But the user can configure a new ToS field using this option. Possible values = ENABLED, DISABLED .PARAMETER Grepayload The payload GRE will carry. Possible values = ETHERNETwithDOT1Q, ETHERNET, IP .PARAMETER Ipsecprofilename Name of IPSec profile to be associated. .PARAMETER Vlan The vlan for mulicast packets. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for the iptunnel. .PARAMETER PassThru Return details about the created iptunnel item. .EXAMPLE PS C:\>Invoke-NSAddIptunnel -name <string> -remote <string> -remotesubnetmask <string> -local <string> An example how to add iptunnel config Object(s). .NOTES File Name : Invoke-NSAddIptunnel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/iptunnel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Remote, [Parameter(Mandatory)] [string]$Remotesubnetmask, [Parameter(Mandatory)] [string]$Local, [ValidateSet('IPIP', 'GRE', 'IPSEC', 'UDP', 'GENEVE')] [string]$Protocol = 'IPIP', [double]$Vnid, [ValidateSet('ENABLED', 'DISABLED')] [string]$Vlantagging = 'DISABLED', [int]$Destport = '6081', [ValidateSet('ENABLED', 'DISABLED')] [string]$Tosinherit = 'ENABLED', [ValidateSet('ETHERNETwithDOT1Q', 'ETHERNET', 'IP')] [string]$Grepayload = 'ETHERNETwithDOT1Q', [string]$Ipsecprofilename = '"ns_ipsec_default_profile"', [double]$Vlan, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddIptunnel: Starting" } process { try { $payload = @{ name = $name remote = $remote remotesubnetmask = $remotesubnetmask local = $local } if ( $PSBoundParameters.ContainsKey('protocol') ) { $payload.Add('protocol', $protocol) } if ( $PSBoundParameters.ContainsKey('vnid') ) { $payload.Add('vnid', $vnid) } if ( $PSBoundParameters.ContainsKey('vlantagging') ) { $payload.Add('vlantagging', $vlantagging) } if ( $PSBoundParameters.ContainsKey('destport') ) { $payload.Add('destport', $destport) } if ( $PSBoundParameters.ContainsKey('tosinherit') ) { $payload.Add('tosinherit', $tosinherit) } if ( $PSBoundParameters.ContainsKey('grepayload') ) { $payload.Add('grepayload', $grepayload) } if ( $PSBoundParameters.ContainsKey('ipsecprofilename') ) { $payload.Add('ipsecprofilename', $ipsecprofilename) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("iptunnel", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type iptunnel -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetIptunnel -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddIptunnel: Finished" } } function Invoke-NSDeleteIptunnel { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for ip Tunnel resource. .PARAMETER Name Name for the IP tunnel. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .EXAMPLE PS C:\>Invoke-NSDeleteIptunnel -Name <string> An example how to delete iptunnel config Object(s). .NOTES File Name : Invoke-NSDeleteIptunnel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/iptunnel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteIptunnel: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type iptunnel -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteIptunnel: Finished" } } function Invoke-NSUpdateIptunnel { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for ip Tunnel resource. .PARAMETER Name Name for the IP tunnel. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .PARAMETER Vlantagging Option to select Vlan Tagging. Possible values = ENABLED, DISABLED .PARAMETER Destport Specifies UDP destination port for Geneve packets. Default port is 6081. Maximum value = 65535 .PARAMETER Tosinherit Default behavior is to copy the ToS field of the internal IP Packet (Payload) to the outer IP packet (Transport packet). But the user can configure a new ToS field using this option. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created iptunnel item. .EXAMPLE PS C:\>Invoke-NSUpdateIptunnel -name <string> An example how to update iptunnel config Object(s). .NOTES File Name : Invoke-NSUpdateIptunnel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/iptunnel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateSet('ENABLED', 'DISABLED')] [string]$Vlantagging, [int]$Destport, [ValidateSet('ENABLED', 'DISABLED')] [string]$Tosinherit, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateIptunnel: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('vlantagging') ) { $payload.Add('vlantagging', $vlantagging) } if ( $PSBoundParameters.ContainsKey('destport') ) { $payload.Add('destport', $destport) } if ( $PSBoundParameters.ContainsKey('tosinherit') ) { $payload.Add('tosinherit', $tosinherit) } if ( $PSCmdlet.ShouldProcess("iptunnel", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type iptunnel -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetIptunnel -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateIptunnel: Finished" } } function Invoke-NSUnsetIptunnel { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for ip Tunnel resource. .PARAMETER Name Name for the IP tunnel. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .PARAMETER Vlantagging Option to select Vlan Tagging. Possible values = ENABLED, DISABLED .PARAMETER Destport Specifies UDP destination port for Geneve packets. Default port is 6081. Maximum value = 65535 .PARAMETER Tosinherit Default behavior is to copy the ToS field of the internal IP Packet (Payload) to the outer IP packet (Transport packet). But the user can configure a new ToS field using this option. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetIptunnel -name <string> An example how to unset iptunnel config Object(s). .NOTES File Name : Invoke-NSUnsetIptunnel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/iptunnel Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Boolean]$vlantagging, [Boolean]$destport, [Boolean]$tosinherit ) begin { Write-Verbose "Invoke-NSUnsetIptunnel: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('vlantagging') ) { $payload.Add('vlantagging', $vlantagging) } if ( $PSBoundParameters.ContainsKey('destport') ) { $payload.Add('destport', $destport) } if ( $PSBoundParameters.ContainsKey('tosinherit') ) { $payload.Add('tosinherit', $tosinherit) } if ( $PSCmdlet.ShouldProcess("$name", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type iptunnel -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetIptunnel: Finished" } } function Invoke-NSGetIptunnel { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for ip Tunnel resource. .PARAMETER Name Name for the IP tunnel. Leading character must be a number or letter. Other characters allowed, after the first character, are @ _ - . (period) : (colon) # and space ( ). .PARAMETER GetAll Retrieve all iptunnel object(s). .PARAMETER Count If specified, the count of the iptunnel object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIptunnel Get data. .EXAMPLE PS C:\>Invoke-NSGetIptunnel -GetAll Get all iptunnel data. .EXAMPLE PS C:\>Invoke-NSGetIptunnel -Count Get the number of iptunnel objects. .EXAMPLE PS C:\>Invoke-NSGetIptunnel -name <string> Get iptunnel object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIptunnel -Filter @{ 'name'='<value>' } Get iptunnel data with a filter. .NOTES File Name : Invoke-NSGetIptunnel Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/iptunnel/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetIptunnel: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all iptunnel objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnel -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for iptunnel objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnel -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving iptunnel objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnel -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving iptunnel configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnel -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving iptunnel configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnel -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIptunnel: Ended" } } function Invoke-NSUpdateIptunnelparam { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for ip tunnel parameter resource. .PARAMETER Srcip Common source-IP address for all tunnels. For a specific tunnel, this global setting is overridden if you have specified another source IP address. Must be a MIP or SNIP address. .PARAMETER Dropfrag Drop any IP packet that requires fragmentation before it is sent through the tunnel. Possible values = YES, NO .PARAMETER Dropfragcputhreshold Threshold value, as a percentage of CPU usage, at which to drop packets that require fragmentation to use the IP tunnel. Applies only if dropFragparameter is set to NO. The default value, 0, specifies that this parameter is not set. Maximum value = 100 .PARAMETER Srciproundrobin Use a different source IP address for each new session through a particular IP tunnel, as determined by round robin selection of one of the SNIP addresses. This setting is ignored if a common global source IP address has been specified for all the IP tunnels. This setting does not apply to a tunnel for which a source IP address has been specified. Possible values = YES, NO .PARAMETER Enablestrictrx Strict PBR check for IPSec packets received through tunnel. Possible values = YES, NO .PARAMETER Enablestricttx Strict PBR check for packets to be sent IPSec protected. Possible values = YES, NO .PARAMETER Mac The shared MAC used for shared IP between cluster nodes/HA peers. .PARAMETER Useclientsourceip Use client source IP as source IP for outer tunnel IP header. Possible values = YES, NO .EXAMPLE PS C:\>Invoke-NSUpdateIptunnelparam An example how to update iptunnelparam config Object(s). .NOTES File Name : Invoke-NSUpdateIptunnelparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/iptunnelparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Srcip, [ValidateSet('YES', 'NO')] [string]$Dropfrag, [double]$Dropfragcputhreshold, [ValidateSet('YES', 'NO')] [string]$Srciproundrobin, [ValidateSet('YES', 'NO')] [string]$Enablestrictrx, [ValidateSet('YES', 'NO')] [string]$Enablestricttx, [string]$Mac, [ValidateSet('YES', 'NO')] [string]$Useclientsourceip ) begin { Write-Verbose "Invoke-NSUpdateIptunnelparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) } if ( $PSBoundParameters.ContainsKey('dropfrag') ) { $payload.Add('dropfrag', $dropfrag) } if ( $PSBoundParameters.ContainsKey('dropfragcputhreshold') ) { $payload.Add('dropfragcputhreshold', $dropfragcputhreshold) } if ( $PSBoundParameters.ContainsKey('srciproundrobin') ) { $payload.Add('srciproundrobin', $srciproundrobin) } if ( $PSBoundParameters.ContainsKey('enablestrictrx') ) { $payload.Add('enablestrictrx', $enablestrictrx) } if ( $PSBoundParameters.ContainsKey('enablestricttx') ) { $payload.Add('enablestricttx', $enablestricttx) } if ( $PSBoundParameters.ContainsKey('mac') ) { $payload.Add('mac', $mac) } if ( $PSBoundParameters.ContainsKey('useclientsourceip') ) { $payload.Add('useclientsourceip', $useclientsourceip) } if ( $PSCmdlet.ShouldProcess("iptunnelparam", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type iptunnelparam -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateIptunnelparam: Finished" } } function Invoke-NSUnsetIptunnelparam { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for ip tunnel parameter resource. .PARAMETER Srcip Common source-IP address for all tunnels. For a specific tunnel, this global setting is overridden if you have specified another source IP address. Must be a MIP or SNIP address. .PARAMETER Dropfrag Drop any IP packet that requires fragmentation before it is sent through the tunnel. Possible values = YES, NO .PARAMETER Dropfragcputhreshold Threshold value, as a percentage of CPU usage, at which to drop packets that require fragmentation to use the IP tunnel. Applies only if dropFragparameter is set to NO. The default value, 0, specifies that this parameter is not set. Maximum value = 100 .PARAMETER Srciproundrobin Use a different source IP address for each new session through a particular IP tunnel, as determined by round robin selection of one of the SNIP addresses. This setting is ignored if a common global source IP address has been specified for all the IP tunnels. This setting does not apply to a tunnel for which a source IP address has been specified. Possible values = YES, NO .PARAMETER Enablestrictrx Strict PBR check for IPSec packets received through tunnel. Possible values = YES, NO .PARAMETER Enablestricttx Strict PBR check for packets to be sent IPSec protected. Possible values = YES, NO .PARAMETER Mac The shared MAC used for shared IP between cluster nodes/HA peers. .PARAMETER Useclientsourceip Use client source IP as source IP for outer tunnel IP header. Possible values = YES, NO .EXAMPLE PS C:\>Invoke-NSUnsetIptunnelparam An example how to unset iptunnelparam config Object(s). .NOTES File Name : Invoke-NSUnsetIptunnelparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/iptunnelparam Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$srcip, [Boolean]$dropfrag, [Boolean]$dropfragcputhreshold, [Boolean]$srciproundrobin, [Boolean]$enablestrictrx, [Boolean]$enablestricttx, [Boolean]$mac, [Boolean]$useclientsourceip ) begin { Write-Verbose "Invoke-NSUnsetIptunnelparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) } if ( $PSBoundParameters.ContainsKey('dropfrag') ) { $payload.Add('dropfrag', $dropfrag) } if ( $PSBoundParameters.ContainsKey('dropfragcputhreshold') ) { $payload.Add('dropfragcputhreshold', $dropfragcputhreshold) } if ( $PSBoundParameters.ContainsKey('srciproundrobin') ) { $payload.Add('srciproundrobin', $srciproundrobin) } if ( $PSBoundParameters.ContainsKey('enablestrictrx') ) { $payload.Add('enablestrictrx', $enablestrictrx) } if ( $PSBoundParameters.ContainsKey('enablestricttx') ) { $payload.Add('enablestricttx', $enablestricttx) } if ( $PSBoundParameters.ContainsKey('mac') ) { $payload.Add('mac', $mac) } if ( $PSBoundParameters.ContainsKey('useclientsourceip') ) { $payload.Add('useclientsourceip', $useclientsourceip) } if ( $PSCmdlet.ShouldProcess("iptunnelparam", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type iptunnelparam -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetIptunnelparam: Finished" } } function Invoke-NSGetIptunnelparam { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for ip tunnel parameter resource. .PARAMETER GetAll Retrieve all iptunnelparam object(s). .PARAMETER Count If specified, the count of the iptunnelparam object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIptunnelparam Get data. .EXAMPLE PS C:\>Invoke-NSGetIptunnelparam -GetAll Get all iptunnelparam data. .EXAMPLE PS C:\>Invoke-NSGetIptunnelparam -name <string> Get iptunnelparam object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIptunnelparam -Filter @{ 'name'='<value>' } Get iptunnelparam data with a filter. .NOTES File Name : Invoke-NSGetIptunnelparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/iptunnelparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetIptunnelparam: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all iptunnelparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnelparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for iptunnelparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnelparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving iptunnelparam objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnelparam -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving iptunnelparam configuration for property ''" } else { Write-Verbose "Retrieving iptunnelparam configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type iptunnelparam -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIptunnelparam: Ended" } } function Invoke-NSUpdateIpv6 { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for ip v6 resource. .PARAMETER Ralearning Enable the Citrix ADC to learn about various routes from Router Advertisement (RA) and Router Solicitation (RS) messages sent by the routers. Possible values = ENABLED, DISABLED .PARAMETER Routerredirection Enable the Citrix ADC to do Router Redirection. Possible values = ENABLED, DISABLED .PARAMETER Ndbasereachtime Base reachable time of the Neighbor Discovery (ND6) protocol. The time, in milliseconds, that the Citrix ADC assumes an adjacent device is reachable after receiving a reachability confirmation. .PARAMETER Ndretransmissiontime Retransmission time of the Neighbor Discovery (ND6) protocol. The time, in milliseconds, between retransmitted Neighbor Solicitation (NS) messages, to an adjacent device. .PARAMETER Natprefix Prefix used for translating packets from private IPv6 servers to IPv4 packets. This prefix has a length of 96 bits (128-32 = 96). The IPv6 servers embed the destination IP address of the IPv4 servers or hosts in the last 32 bits of the destination IP address field of the IPv6 packets. The first 96 bits of the destination IP address field are set as the IPv6 NAT prefix. IPv6 packets addressed to this prefix have to be routed to the Citrix ADC to ensure that the IPv6-IPv4 translation is done by the appliance. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Dodad Enable the Citrix ADC to do Duplicate Address Detection (DAD) for all the Citrix ADC owned IPv6 addresses regardless of whether they are obtained through stateless auto configuration, DHCPv6, or manual configuration. Possible values = ENABLED, DISABLED .PARAMETER Usipnatprefix IPV6 NATPREFIX used in NAT46 scenario when USIP is turned on. .PARAMETER PassThru Return details about the created ipv6 item. .EXAMPLE PS C:\>Invoke-NSUpdateIpv6 An example how to update ipv6 config Object(s). .NOTES File Name : Invoke-NSUpdateIpv6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipv6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateSet('ENABLED', 'DISABLED')] [string]$Ralearning, [ValidateSet('ENABLED', 'DISABLED')] [string]$Routerredirection, [double]$Ndbasereachtime, [double]$Ndretransmissiontime, [string]$Natprefix, [double]$Td, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dodad, [string]$Usipnatprefix, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateIpv6: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('ralearning') ) { $payload.Add('ralearning', $ralearning) } if ( $PSBoundParameters.ContainsKey('routerredirection') ) { $payload.Add('routerredirection', $routerredirection) } if ( $PSBoundParameters.ContainsKey('ndbasereachtime') ) { $payload.Add('ndbasereachtime', $ndbasereachtime) } if ( $PSBoundParameters.ContainsKey('ndretransmissiontime') ) { $payload.Add('ndretransmissiontime', $ndretransmissiontime) } if ( $PSBoundParameters.ContainsKey('natprefix') ) { $payload.Add('natprefix', $natprefix) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('dodad') ) { $payload.Add('dodad', $dodad) } if ( $PSBoundParameters.ContainsKey('usipnatprefix') ) { $payload.Add('usipnatprefix', $usipnatprefix) } if ( $PSCmdlet.ShouldProcess("ipv6", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type ipv6 -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetIpv6 -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateIpv6: Finished" } } function Invoke-NSUnsetIpv6 { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for ip v6 resource. .PARAMETER Ralearning Enable the Citrix ADC to learn about various routes from Router Advertisement (RA) and Router Solicitation (RS) messages sent by the routers. Possible values = ENABLED, DISABLED .PARAMETER Routerredirection Enable the Citrix ADC to do Router Redirection. Possible values = ENABLED, DISABLED .PARAMETER Ndbasereachtime Base reachable time of the Neighbor Discovery (ND6) protocol. The time, in milliseconds, that the Citrix ADC assumes an adjacent device is reachable after receiving a reachability confirmation. .PARAMETER Ndretransmissiontime Retransmission time of the Neighbor Discovery (ND6) protocol. The time, in milliseconds, between retransmitted Neighbor Solicitation (NS) messages, to an adjacent device. .PARAMETER Natprefix Prefix used for translating packets from private IPv6 servers to IPv4 packets. This prefix has a length of 96 bits (128-32 = 96). The IPv6 servers embed the destination IP address of the IPv4 servers or hosts in the last 32 bits of the destination IP address field of the IPv6 packets. The first 96 bits of the destination IP address field are set as the IPv6 NAT prefix. IPv6 packets addressed to this prefix have to be routed to the Citrix ADC to ensure that the IPv6-IPv4 translation is done by the appliance. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Dodad Enable the Citrix ADC to do Duplicate Address Detection (DAD) for all the Citrix ADC owned IPv6 addresses regardless of whether they are obtained through stateless auto configuration, DHCPv6, or manual configuration. Possible values = ENABLED, DISABLED .PARAMETER Usipnatprefix IPV6 NATPREFIX used in NAT46 scenario when USIP is turned on. .EXAMPLE PS C:\>Invoke-NSUnsetIpv6 An example how to unset ipv6 config Object(s). .NOTES File Name : Invoke-NSUnsetIpv6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipv6 Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$ralearning, [Boolean]$routerredirection, [Boolean]$ndbasereachtime, [Boolean]$ndretransmissiontime, [Boolean]$natprefix, [Boolean]$td, [Boolean]$dodad, [Boolean]$usipnatprefix ) begin { Write-Verbose "Invoke-NSUnsetIpv6: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('ralearning') ) { $payload.Add('ralearning', $ralearning) } if ( $PSBoundParameters.ContainsKey('routerredirection') ) { $payload.Add('routerredirection', $routerredirection) } if ( $PSBoundParameters.ContainsKey('ndbasereachtime') ) { $payload.Add('ndbasereachtime', $ndbasereachtime) } if ( $PSBoundParameters.ContainsKey('ndretransmissiontime') ) { $payload.Add('ndretransmissiontime', $ndretransmissiontime) } if ( $PSBoundParameters.ContainsKey('natprefix') ) { $payload.Add('natprefix', $natprefix) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('dodad') ) { $payload.Add('dodad', $dodad) } if ( $PSBoundParameters.ContainsKey('usipnatprefix') ) { $payload.Add('usipnatprefix', $usipnatprefix) } if ( $PSCmdlet.ShouldProcess("ipv6", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type ipv6 -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetIpv6: Finished" } } function Invoke-NSGetIpv6 { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for ip v6 resource. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER GetAll Retrieve all ipv6 object(s). .PARAMETER Count If specified, the count of the ipv6 object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetIpv6 Get data. .EXAMPLE PS C:\>Invoke-NSGetIpv6 -GetAll Get all ipv6 data. .EXAMPLE PS C:\>Invoke-NSGetIpv6 -Count Get the number of ipv6 objects. .EXAMPLE PS C:\>Invoke-NSGetIpv6 -name <string> Get ipv6 object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetIpv6 -Filter @{ 'name'='<value>' } Get ipv6 data with a filter. .NOTES File Name : Invoke-NSGetIpv6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ipv6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Td, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetIpv6: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all ipv6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipv6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ipv6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipv6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ipv6 objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipv6 -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ipv6 configuration for property 'td'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipv6 -NitroPath nitro/v1/config -Resource $td -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving ipv6 configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ipv6 -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetIpv6: Ended" } } function Invoke-NSUpdateL2param { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Layer 2 related parameter resource. .PARAMETER Mbfpeermacupdate When mbf_instant_learning is enabled, learn any changes in peer's MAC after this time interval, which is in 10ms ticks. .PARAMETER Maxbridgecollision Maximum bridge collision for loop detection . .PARAMETER Bdggrpproxyarp Set/reset proxy ARP in bridge group deployment. Possible values = ENABLED, DISABLED .PARAMETER Bdgsetting Bridging settings for C2C behavior. If enabled, each PE will learn MAC entries independently. Otherwise, when L2 mode is ON, learned MAC entries on a PE will be broadcasted to all other PEs. Possible values = ENABLED, DISABLED .PARAMETER Garponvridintf Send GARP messagess on VRID-configured interfaces upon failover . Possible values = ENABLED, DISABLED .PARAMETER Macmodefwdmypkt Allows MAC mode vserver to pick and forward the packets even if it is destined to Citrix ADC owned VIP. Possible values = ENABLED, DISABLED .PARAMETER Usemymac Use Citrix ADC MAC for all outgoing packets. Possible values = ENABLED, DISABLED .PARAMETER Proxyarp Proxies the ARP as Citrix ADC MAC for FreeBSD. Possible values = ENABLED, DISABLED .PARAMETER Garpreply Set/reset REPLY form of GARP . Possible values = ENABLED, DISABLED .PARAMETER Mbfinstlearning Enable instant learning of MAC changes in MBF mode. Possible values = ENABLED, DISABLED .PARAMETER Rstintfonhafo Enable the reset interface upon HA failover. Possible values = ENABLED, DISABLED .PARAMETER Skipproxyingbsdtraffic Control source parameters (IP and Port) for FreeBSD initiated traffic. If Enabled, source parameters are retained. Else proxy the source parameters based on next hop. Possible values = ENABLED, DISABLED .PARAMETER Returntoethernetsender Return to ethernet sender. Possible values = ENABLED, DISABLED .PARAMETER Stopmacmoveupdate Stop Update of server mac change to NAT sessions. Possible values = ENABLED, DISABLED .PARAMETER Bridgeagetimeout Time-out value for the bridge table entries, in seconds. The new value applies only to the entries that are dynamically learned after the new value is set. Previously existing bridge table entries expire after the previously configured time-out value. Maximum value = 300 .PARAMETER Usenetprofilebsdtraffic Control source parameters (IP and Port) for FreeBSD initiated traffic. If enabled proxy the source parameters based on netprofile source ip. If netprofile does not have ip configured, then it will continue to use NSIP as earlier. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUpdateL2param An example how to update l2param config Object(s). .NOTES File Name : Invoke-NSUpdateL2param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l2param/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Mbfpeermacupdate, [double]$Maxbridgecollision, [ValidateSet('ENABLED', 'DISABLED')] [string]$Bdggrpproxyarp, [ValidateSet('ENABLED', 'DISABLED')] [string]$Bdgsetting, [ValidateSet('ENABLED', 'DISABLED')] [string]$Garponvridintf, [ValidateSet('ENABLED', 'DISABLED')] [string]$Macmodefwdmypkt, [ValidateSet('ENABLED', 'DISABLED')] [string]$Usemymac, [ValidateSet('ENABLED', 'DISABLED')] [string]$Proxyarp, [ValidateSet('ENABLED', 'DISABLED')] [string]$Garpreply, [ValidateSet('ENABLED', 'DISABLED')] [string]$Mbfinstlearning, [ValidateSet('ENABLED', 'DISABLED')] [string]$Rstintfonhafo, [ValidateSet('ENABLED', 'DISABLED')] [string]$Skipproxyingbsdtraffic, [ValidateSet('ENABLED', 'DISABLED')] [string]$Returntoethernetsender, [ValidateSet('ENABLED', 'DISABLED')] [string]$Stopmacmoveupdate, [double]$Bridgeagetimeout, [ValidateSet('ENABLED', 'DISABLED')] [string]$Usenetprofilebsdtraffic ) begin { Write-Verbose "Invoke-NSUpdateL2param: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('mbfpeermacupdate') ) { $payload.Add('mbfpeermacupdate', $mbfpeermacupdate) } if ( $PSBoundParameters.ContainsKey('maxbridgecollision') ) { $payload.Add('maxbridgecollision', $maxbridgecollision) } if ( $PSBoundParameters.ContainsKey('bdggrpproxyarp') ) { $payload.Add('bdggrpproxyarp', $bdggrpproxyarp) } if ( $PSBoundParameters.ContainsKey('bdgsetting') ) { $payload.Add('bdgsetting', $bdgsetting) } if ( $PSBoundParameters.ContainsKey('garponvridintf') ) { $payload.Add('garponvridintf', $garponvridintf) } if ( $PSBoundParameters.ContainsKey('macmodefwdmypkt') ) { $payload.Add('macmodefwdmypkt', $macmodefwdmypkt) } if ( $PSBoundParameters.ContainsKey('usemymac') ) { $payload.Add('usemymac', $usemymac) } if ( $PSBoundParameters.ContainsKey('proxyarp') ) { $payload.Add('proxyarp', $proxyarp) } if ( $PSBoundParameters.ContainsKey('garpreply') ) { $payload.Add('garpreply', $garpreply) } if ( $PSBoundParameters.ContainsKey('mbfinstlearning') ) { $payload.Add('mbfinstlearning', $mbfinstlearning) } if ( $PSBoundParameters.ContainsKey('rstintfonhafo') ) { $payload.Add('rstintfonhafo', $rstintfonhafo) } if ( $PSBoundParameters.ContainsKey('skipproxyingbsdtraffic') ) { $payload.Add('skipproxyingbsdtraffic', $skipproxyingbsdtraffic) } if ( $PSBoundParameters.ContainsKey('returntoethernetsender') ) { $payload.Add('returntoethernetsender', $returntoethernetsender) } if ( $PSBoundParameters.ContainsKey('stopmacmoveupdate') ) { $payload.Add('stopmacmoveupdate', $stopmacmoveupdate) } if ( $PSBoundParameters.ContainsKey('bridgeagetimeout') ) { $payload.Add('bridgeagetimeout', $bridgeagetimeout) } if ( $PSBoundParameters.ContainsKey('usenetprofilebsdtraffic') ) { $payload.Add('usenetprofilebsdtraffic', $usenetprofilebsdtraffic) } if ( $PSCmdlet.ShouldProcess("l2param", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type l2param -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateL2param: Finished" } } function Invoke-NSUnsetL2param { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for Layer 2 related parameter resource. .PARAMETER Mbfpeermacupdate When mbf_instant_learning is enabled, learn any changes in peer's MAC after this time interval, which is in 10ms ticks. .PARAMETER Maxbridgecollision Maximum bridge collision for loop detection . .PARAMETER Bdggrpproxyarp Set/reset proxy ARP in bridge group deployment. Possible values = ENABLED, DISABLED .PARAMETER Bdgsetting Bridging settings for C2C behavior. If enabled, each PE will learn MAC entries independently. Otherwise, when L2 mode is ON, learned MAC entries on a PE will be broadcasted to all other PEs. Possible values = ENABLED, DISABLED .PARAMETER Garponvridintf Send GARP messagess on VRID-configured interfaces upon failover . Possible values = ENABLED, DISABLED .PARAMETER Macmodefwdmypkt Allows MAC mode vserver to pick and forward the packets even if it is destined to Citrix ADC owned VIP. Possible values = ENABLED, DISABLED .PARAMETER Usemymac Use Citrix ADC MAC for all outgoing packets. Possible values = ENABLED, DISABLED .PARAMETER Proxyarp Proxies the ARP as Citrix ADC MAC for FreeBSD. Possible values = ENABLED, DISABLED .PARAMETER Garpreply Set/reset REPLY form of GARP . Possible values = ENABLED, DISABLED .PARAMETER Mbfinstlearning Enable instant learning of MAC changes in MBF mode. Possible values = ENABLED, DISABLED .PARAMETER Rstintfonhafo Enable the reset interface upon HA failover. Possible values = ENABLED, DISABLED .PARAMETER Skipproxyingbsdtraffic Control source parameters (IP and Port) for FreeBSD initiated traffic. If Enabled, source parameters are retained. Else proxy the source parameters based on next hop. Possible values = ENABLED, DISABLED .PARAMETER Returntoethernetsender Return to ethernet sender. Possible values = ENABLED, DISABLED .PARAMETER Stopmacmoveupdate Stop Update of server mac change to NAT sessions. Possible values = ENABLED, DISABLED .PARAMETER Bridgeagetimeout Time-out value for the bridge table entries, in seconds. The new value applies only to the entries that are dynamically learned after the new value is set. Previously existing bridge table entries expire after the previously configured time-out value. Maximum value = 300 .PARAMETER Usenetprofilebsdtraffic Control source parameters (IP and Port) for FreeBSD initiated traffic. If enabled proxy the source parameters based on netprofile source ip. If netprofile does not have ip configured, then it will continue to use NSIP as earlier. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetL2param An example how to unset l2param config Object(s). .NOTES File Name : Invoke-NSUnsetL2param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l2param Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$mbfpeermacupdate, [Boolean]$maxbridgecollision, [Boolean]$bdggrpproxyarp, [Boolean]$bdgsetting, [Boolean]$garponvridintf, [Boolean]$macmodefwdmypkt, [Boolean]$usemymac, [Boolean]$proxyarp, [Boolean]$garpreply, [Boolean]$mbfinstlearning, [Boolean]$rstintfonhafo, [Boolean]$skipproxyingbsdtraffic, [Boolean]$returntoethernetsender, [Boolean]$stopmacmoveupdate, [Boolean]$bridgeagetimeout, [Boolean]$usenetprofilebsdtraffic ) begin { Write-Verbose "Invoke-NSUnsetL2param: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('mbfpeermacupdate') ) { $payload.Add('mbfpeermacupdate', $mbfpeermacupdate) } if ( $PSBoundParameters.ContainsKey('maxbridgecollision') ) { $payload.Add('maxbridgecollision', $maxbridgecollision) } if ( $PSBoundParameters.ContainsKey('bdggrpproxyarp') ) { $payload.Add('bdggrpproxyarp', $bdggrpproxyarp) } if ( $PSBoundParameters.ContainsKey('bdgsetting') ) { $payload.Add('bdgsetting', $bdgsetting) } if ( $PSBoundParameters.ContainsKey('garponvridintf') ) { $payload.Add('garponvridintf', $garponvridintf) } if ( $PSBoundParameters.ContainsKey('macmodefwdmypkt') ) { $payload.Add('macmodefwdmypkt', $macmodefwdmypkt) } if ( $PSBoundParameters.ContainsKey('usemymac') ) { $payload.Add('usemymac', $usemymac) } if ( $PSBoundParameters.ContainsKey('proxyarp') ) { $payload.Add('proxyarp', $proxyarp) } if ( $PSBoundParameters.ContainsKey('garpreply') ) { $payload.Add('garpreply', $garpreply) } if ( $PSBoundParameters.ContainsKey('mbfinstlearning') ) { $payload.Add('mbfinstlearning', $mbfinstlearning) } if ( $PSBoundParameters.ContainsKey('rstintfonhafo') ) { $payload.Add('rstintfonhafo', $rstintfonhafo) } if ( $PSBoundParameters.ContainsKey('skipproxyingbsdtraffic') ) { $payload.Add('skipproxyingbsdtraffic', $skipproxyingbsdtraffic) } if ( $PSBoundParameters.ContainsKey('returntoethernetsender') ) { $payload.Add('returntoethernetsender', $returntoethernetsender) } if ( $PSBoundParameters.ContainsKey('stopmacmoveupdate') ) { $payload.Add('stopmacmoveupdate', $stopmacmoveupdate) } if ( $PSBoundParameters.ContainsKey('bridgeagetimeout') ) { $payload.Add('bridgeagetimeout', $bridgeagetimeout) } if ( $PSBoundParameters.ContainsKey('usenetprofilebsdtraffic') ) { $payload.Add('usenetprofilebsdtraffic', $usenetprofilebsdtraffic) } if ( $PSCmdlet.ShouldProcess("l2param", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type l2param -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetL2param: Finished" } } function Invoke-NSGetL2param { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Layer 2 related parameter resource. .PARAMETER GetAll Retrieve all l2param object(s). .PARAMETER Count If specified, the count of the l2param object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetL2param Get data. .EXAMPLE PS C:\>Invoke-NSGetL2param -GetAll Get all l2param data. .EXAMPLE PS C:\>Invoke-NSGetL2param -name <string> Get l2param object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetL2param -Filter @{ 'name'='<value>' } Get l2param data with a filter. .NOTES File Name : Invoke-NSGetL2param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l2param/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetL2param: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all l2param objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l2param -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for l2param objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l2param -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving l2param objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l2param -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving l2param configuration for property ''" } else { Write-Verbose "Retrieving l2param configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l2param -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetL2param: Ended" } } function Invoke-NSUpdateL3param { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Layer 3 related parameter resource. .PARAMETER Srcnat Perform NAT if only the source is in the private network. Possible values = ENABLED, DISABLED .PARAMETER Icmpgenratethreshold NS generated ICMP pkts per 10ms rate threshold. .PARAMETER Overridernat USNIP/USIP settings override RNAT settings for configured service/virtual server traffic.. . Possible values = ENABLED, DISABLED .PARAMETER Dropdfflag Enable dropping the IP DF flag. Possible values = ENABLED, DISABLED .PARAMETER Miproundrobin Enable round robin usage of mapped IPs. Possible values = ENABLED, DISABLED .PARAMETER Externalloopback Enable external loopback. Possible values = ENABLED, DISABLED .PARAMETER Tnlpmtuwoconn Enable/Disable learning PMTU of IP tunnel when ICMP error does not contain connection information. Possible values = ENABLED, DISABLED .PARAMETER Usipserverstraypkt Enable detection of stray server side pkts in USIP mode. Possible values = ENABLED, DISABLED .PARAMETER Forwardicmpfragments Enable forwarding of ICMP fragments. Possible values = ENABLED, DISABLED .PARAMETER Dropipfragments Enable dropping of IP fragments. Possible values = ENABLED, DISABLED .PARAMETER Acllogtime Parameter to tune acl logging time. .PARAMETER Implicitaclallow Do not apply ACLs for internal ports. Possible values = ENABLED, DISABLED .PARAMETER Dynamicrouting Enable/Disable Dynamic routing on partition. This configuration is not applicable to default partition. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable/Disable IPv6 Dynamic routing. Possible values = ENABLED, DISABLED .PARAMETER Allowclasseipv4 Enable/Disable IPv4 Class E address clients. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUpdateL3param An example how to update l3param config Object(s). .NOTES File Name : Invoke-NSUpdateL3param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l3param/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateSet('ENABLED', 'DISABLED')] [string]$Srcnat, [double]$Icmpgenratethreshold, [ValidateSet('ENABLED', 'DISABLED')] [string]$Overridernat, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dropdfflag, [ValidateSet('ENABLED', 'DISABLED')] [string]$Miproundrobin, [ValidateSet('ENABLED', 'DISABLED')] [string]$Externalloopback, [ValidateSet('ENABLED', 'DISABLED')] [string]$Tnlpmtuwoconn, [ValidateSet('ENABLED', 'DISABLED')] [string]$Usipserverstraypkt, [ValidateSet('ENABLED', 'DISABLED')] [string]$Forwardicmpfragments, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dropipfragments, [double]$Acllogtime, [ValidateSet('ENABLED', 'DISABLED')] [string]$Implicitaclallow, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dynamicrouting, [ValidateSet('ENABLED', 'DISABLED')] [string]$Ipv6dynamicrouting, [ValidateSet('ENABLED', 'DISABLED')] [string]$Allowclasseipv4 ) begin { Write-Verbose "Invoke-NSUpdateL3param: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('srcnat') ) { $payload.Add('srcnat', $srcnat) } if ( $PSBoundParameters.ContainsKey('icmpgenratethreshold') ) { $payload.Add('icmpgenratethreshold', $icmpgenratethreshold) } if ( $PSBoundParameters.ContainsKey('overridernat') ) { $payload.Add('overridernat', $overridernat) } if ( $PSBoundParameters.ContainsKey('dropdfflag') ) { $payload.Add('dropdfflag', $dropdfflag) } if ( $PSBoundParameters.ContainsKey('miproundrobin') ) { $payload.Add('miproundrobin', $miproundrobin) } if ( $PSBoundParameters.ContainsKey('externalloopback') ) { $payload.Add('externalloopback', $externalloopback) } if ( $PSBoundParameters.ContainsKey('tnlpmtuwoconn') ) { $payload.Add('tnlpmtuwoconn', $tnlpmtuwoconn) } if ( $PSBoundParameters.ContainsKey('usipserverstraypkt') ) { $payload.Add('usipserverstraypkt', $usipserverstraypkt) } if ( $PSBoundParameters.ContainsKey('forwardicmpfragments') ) { $payload.Add('forwardicmpfragments', $forwardicmpfragments) } if ( $PSBoundParameters.ContainsKey('dropipfragments') ) { $payload.Add('dropipfragments', $dropipfragments) } if ( $PSBoundParameters.ContainsKey('acllogtime') ) { $payload.Add('acllogtime', $acllogtime) } if ( $PSBoundParameters.ContainsKey('implicitaclallow') ) { $payload.Add('implicitaclallow', $implicitaclallow) } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSBoundParameters.ContainsKey('allowclasseipv4') ) { $payload.Add('allowclasseipv4', $allowclasseipv4) } if ( $PSCmdlet.ShouldProcess("l3param", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type l3param -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateL3param: Finished" } } function Invoke-NSUnsetL3param { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for Layer 3 related parameter resource. .PARAMETER Srcnat Perform NAT if only the source is in the private network. Possible values = ENABLED, DISABLED .PARAMETER Icmpgenratethreshold NS generated ICMP pkts per 10ms rate threshold. .PARAMETER Overridernat USNIP/USIP settings override RNAT settings for configured service/virtual server traffic.. . Possible values = ENABLED, DISABLED .PARAMETER Dropdfflag Enable dropping the IP DF flag. Possible values = ENABLED, DISABLED .PARAMETER Miproundrobin Enable round robin usage of mapped IPs. Possible values = ENABLED, DISABLED .PARAMETER Externalloopback Enable external loopback. Possible values = ENABLED, DISABLED .PARAMETER Tnlpmtuwoconn Enable/Disable learning PMTU of IP tunnel when ICMP error does not contain connection information. Possible values = ENABLED, DISABLED .PARAMETER Usipserverstraypkt Enable detection of stray server side pkts in USIP mode. Possible values = ENABLED, DISABLED .PARAMETER Forwardicmpfragments Enable forwarding of ICMP fragments. Possible values = ENABLED, DISABLED .PARAMETER Dropipfragments Enable dropping of IP fragments. Possible values = ENABLED, DISABLED .PARAMETER Acllogtime Parameter to tune acl logging time. .PARAMETER Implicitaclallow Do not apply ACLs for internal ports. Possible values = ENABLED, DISABLED .PARAMETER Dynamicrouting Enable/Disable Dynamic routing on partition. This configuration is not applicable to default partition. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable/Disable IPv6 Dynamic routing. Possible values = ENABLED, DISABLED .PARAMETER Allowclasseipv4 Enable/Disable IPv4 Class E address clients. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetL3param An example how to unset l3param config Object(s). .NOTES File Name : Invoke-NSUnsetL3param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l3param Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$srcnat, [Boolean]$icmpgenratethreshold, [Boolean]$overridernat, [Boolean]$dropdfflag, [Boolean]$miproundrobin, [Boolean]$externalloopback, [Boolean]$tnlpmtuwoconn, [Boolean]$usipserverstraypkt, [Boolean]$forwardicmpfragments, [Boolean]$dropipfragments, [Boolean]$acllogtime, [Boolean]$implicitaclallow, [Boolean]$dynamicrouting, [Boolean]$ipv6dynamicrouting, [Boolean]$allowclasseipv4 ) begin { Write-Verbose "Invoke-NSUnsetL3param: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('srcnat') ) { $payload.Add('srcnat', $srcnat) } if ( $PSBoundParameters.ContainsKey('icmpgenratethreshold') ) { $payload.Add('icmpgenratethreshold', $icmpgenratethreshold) } if ( $PSBoundParameters.ContainsKey('overridernat') ) { $payload.Add('overridernat', $overridernat) } if ( $PSBoundParameters.ContainsKey('dropdfflag') ) { $payload.Add('dropdfflag', $dropdfflag) } if ( $PSBoundParameters.ContainsKey('miproundrobin') ) { $payload.Add('miproundrobin', $miproundrobin) } if ( $PSBoundParameters.ContainsKey('externalloopback') ) { $payload.Add('externalloopback', $externalloopback) } if ( $PSBoundParameters.ContainsKey('tnlpmtuwoconn') ) { $payload.Add('tnlpmtuwoconn', $tnlpmtuwoconn) } if ( $PSBoundParameters.ContainsKey('usipserverstraypkt') ) { $payload.Add('usipserverstraypkt', $usipserverstraypkt) } if ( $PSBoundParameters.ContainsKey('forwardicmpfragments') ) { $payload.Add('forwardicmpfragments', $forwardicmpfragments) } if ( $PSBoundParameters.ContainsKey('dropipfragments') ) { $payload.Add('dropipfragments', $dropipfragments) } if ( $PSBoundParameters.ContainsKey('acllogtime') ) { $payload.Add('acllogtime', $acllogtime) } if ( $PSBoundParameters.ContainsKey('implicitaclallow') ) { $payload.Add('implicitaclallow', $implicitaclallow) } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSBoundParameters.ContainsKey('allowclasseipv4') ) { $payload.Add('allowclasseipv4', $allowclasseipv4) } if ( $PSCmdlet.ShouldProcess("l3param", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type l3param -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetL3param: Finished" } } function Invoke-NSGetL3param { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Layer 3 related parameter resource. .PARAMETER GetAll Retrieve all l3param object(s). .PARAMETER Count If specified, the count of the l3param object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetL3param Get data. .EXAMPLE PS C:\>Invoke-NSGetL3param -GetAll Get all l3param data. .EXAMPLE PS C:\>Invoke-NSGetL3param -name <string> Get l3param object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetL3param -Filter @{ 'name'='<value>' } Get l3param data with a filter. .NOTES File Name : Invoke-NSGetL3param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l3param/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetL3param: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all l3param objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l3param -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for l3param objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l3param -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving l3param objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l3param -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving l3param configuration for property ''" } else { Write-Verbose "Retrieving l3param configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l3param -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetL3param: Ended" } } function Invoke-NSUpdateL4param { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Layer 4 related parameter resource. .PARAMETER L2connmethod Layer 2 connection method based on the combination of channel number, MAC address and VLAN. It is tuned with l2conn param of lb vserver. If l2conn of lb vserver is ON then method specified here will be used to identify a connection in addition to the 4-tuple (<source IP>:<source port>::<destination IP>:<destination port>). Possible values = Channel, Vlan, VlanChannel, Mac, MacChannel, MacVlan, MacVlanChannel .PARAMETER L4switch In L4 switch topology, always clients and servers are on the same side. Enable l4switch to allow such connections. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUpdateL4param An example how to update l4param config Object(s). .NOTES File Name : Invoke-NSUpdateL4param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l4param/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateSet('Channel', 'Vlan', 'VlanChannel', 'Mac', 'MacChannel', 'MacVlan', 'MacVlanChannel')] [string]$L2connmethod, [ValidateSet('ENABLED', 'DISABLED')] [string]$L4switch ) begin { Write-Verbose "Invoke-NSUpdateL4param: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('l2connmethod') ) { $payload.Add('l2connmethod', $l2connmethod) } if ( $PSBoundParameters.ContainsKey('l4switch') ) { $payload.Add('l4switch', $l4switch) } if ( $PSCmdlet.ShouldProcess("l4param", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type l4param -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateL4param: Finished" } } function Invoke-NSUnsetL4param { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for Layer 4 related parameter resource. .PARAMETER L2connmethod Layer 2 connection method based on the combination of channel number, MAC address and VLAN. It is tuned with l2conn param of lb vserver. If l2conn of lb vserver is ON then method specified here will be used to identify a connection in addition to the 4-tuple (<source IP>:<source port>::<destination IP>:<destination port>). Possible values = Channel, Vlan, VlanChannel, Mac, MacChannel, MacVlan, MacVlanChannel .PARAMETER L4switch In L4 switch topology, always clients and servers are on the same side. Enable l4switch to allow such connections. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetL4param An example how to unset l4param config Object(s). .NOTES File Name : Invoke-NSUnsetL4param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l4param Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$l2connmethod, [Boolean]$l4switch ) begin { Write-Verbose "Invoke-NSUnsetL4param: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('l2connmethod') ) { $payload.Add('l2connmethod', $l2connmethod) } if ( $PSBoundParameters.ContainsKey('l4switch') ) { $payload.Add('l4switch', $l4switch) } if ( $PSCmdlet.ShouldProcess("l4param", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type l4param -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetL4param: Finished" } } function Invoke-NSGetL4param { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Layer 4 related parameter resource. .PARAMETER GetAll Retrieve all l4param object(s). .PARAMETER Count If specified, the count of the l4param object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetL4param Get data. .EXAMPLE PS C:\>Invoke-NSGetL4param -GetAll Get all l4param data. .EXAMPLE PS C:\>Invoke-NSGetL4param -name <string> Get l4param object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetL4param -Filter @{ 'name'='<value>' } Get l4param data with a filter. .NOTES File Name : Invoke-NSGetL4param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/l4param/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetL4param: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all l4param objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l4param -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for l4param objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l4param -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving l4param objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l4param -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving l4param configuration for property ''" } else { Write-Verbose "Retrieving l4param configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type l4param -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetL4param: Ended" } } function Invoke-NSUpdateLacp { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Link aggregation control protocol resource. .PARAMETER Syspriority Priority number that determines which peer device of an LACP LA channel can have control over the LA channel. This parameter is globally applied to all LACP channels on the Citrix ADC. The lower the number, the higher the priority. Maximum value = 65535 .PARAMETER Ownernode The owner node in a cluster for which we want to set the lacp priority. Owner node can vary from 0 to 31. Ownernode value of 254 is used for Cluster. .PARAMETER PassThru Return details about the created lacp item. .EXAMPLE PS C:\>Invoke-NSUpdateLacp -syspriority <double> An example how to update lacp config Object(s). .NOTES File Name : Invoke-NSUpdateLacp Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/lacp/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Syspriority, [double]$Ownernode, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateLacp: Starting" } process { try { $payload = @{ syspriority = $syspriority } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSCmdlet.ShouldProcess("lacp", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type lacp -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetLacp -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateLacp: Finished" } } function Invoke-NSGetLacp { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Link aggregation control protocol resource. .PARAMETER Ownernode The owner node in a cluster for which we want to set the lacp priority. Owner node can vary from 0 to 31. Ownernode value of 254 is used for Cluster. .PARAMETER GetAll Retrieve all lacp object(s). .PARAMETER Count If specified, the count of the lacp object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetLacp Get data. .EXAMPLE PS C:\>Invoke-NSGetLacp -GetAll Get all lacp data. .EXAMPLE PS C:\>Invoke-NSGetLacp -Count Get the number of lacp objects. .EXAMPLE PS C:\>Invoke-NSGetLacp -name <string> Get lacp object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetLacp -Filter @{ 'name'='<value>' } Get lacp data with a filter. .NOTES File Name : Invoke-NSGetLacp Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/lacp/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Ownernode, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetLacp: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all lacp objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type lacp -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for lacp objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type lacp -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving lacp objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type lacp -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving lacp configuration for property 'ownernode'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type lacp -NitroPath nitro/v1/config -Resource $ownernode -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving lacp configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type lacp -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetLacp: Ended" } } function Invoke-NSAddLinkset { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for link set resource. .PARAMETER Id Unique identifier for the linkset. Must be of the form LS/x, where x can be an integer from 1 to 32. .PARAMETER PassThru Return details about the created linkset item. .EXAMPLE PS C:\>Invoke-NSAddLinkset -id <string> An example how to add linkset config Object(s). .NOTES File Name : Invoke-NSAddLinkset Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddLinkset: Starting" } process { try { $payload = @{ id = $id } if ( $PSCmdlet.ShouldProcess("linkset", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type linkset -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetLinkset -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddLinkset: Finished" } } function Invoke-NSDeleteLinkset { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for link set resource. .PARAMETER Id Unique identifier for the linkset. Must be of the form LS/x, where x can be an integer from 1 to 32. .EXAMPLE PS C:\>Invoke-NSDeleteLinkset -Id <string> An example how to delete linkset config Object(s). .NOTES File Name : Invoke-NSDeleteLinkset Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id ) begin { Write-Verbose "Invoke-NSDeleteLinkset: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type linkset -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteLinkset: Finished" } } function Invoke-NSGetLinkset { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for link set resource. .PARAMETER Id Unique identifier for the linkset. Must be of the form LS/x, where x can be an integer from 1 to 32. .PARAMETER GetAll Retrieve all linkset object(s). .PARAMETER Count If specified, the count of the linkset object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetLinkset Get data. .EXAMPLE PS C:\>Invoke-NSGetLinkset -GetAll Get all linkset data. .EXAMPLE PS C:\>Invoke-NSGetLinkset -Count Get the number of linkset objects. .EXAMPLE PS C:\>Invoke-NSGetLinkset -name <string> Get linkset object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetLinkset -Filter @{ 'name'='<value>' } Get linkset data with a filter. .NOTES File Name : Invoke-NSGetLinkset Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetLinkset: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all linkset objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for linkset objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving linkset objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving linkset configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving linkset configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetLinkset: Ended" } } function Invoke-NSGetLinksetBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to linkset. .PARAMETER Id ID of the linkset for which to display information. If an ID is not provided, the display includes information about all linksets that are available in the cluster. .PARAMETER GetAll Retrieve all linkset_binding object(s). .PARAMETER Count If specified, the count of the linkset_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetLinksetBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetLinksetBinding -GetAll Get all linkset_binding data. .EXAMPLE PS C:\>Invoke-NSGetLinksetBinding -name <string> Get linkset_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetLinksetBinding -Filter @{ 'name'='<value>' } Get linkset_binding data with a filter. .NOTES File Name : Invoke-NSGetLinksetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Id, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetLinksetBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all linkset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for linkset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving linkset_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving linkset_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving linkset_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetLinksetBinding: Ended" } } function Invoke-NSAddLinksetChannelBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to linkset. .PARAMETER Id ID of the linkset to which to bind the interfaces. .PARAMETER Ifnum The interfaces to be bound to the linkset. .PARAMETER PassThru Return details about the created linkset_channel_binding item. .EXAMPLE PS C:\>Invoke-NSAddLinksetChannelBinding -id <string> -ifnum <string> An example how to add linkset_channel_binding config Object(s). .NOTES File Name : Invoke-NSAddLinksetChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [Parameter(Mandatory)] [string]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddLinksetChannelBinding: Starting" } process { try { $payload = @{ id = $id ifnum = $ifnum } if ( $PSCmdlet.ShouldProcess("linkset_channel_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type linkset_channel_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetLinksetChannelBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddLinksetChannelBinding: Finished" } } function Invoke-NSDeleteLinksetChannelBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to linkset. .PARAMETER Id ID of the linkset to which to bind the interfaces. .PARAMETER Ifnum The interfaces to be bound to the linkset. .EXAMPLE PS C:\>Invoke-NSDeleteLinksetChannelBinding -Id <string> An example how to delete linkset_channel_binding config Object(s). .NOTES File Name : Invoke-NSDeleteLinksetChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [string]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteLinksetChannelBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type linkset_channel_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteLinksetChannelBinding: Finished" } } function Invoke-NSGetLinksetChannelBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the channel that can be bound to linkset. .PARAMETER Id ID of the linkset to which to bind the interfaces. .PARAMETER GetAll Retrieve all linkset_channel_binding object(s). .PARAMETER Count If specified, the count of the linkset_channel_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetLinksetChannelBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetLinksetChannelBinding -GetAll Get all linkset_channel_binding data. .EXAMPLE PS C:\>Invoke-NSGetLinksetChannelBinding -Count Get the number of linkset_channel_binding objects. .EXAMPLE PS C:\>Invoke-NSGetLinksetChannelBinding -name <string> Get linkset_channel_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetLinksetChannelBinding -Filter @{ 'name'='<value>' } Get linkset_channel_binding data with a filter. .NOTES File Name : Invoke-NSGetLinksetChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetLinksetChannelBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all linkset_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for linkset_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving linkset_channel_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_channel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving linkset_channel_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_channel_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving linkset_channel_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_channel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetLinksetChannelBinding: Ended" } } function Invoke-NSAddLinksetInterfaceBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to linkset. .PARAMETER Id ID of the linkset to which to bind the interfaces. .PARAMETER Ifnum The interfaces to be bound to the linkset. .PARAMETER PassThru Return details about the created linkset_interface_binding item. .EXAMPLE PS C:\>Invoke-NSAddLinksetInterfaceBinding -id <string> -ifnum <string> An example how to add linkset_interface_binding config Object(s). .NOTES File Name : Invoke-NSAddLinksetInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [Parameter(Mandatory)] [string]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddLinksetInterfaceBinding: Starting" } process { try { $payload = @{ id = $id ifnum = $ifnum } if ( $PSCmdlet.ShouldProcess("linkset_interface_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type linkset_interface_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetLinksetInterfaceBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddLinksetInterfaceBinding: Finished" } } function Invoke-NSDeleteLinksetInterfaceBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to linkset. .PARAMETER Id ID of the linkset to which to bind the interfaces. .PARAMETER Ifnum The interfaces to be bound to the linkset. .EXAMPLE PS C:\>Invoke-NSDeleteLinksetInterfaceBinding -Id <string> An example how to delete linkset_interface_binding config Object(s). .NOTES File Name : Invoke-NSDeleteLinksetInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Id, [string]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteLinksetInterfaceBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type linkset_interface_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteLinksetInterfaceBinding: Finished" } } function Invoke-NSGetLinksetInterfaceBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the interface that can be bound to linkset. .PARAMETER Id ID of the linkset to which to bind the interfaces. .PARAMETER GetAll Retrieve all linkset_interface_binding object(s). .PARAMETER Count If specified, the count of the linkset_interface_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetLinksetInterfaceBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetLinksetInterfaceBinding -GetAll Get all linkset_interface_binding data. .EXAMPLE PS C:\>Invoke-NSGetLinksetInterfaceBinding -Count Get the number of linkset_interface_binding objects. .EXAMPLE PS C:\>Invoke-NSGetLinksetInterfaceBinding -name <string> Get linkset_interface_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetLinksetInterfaceBinding -Filter @{ 'name'='<value>' } Get linkset_interface_binding data with a filter. .NOTES File Name : Invoke-NSGetLinksetInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/linkset_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetLinksetInterfaceBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all linkset_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for linkset_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving linkset_interface_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_interface_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving linkset_interface_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_interface_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving linkset_interface_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type linkset_interface_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetLinksetInterfaceBinding: Ended" } } function Invoke-NSAddMapbmr { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for MAP-T Basic Mapping rule resource. .PARAMETER Name Name for the Basic Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Basic Mapping Rule is created. .PARAMETER Ruleipv6prefix IPv6 prefix of Customer Edge(CE) device.MAP-T CE will send ipv6 packets with this ipv6 prefix as source ipv6 address prefix. .PARAMETER Psidoffset Start bit position of Port Set Identifier(PSID) value in Embedded Address (EA) bits. Maximum value = 15 .PARAMETER Eabitlength The Embedded Address (EA) bit field encodes the CE-specific IPv4 address and port information. The EA bit field, which is unique for a given Rule IPv6 prefix. Maximum value = 47 .PARAMETER Psidlength Length of Port Set IdentifierPort Set Identifier(PSID) in Embedded Address (EA) bits. Maximum value = 16 .PARAMETER PassThru Return details about the created mapbmr item. .EXAMPLE PS C:\>Invoke-NSAddMapbmr -name <string> -ruleipv6prefix <string> An example how to add mapbmr config Object(s). .NOTES File Name : Invoke-NSAddMapbmr Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapbmr/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(Mandatory)] [string]$Ruleipv6prefix, [double]$Psidoffset = '6', [double]$Eabitlength = '16', [double]$Psidlength = '8', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddMapbmr: Starting" } process { try { $payload = @{ name = $name ruleipv6prefix = $ruleipv6prefix } if ( $PSBoundParameters.ContainsKey('psidoffset') ) { $payload.Add('psidoffset', $psidoffset) } if ( $PSBoundParameters.ContainsKey('eabitlength') ) { $payload.Add('eabitlength', $eabitlength) } if ( $PSBoundParameters.ContainsKey('psidlength') ) { $payload.Add('psidlength', $psidlength) } if ( $PSCmdlet.ShouldProcess("mapbmr", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type mapbmr -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetMapbmr -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddMapbmr: Finished" } } function Invoke-NSDeleteMapbmr { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for MAP-T Basic Mapping rule resource. .PARAMETER Name Name for the Basic Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Basic Mapping Rule is created. .EXAMPLE PS C:\>Invoke-NSDeleteMapbmr -Name <string> An example how to delete mapbmr config Object(s). .NOTES File Name : Invoke-NSDeleteMapbmr Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapbmr/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteMapbmr: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type mapbmr -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteMapbmr: Finished" } } function Invoke-NSGetMapbmr { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for MAP-T Basic Mapping rule resource. .PARAMETER Name Name for the Basic Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Basic Mapping Rule is created. .PARAMETER GetAll Retrieve all mapbmr object(s). .PARAMETER Count If specified, the count of the mapbmr object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetMapbmr Get data. .EXAMPLE PS C:\>Invoke-NSGetMapbmr -GetAll Get all mapbmr data. .EXAMPLE PS C:\>Invoke-NSGetMapbmr -Count Get the number of mapbmr objects. .EXAMPLE PS C:\>Invoke-NSGetMapbmr -name <string> Get mapbmr object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetMapbmr -Filter @{ 'name'='<value>' } Get mapbmr data with a filter. .NOTES File Name : Invoke-NSGetMapbmr Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapbmr/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetMapbmr: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all mapbmr objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for mapbmr objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving mapbmr objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving mapbmr configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving mapbmr configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetMapbmr: Ended" } } function Invoke-NSGetMapbmrBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to mapbmr. .PARAMETER Name Name for the Basic Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Basic Mapping Rule is created. .PARAMETER GetAll Retrieve all mapbmr_binding object(s). .PARAMETER Count If specified, the count of the mapbmr_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBinding -GetAll Get all mapbmr_binding data. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBinding -name <string> Get mapbmr_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBinding -Filter @{ 'name'='<value>' } Get mapbmr_binding data with a filter. .NOTES File Name : Invoke-NSGetMapbmrBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapbmr_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetMapbmrBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all mapbmr_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for mapbmr_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving mapbmr_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving mapbmr_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving mapbmr_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetMapbmrBinding: Ended" } } function Invoke-NSAddMapbmrBmrv4networkBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the bmrv4network that can be bound to mapbmr. .PARAMETER Name Name for the Basic Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Basic Mapping Rule is created. .PARAMETER Network IPv4 NAT address range of Customer Edge (CE). .PARAMETER Netmask Subnet mask for the IPv4 address specified in the Network parameter. .PARAMETER PassThru Return details about the created mapbmr_bmrv4network_binding item. .EXAMPLE PS C:\>Invoke-NSAddMapbmrBmrv4networkBinding -name <string> -network <string> An example how to add mapbmr_bmrv4network_binding config Object(s). .NOTES File Name : Invoke-NSAddMapbmrBmrv4networkBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapbmr_bmrv4network_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Network, [string]$Netmask, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddMapbmrBmrv4networkBinding: Starting" } process { try { $payload = @{ name = $name network = $network } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSCmdlet.ShouldProcess("mapbmr_bmrv4network_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type mapbmr_bmrv4network_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetMapbmrBmrv4networkBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddMapbmrBmrv4networkBinding: Finished" } } function Invoke-NSDeleteMapbmrBmrv4networkBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the bmrv4network that can be bound to mapbmr. .PARAMETER Name Name for the Basic Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Basic Mapping Rule is created. .PARAMETER Network IPv4 NAT address range of Customer Edge (CE). .PARAMETER Netmask Subnet mask for the IPv4 address specified in the Network parameter. .EXAMPLE PS C:\>Invoke-NSDeleteMapbmrBmrv4networkBinding -Name <string> An example how to delete mapbmr_bmrv4network_binding config Object(s). .NOTES File Name : Invoke-NSDeleteMapbmrBmrv4networkBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapbmr_bmrv4network_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Network, [string]$Netmask ) begin { Write-Verbose "Invoke-NSDeleteMapbmrBmrv4networkBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Network') ) { $arguments.Add('network', $Network) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type mapbmr_bmrv4network_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteMapbmrBmrv4networkBinding: Finished" } } function Invoke-NSGetMapbmrBmrv4networkBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the bmrv4network that can be bound to mapbmr. .PARAMETER Name Name for the Basic Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Basic Mapping Rule is created. .PARAMETER GetAll Retrieve all mapbmr_bmrv4network_binding object(s). .PARAMETER Count If specified, the count of the mapbmr_bmrv4network_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBmrv4networkBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBmrv4networkBinding -GetAll Get all mapbmr_bmrv4network_binding data. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBmrv4networkBinding -Count Get the number of mapbmr_bmrv4network_binding objects. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBmrv4networkBinding -name <string> Get mapbmr_bmrv4network_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetMapbmrBmrv4networkBinding -Filter @{ 'name'='<value>' } Get mapbmr_bmrv4network_binding data with a filter. .NOTES File Name : Invoke-NSGetMapbmrBmrv4networkBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapbmr_bmrv4network_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetMapbmrBmrv4networkBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all mapbmr_bmrv4network_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_bmrv4network_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for mapbmr_bmrv4network_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_bmrv4network_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving mapbmr_bmrv4network_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_bmrv4network_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving mapbmr_bmrv4network_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_bmrv4network_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving mapbmr_bmrv4network_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapbmr_bmrv4network_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetMapbmrBmrv4networkBinding: Ended" } } function Invoke-NSAddMapdmr { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for MAP-T Default Mapping rule resource. .PARAMETER Name Name for the Default Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Default Mapping Rule is created. .PARAMETER Bripv6prefix IPv6 prefix of Border Relay (Citrix ADC) device.MAP-T CE will send ipv6 packets to this ipv6 prefix.The DMR IPv6 prefix length SHOULD be 64 bits long by default and in any case MUST NOT exceed 96 bits. .PARAMETER PassThru Return details about the created mapdmr item. .EXAMPLE PS C:\>Invoke-NSAddMapdmr -name <string> -bripv6prefix <string> An example how to add mapdmr config Object(s). .NOTES File Name : Invoke-NSAddMapdmr Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdmr/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(Mandatory)] [string]$Bripv6prefix, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddMapdmr: Starting" } process { try { $payload = @{ name = $name bripv6prefix = $bripv6prefix } if ( $PSCmdlet.ShouldProcess("mapdmr", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type mapdmr -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetMapdmr -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddMapdmr: Finished" } } function Invoke-NSDeleteMapdmr { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for MAP-T Default Mapping rule resource. .PARAMETER Name Name for the Default Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Default Mapping Rule is created. .EXAMPLE PS C:\>Invoke-NSDeleteMapdmr -Name <string> An example how to delete mapdmr config Object(s). .NOTES File Name : Invoke-NSDeleteMapdmr Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdmr/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteMapdmr: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type mapdmr -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteMapdmr: Finished" } } function Invoke-NSGetMapdmr { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for MAP-T Default Mapping rule resource. .PARAMETER Name Name for the Default Mapping Rule. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Default Mapping Rule is created. .PARAMETER GetAll Retrieve all mapdmr object(s). .PARAMETER Count If specified, the count of the mapdmr object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetMapdmr Get data. .EXAMPLE PS C:\>Invoke-NSGetMapdmr -GetAll Get all mapdmr data. .EXAMPLE PS C:\>Invoke-NSGetMapdmr -Count Get the number of mapdmr objects. .EXAMPLE PS C:\>Invoke-NSGetMapdmr -name <string> Get mapdmr object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetMapdmr -Filter @{ 'name'='<value>' } Get mapdmr data with a filter. .NOTES File Name : Invoke-NSGetMapdmr Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdmr/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetMapdmr: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all mapdmr objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdmr -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for mapdmr objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdmr -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving mapdmr objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdmr -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving mapdmr configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdmr -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving mapdmr configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdmr -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetMapdmr: Ended" } } function Invoke-NSAddMapdomain { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for MAP-T Map Domain resource. .PARAMETER Name Name for the MAP Domain. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Domain is created . .PARAMETER Mapdmrname Default Mapping rule name. .PARAMETER PassThru Return details about the created mapdomain item. .EXAMPLE PS C:\>Invoke-NSAddMapdomain -name <string> -mapdmrname <string> An example how to add mapdomain config Object(s). .NOTES File Name : Invoke-NSAddMapdomain Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdomain/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(Mandatory)] [string]$Mapdmrname, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddMapdomain: Starting" } process { try { $payload = @{ name = $name mapdmrname = $mapdmrname } if ( $PSCmdlet.ShouldProcess("mapdomain", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type mapdomain -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetMapdomain -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddMapdomain: Finished" } } function Invoke-NSDeleteMapdomain { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for MAP-T Map Domain resource. .PARAMETER Name Name for the MAP Domain. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Domain is created . .EXAMPLE PS C:\>Invoke-NSDeleteMapdomain -Name <string> An example how to delete mapdomain config Object(s). .NOTES File Name : Invoke-NSDeleteMapdomain Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdomain/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteMapdomain: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type mapdomain -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteMapdomain: Finished" } } function Invoke-NSGetMapdomain { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for MAP-T Map Domain resource. .PARAMETER Name Name for the MAP Domain. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Domain is created . .PARAMETER GetAll Retrieve all mapdomain object(s). .PARAMETER Count If specified, the count of the mapdomain object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetMapdomain Get data. .EXAMPLE PS C:\>Invoke-NSGetMapdomain -GetAll Get all mapdomain data. .EXAMPLE PS C:\>Invoke-NSGetMapdomain -Count Get the number of mapdomain objects. .EXAMPLE PS C:\>Invoke-NSGetMapdomain -name <string> Get mapdomain object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetMapdomain -Filter @{ 'name'='<value>' } Get mapdomain data with a filter. .NOTES File Name : Invoke-NSGetMapdomain Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdomain/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetMapdomain: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all mapdomain objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for mapdomain objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving mapdomain objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving mapdomain configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving mapdomain configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetMapdomain: Ended" } } function Invoke-NSGetMapdomainBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to mapdomain. .PARAMETER Name Name for the MAP Domain. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Domain is created . .PARAMETER GetAll Retrieve all mapdomain_binding object(s). .PARAMETER Count If specified, the count of the mapdomain_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetMapdomainBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetMapdomainBinding -GetAll Get all mapdomain_binding data. .EXAMPLE PS C:\>Invoke-NSGetMapdomainBinding -name <string> Get mapdomain_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetMapdomainBinding -Filter @{ 'name'='<value>' } Get mapdomain_binding data with a filter. .NOTES File Name : Invoke-NSGetMapdomainBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdomain_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetMapdomainBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all mapdomain_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for mapdomain_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving mapdomain_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving mapdomain_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving mapdomain_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetMapdomainBinding: Ended" } } function Invoke-NSAddMapdomainMapbmrBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the mapbmr that can be bound to mapdomain. .PARAMETER Name Name for the MAP Domain. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Domain is created . .PARAMETER Mapbmrname Basic Mapping rule name. .PARAMETER PassThru Return details about the created mapdomain_mapbmr_binding item. .EXAMPLE PS C:\>Invoke-NSAddMapdomainMapbmrBinding -name <string> -mapbmrname <string> An example how to add mapdomain_mapbmr_binding config Object(s). .NOTES File Name : Invoke-NSAddMapdomainMapbmrBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdomain_mapbmr_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(Mandatory)] [string]$Mapbmrname, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddMapdomainMapbmrBinding: Starting" } process { try { $payload = @{ name = $name mapbmrname = $mapbmrname } if ( $PSCmdlet.ShouldProcess("mapdomain_mapbmr_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type mapdomain_mapbmr_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetMapdomainMapbmrBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddMapdomainMapbmrBinding: Finished" } } function Invoke-NSDeleteMapdomainMapbmrBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the mapbmr that can be bound to mapdomain. .PARAMETER Name Name for the MAP Domain. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Domain is created . .PARAMETER Mapbmrname Basic Mapping rule name. .EXAMPLE PS C:\>Invoke-NSDeleteMapdomainMapbmrBinding -Name <string> An example how to delete mapdomain_mapbmr_binding config Object(s). .NOTES File Name : Invoke-NSDeleteMapdomainMapbmrBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdomain_mapbmr_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Mapbmrname ) begin { Write-Verbose "Invoke-NSDeleteMapdomainMapbmrBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Mapbmrname') ) { $arguments.Add('mapbmrname', $Mapbmrname) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type mapdomain_mapbmr_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteMapdomainMapbmrBinding: Finished" } } function Invoke-NSGetMapdomainMapbmrBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the mapbmr that can be bound to mapdomain. .PARAMETER Name Name for the MAP Domain. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the MAP Domain is created . .PARAMETER GetAll Retrieve all mapdomain_mapbmr_binding object(s). .PARAMETER Count If specified, the count of the mapdomain_mapbmr_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetMapdomainMapbmrBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetMapdomainMapbmrBinding -GetAll Get all mapdomain_mapbmr_binding data. .EXAMPLE PS C:\>Invoke-NSGetMapdomainMapbmrBinding -Count Get the number of mapdomain_mapbmr_binding objects. .EXAMPLE PS C:\>Invoke-NSGetMapdomainMapbmrBinding -name <string> Get mapdomain_mapbmr_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetMapdomainMapbmrBinding -Filter @{ 'name'='<value>' } Get mapdomain_mapbmr_binding data with a filter. .NOTES File Name : Invoke-NSGetMapdomainMapbmrBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/mapdomain_mapbmr_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [ValidateLength(1, 127)] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetMapdomainMapbmrBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all mapdomain_mapbmr_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_mapbmr_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for mapdomain_mapbmr_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_mapbmr_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving mapdomain_mapbmr_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_mapbmr_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving mapdomain_mapbmr_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_mapbmr_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving mapdomain_mapbmr_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type mapdomain_mapbmr_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetMapdomainMapbmrBinding: Ended" } } function Invoke-NSAddNat64 { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for nat64 config resource. .PARAMETER Name Name for the NAT64 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the NAT64 rule. .PARAMETER Acl6name Name of any configured ACL6 whose action is ALLOW. IPv6 Packets matching the condition of this ACL6 rule and destination IP address of these packets matching the NAT64 IPv6 prefix are considered for NAT64 translation. .PARAMETER Netprofile Name of the configured netprofile. The Citrix ADC selects one of the IP address in the netprofile as the source IP address of the translated IPv4 packet to be sent to the IPv4 server. .PARAMETER PassThru Return details about the created nat64 item. .EXAMPLE PS C:\>Invoke-NSAddNat64 -name <string> -acl6name <string> An example how to add nat64 config Object(s). .NOTES File Name : Invoke-NSAddNat64 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nat64/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Acl6name, [ValidateLength(1, 127)] [string]$Netprofile, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNat64: Starting" } process { try { $payload = @{ name = $name acl6name = $acl6name } if ( $PSBoundParameters.ContainsKey('netprofile') ) { $payload.Add('netprofile', $netprofile) } if ( $PSCmdlet.ShouldProcess("nat64", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type nat64 -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNat64 -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNat64: Finished" } } function Invoke-NSUpdateNat64 { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for nat64 config resource. .PARAMETER Name Name for the NAT64 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the NAT64 rule. .PARAMETER Acl6name Name of any configured ACL6 whose action is ALLOW. IPv6 Packets matching the condition of this ACL6 rule and destination IP address of these packets matching the NAT64 IPv6 prefix are considered for NAT64 translation. .PARAMETER Netprofile Name of the configured netprofile. The Citrix ADC selects one of the IP address in the netprofile as the source IP address of the translated IPv4 packet to be sent to the IPv4 server. .PARAMETER PassThru Return details about the created nat64 item. .EXAMPLE PS C:\>Invoke-NSUpdateNat64 -name <string> An example how to update nat64 config Object(s). .NOTES File Name : Invoke-NSUpdateNat64 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nat64/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Acl6name, [ValidateLength(1, 127)] [string]$Netprofile, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateNat64: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('acl6name') ) { $payload.Add('acl6name', $acl6name) } if ( $PSBoundParameters.ContainsKey('netprofile') ) { $payload.Add('netprofile', $netprofile) } if ( $PSCmdlet.ShouldProcess("nat64", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type nat64 -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNat64 -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateNat64: Finished" } } function Invoke-NSUnsetNat64 { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for nat64 config resource. .PARAMETER Name Name for the NAT64 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the NAT64 rule. .PARAMETER Netprofile Name of the configured netprofile. The Citrix ADC selects one of the IP address in the netprofile as the source IP address of the translated IPv4 packet to be sent to the IPv4 server. .EXAMPLE PS C:\>Invoke-NSUnsetNat64 -name <string> An example how to unset nat64 config Object(s). .NOTES File Name : Invoke-NSUnsetNat64 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nat64 Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Boolean]$netprofile ) begin { Write-Verbose "Invoke-NSUnsetNat64: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('netprofile') ) { $payload.Add('netprofile', $netprofile) } if ( $PSCmdlet.ShouldProcess("$name", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type nat64 -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetNat64: Finished" } } function Invoke-NSDeleteNat64 { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for nat64 config resource. .PARAMETER Name Name for the NAT64 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the NAT64 rule. .EXAMPLE PS C:\>Invoke-NSDeleteNat64 -Name <string> An example how to delete nat64 config Object(s). .NOTES File Name : Invoke-NSDeleteNat64 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nat64/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteNat64: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type nat64 -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNat64: Finished" } } function Invoke-NSGetNat64 { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for nat64 config resource. .PARAMETER Name Name for the NAT64 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the NAT64 rule. .PARAMETER GetAll Retrieve all nat64 object(s). .PARAMETER Count If specified, the count of the nat64 object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNat64 Get data. .EXAMPLE PS C:\>Invoke-NSGetNat64 -GetAll Get all nat64 data. .EXAMPLE PS C:\>Invoke-NSGetNat64 -Count Get the number of nat64 objects. .EXAMPLE PS C:\>Invoke-NSGetNat64 -name <string> Get nat64 object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNat64 -Filter @{ 'name'='<value>' } Get nat64 data with a filter. .NOTES File Name : Invoke-NSGetNat64 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nat64/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetNat64: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all nat64 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for nat64 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving nat64 objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64 -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving nat64 configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64 -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving nat64 configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64 -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNat64: Ended" } } function Invoke-NSUpdateNat64param { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for NAT64 parameter resource. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Nat64ignoretos Ignore TOS. Possible values = YES, NO .PARAMETER Nat64zerochecksum Calculate checksum for UDP packets with zero checksum. Possible values = ENABLED, DISABLED .PARAMETER Nat64v6mtu MTU setting for the IPv6 side. If the incoming IPv4 packet greater than this, either fragment or send icmp need fragmentation error. Maximum value = 9216 .PARAMETER Nat64fragheader When disabled, translator will not insert IPv6 fragmentation header for non fragmented IPv4 packets. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created nat64param item. .EXAMPLE PS C:\>Invoke-NSUpdateNat64param An example how to update nat64param config Object(s). .NOTES File Name : Invoke-NSUpdateNat64param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nat64param/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Td, [ValidateSet('YES', 'NO')] [string]$Nat64ignoretos, [ValidateSet('ENABLED', 'DISABLED')] [string]$Nat64zerochecksum, [double]$Nat64v6mtu, [ValidateSet('ENABLED', 'DISABLED')] [string]$Nat64fragheader, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateNat64param: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('nat64ignoretos') ) { $payload.Add('nat64ignoretos', $nat64ignoretos) } if ( $PSBoundParameters.ContainsKey('nat64zerochecksum') ) { $payload.Add('nat64zerochecksum', $nat64zerochecksum) } if ( $PSBoundParameters.ContainsKey('nat64v6mtu') ) { $payload.Add('nat64v6mtu', $nat64v6mtu) } if ( $PSBoundParameters.ContainsKey('nat64fragheader') ) { $payload.Add('nat64fragheader', $nat64fragheader) } if ( $PSCmdlet.ShouldProcess("nat64param", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type nat64param -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNat64param -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateNat64param: Finished" } } function Invoke-NSUnsetNat64param { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for NAT64 parameter resource. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Nat64ignoretos Ignore TOS. Possible values = YES, NO .PARAMETER Nat64zerochecksum Calculate checksum for UDP packets with zero checksum. Possible values = ENABLED, DISABLED .PARAMETER Nat64v6mtu MTU setting for the IPv6 side. If the incoming IPv4 packet greater than this, either fragment or send icmp need fragmentation error. Maximum value = 9216 .PARAMETER Nat64fragheader When disabled, translator will not insert IPv6 fragmentation header for non fragmented IPv4 packets. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetNat64param An example how to unset nat64param config Object(s). .NOTES File Name : Invoke-NSUnsetNat64param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nat64param Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$td, [Boolean]$nat64ignoretos, [Boolean]$nat64zerochecksum, [Boolean]$nat64v6mtu, [Boolean]$nat64fragheader ) begin { Write-Verbose "Invoke-NSUnsetNat64param: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('nat64ignoretos') ) { $payload.Add('nat64ignoretos', $nat64ignoretos) } if ( $PSBoundParameters.ContainsKey('nat64zerochecksum') ) { $payload.Add('nat64zerochecksum', $nat64zerochecksum) } if ( $PSBoundParameters.ContainsKey('nat64v6mtu') ) { $payload.Add('nat64v6mtu', $nat64v6mtu) } if ( $PSBoundParameters.ContainsKey('nat64fragheader') ) { $payload.Add('nat64fragheader', $nat64fragheader) } if ( $PSCmdlet.ShouldProcess("nat64param", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type nat64param -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetNat64param: Finished" } } function Invoke-NSGetNat64param { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for NAT64 parameter resource. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER GetAll Retrieve all nat64param object(s). .PARAMETER Count If specified, the count of the nat64param object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNat64param Get data. .EXAMPLE PS C:\>Invoke-NSGetNat64param -GetAll Get all nat64param data. .EXAMPLE PS C:\>Invoke-NSGetNat64param -Count Get the number of nat64param objects. .EXAMPLE PS C:\>Invoke-NSGetNat64param -name <string> Get nat64param object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNat64param -Filter @{ 'name'='<value>' } Get nat64param data with a filter. .NOTES File Name : Invoke-NSGetNat64param Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nat64param/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Td, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetNat64param: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all nat64param objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64param -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for nat64param objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64param -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving nat64param objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64param -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving nat64param configuration for property 'td'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64param -NitroPath nitro/v1/config -Resource $td -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving nat64param configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nat64param -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNat64param: Ended" } } function Invoke-NSAddNd6 { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for nd6 resource. .PARAMETER Neighbor Link-local IPv6 address of the adjacent network device to add to the ND6 table. .PARAMETER Mac MAC address of the adjacent network device. .PARAMETER Ifnum Interface through which the adjacent network device is available, specified in slot/port notation (for example, 1/3). Use spaces to separate multiple entries. .PARAMETER Vlan Integer value that uniquely identifies the VLAN on which the adjacent network device exists. Maximum value = 4094 .PARAMETER Vxlan ID of the VXLAN on which the IPv6 address of this ND6 entry is reachable. Maximum value = 16777215 .PARAMETER Vtep IP address of the VXLAN tunnel endpoint (VTEP) through which the IPv6 address of this ND6 entry is reachable. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .EXAMPLE PS C:\>Invoke-NSAddNd6 -neighbor <string> -mac <string> An example how to add nd6 config Object(s). .NOTES File Name : Invoke-NSAddNd6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Neighbor, [Parameter(Mandatory)] [string]$Mac, [string]$Ifnum, [int]$Vlan, [double]$Vxlan, [ValidateScript({ $_.Length -gt 1 })] [string]$Vtep, [double]$Td ) begin { Write-Verbose "Invoke-NSAddNd6: Starting" } process { try { $payload = @{ neighbor = $neighbor mac = $mac } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('vxlan') ) { $payload.Add('vxlan', $vxlan) } if ( $PSBoundParameters.ContainsKey('vtep') ) { $payload.Add('vtep', $vtep) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSCmdlet.ShouldProcess("nd6", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type nd6 -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNd6: Finished" } } function Invoke-NSClearNd6 { <# .SYNOPSIS Clear Networking commands. config Object. .DESCRIPTION Configuration for nd6 resource. .EXAMPLE PS C:\>Invoke-NSClearNd6 An example how to clear nd6 config Object(s). .NOTES File Name : Invoke-NSClearNd6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession) ) begin { Write-Verbose "Invoke-NSClearNd6: Starting" } process { try { $payload = @{ } if ( $PSCmdlet.ShouldProcess($Name, "Clear Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type nd6 -Action clear -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSClearNd6: Finished" } } function Invoke-NSDeleteNd6 { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for nd6 resource. .PARAMETER Neighbor Link-local IPv6 address of the adjacent network device to add to the ND6 table. .PARAMETER Vlan Integer value that uniquely identifies the VLAN on which the adjacent network device exists. Maximum value = 4094 .PARAMETER Vxlan ID of the VXLAN on which the IPv6 address of this ND6 entry is reachable. Maximum value = 16777215 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .EXAMPLE PS C:\>Invoke-NSDeleteNd6 -Neighbor <string> An example how to delete nd6 config Object(s). .NOTES File Name : Invoke-NSDeleteNd6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Neighbor, [int]$Vlan, [double]$Vxlan, [double]$Td ) begin { Write-Verbose "Invoke-NSDeleteNd6: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Vlan') ) { $arguments.Add('vlan', $Vlan) } if ( $PSBoundParameters.ContainsKey('Vxlan') ) { $arguments.Add('vxlan', $Vxlan) } if ( $PSBoundParameters.ContainsKey('Td') ) { $arguments.Add('td', $Td) } if ( $PSCmdlet.ShouldProcess("$neighbor", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type nd6 -NitroPath nitro/v1/config -Resource $neighbor -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNd6: Finished" } } function Invoke-NSGetNd6 { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for nd6 resource. .PARAMETER Neighbor Link-local IPv6 address of the adjacent network device to add to the ND6 table. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Nodeid Unique number that identifies the cluster node. Maximum value = 31 .PARAMETER GetAll Retrieve all nd6 object(s). .PARAMETER Count If specified, the count of the nd6 object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNd6 Get data. .EXAMPLE PS C:\>Invoke-NSGetNd6 -GetAll Get all nd6 data. .EXAMPLE PS C:\>Invoke-NSGetNd6 -Count Get the number of nd6 objects. .EXAMPLE PS C:\>Invoke-NSGetNd6 -name <string> Get nd6 object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNd6 -Filter @{ 'name'='<value>' } Get nd6 data with a filter. .NOTES File Name : Invoke-NSGetNd6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByArgument')] [string]$Neighbor, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Td, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Nodeid, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetNd6: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all nd6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for nd6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving nd6 objects by arguments" $arguments = @{ } if ( $PSBoundParameters.ContainsKey('neighbor') ) { $arguments.Add('neighbor', $neighbor) } if ( $PSBoundParameters.ContainsKey('td') ) { $arguments.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('nodeid') ) { $arguments.Add('nodeid', $nodeid) } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6 -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving nd6 configuration for property ''" } else { Write-Verbose "Retrieving nd6 configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6 -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNd6: Ended" } } function Invoke-NSUpdateNd6ravariables { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for nd6 Router Advertisment configuration variables resource. .PARAMETER Vlan The VLAN number. Maximum value = 4094 .PARAMETER Ceaserouteradv Cease router advertisements on this vlan. Possible values = YES, NO .PARAMETER Sendrouteradv whether the router sends periodic RAs and responds to Router Solicitations. Possible values = YES, NO .PARAMETER Srclinklayeraddroption Include source link layer address option in RA messages. Possible values = YES, NO .PARAMETER Onlyunicastrtadvresponse Send only Unicast Router Advertisements in respond to Router Solicitations. Possible values = YES, NO .PARAMETER Managedaddrconfig Value to be placed in the Managed address configuration flag field. Possible values = YES, NO .PARAMETER Otheraddrconfig Value to be placed in the Other configuration flag field. Possible values = YES, NO .PARAMETER Currhoplimit Current Hop limit. Maximum value = 255 .PARAMETER Maxrtadvinterval Maximum time allowed between unsolicited multicast RAs, in seconds. Maximum value = 1800 .PARAMETER Minrtadvinterval Minimum time interval between RA messages, in seconds. Maximum value = 1350 .PARAMETER Linkmtu The Link MTU. Maximum value = 1500 .PARAMETER Reachabletime Reachable time, in milliseconds. Maximum value = 3600000 .PARAMETER Retranstime Retransmission time, in milliseconds. .PARAMETER Defaultlifetime Default life time, in seconds. Maximum value = 9000 .PARAMETER PassThru Return details about the created nd6ravariables item. .EXAMPLE PS C:\>Invoke-NSUpdateNd6ravariables -vlan <double> An example how to update nd6ravariables config Object(s). .NOTES File Name : Invoke-NSUpdateNd6ravariables Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6ravariables/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Vlan, [ValidateSet('YES', 'NO')] [string]$Ceaserouteradv, [ValidateSet('YES', 'NO')] [string]$Sendrouteradv, [ValidateSet('YES', 'NO')] [string]$Srclinklayeraddroption, [ValidateSet('YES', 'NO')] [string]$Onlyunicastrtadvresponse, [ValidateSet('YES', 'NO')] [string]$Managedaddrconfig, [ValidateSet('YES', 'NO')] [string]$Otheraddrconfig, [double]$Currhoplimit, [double]$Maxrtadvinterval, [double]$Minrtadvinterval, [double]$Linkmtu, [double]$Reachabletime, [double]$Retranstime, [int]$Defaultlifetime, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateNd6ravariables: Starting" } process { try { $payload = @{ vlan = $vlan } if ( $PSBoundParameters.ContainsKey('ceaserouteradv') ) { $payload.Add('ceaserouteradv', $ceaserouteradv) } if ( $PSBoundParameters.ContainsKey('sendrouteradv') ) { $payload.Add('sendrouteradv', $sendrouteradv) } if ( $PSBoundParameters.ContainsKey('srclinklayeraddroption') ) { $payload.Add('srclinklayeraddroption', $srclinklayeraddroption) } if ( $PSBoundParameters.ContainsKey('onlyunicastrtadvresponse') ) { $payload.Add('onlyunicastrtadvresponse', $onlyunicastrtadvresponse) } if ( $PSBoundParameters.ContainsKey('managedaddrconfig') ) { $payload.Add('managedaddrconfig', $managedaddrconfig) } if ( $PSBoundParameters.ContainsKey('otheraddrconfig') ) { $payload.Add('otheraddrconfig', $otheraddrconfig) } if ( $PSBoundParameters.ContainsKey('currhoplimit') ) { $payload.Add('currhoplimit', $currhoplimit) } if ( $PSBoundParameters.ContainsKey('maxrtadvinterval') ) { $payload.Add('maxrtadvinterval', $maxrtadvinterval) } if ( $PSBoundParameters.ContainsKey('minrtadvinterval') ) { $payload.Add('minrtadvinterval', $minrtadvinterval) } if ( $PSBoundParameters.ContainsKey('linkmtu') ) { $payload.Add('linkmtu', $linkmtu) } if ( $PSBoundParameters.ContainsKey('reachabletime') ) { $payload.Add('reachabletime', $reachabletime) } if ( $PSBoundParameters.ContainsKey('retranstime') ) { $payload.Add('retranstime', $retranstime) } if ( $PSBoundParameters.ContainsKey('defaultlifetime') ) { $payload.Add('defaultlifetime', $defaultlifetime) } if ( $PSCmdlet.ShouldProcess("nd6ravariables", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type nd6ravariables -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNd6ravariables -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateNd6ravariables: Finished" } } function Invoke-NSUnsetNd6ravariables { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for nd6 Router Advertisment configuration variables resource. .PARAMETER Vlan The VLAN number. Maximum value = 4094 .PARAMETER Ceaserouteradv Cease router advertisements on this vlan. Possible values = YES, NO .PARAMETER Sendrouteradv whether the router sends periodic RAs and responds to Router Solicitations. Possible values = YES, NO .PARAMETER Srclinklayeraddroption Include source link layer address option in RA messages. Possible values = YES, NO .PARAMETER Onlyunicastrtadvresponse Send only Unicast Router Advertisements in respond to Router Solicitations. Possible values = YES, NO .PARAMETER Managedaddrconfig Value to be placed in the Managed address configuration flag field. Possible values = YES, NO .PARAMETER Otheraddrconfig Value to be placed in the Other configuration flag field. Possible values = YES, NO .PARAMETER Currhoplimit Current Hop limit. Maximum value = 255 .PARAMETER Maxrtadvinterval Maximum time allowed between unsolicited multicast RAs, in seconds. Maximum value = 1800 .PARAMETER Minrtadvinterval Minimum time interval between RA messages, in seconds. Maximum value = 1350 .PARAMETER Linkmtu The Link MTU. Maximum value = 1500 .PARAMETER Reachabletime Reachable time, in milliseconds. Maximum value = 3600000 .PARAMETER Retranstime Retransmission time, in milliseconds. .PARAMETER Defaultlifetime Default life time, in seconds. Maximum value = 9000 .EXAMPLE PS C:\>Invoke-NSUnsetNd6ravariables -vlan <double> An example how to unset nd6ravariables config Object(s). .NOTES File Name : Invoke-NSUnsetNd6ravariables Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6ravariables Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Vlan, [Boolean]$ceaserouteradv, [Boolean]$sendrouteradv, [Boolean]$srclinklayeraddroption, [Boolean]$onlyunicastrtadvresponse, [Boolean]$managedaddrconfig, [Boolean]$otheraddrconfig, [Boolean]$currhoplimit, [Boolean]$maxrtadvinterval, [Boolean]$minrtadvinterval, [Boolean]$linkmtu, [Boolean]$reachabletime, [Boolean]$retranstime, [Boolean]$defaultlifetime ) begin { Write-Verbose "Invoke-NSUnsetNd6ravariables: Starting" } process { try { $payload = @{ vlan = $vlan } if ( $PSBoundParameters.ContainsKey('ceaserouteradv') ) { $payload.Add('ceaserouteradv', $ceaserouteradv) } if ( $PSBoundParameters.ContainsKey('sendrouteradv') ) { $payload.Add('sendrouteradv', $sendrouteradv) } if ( $PSBoundParameters.ContainsKey('srclinklayeraddroption') ) { $payload.Add('srclinklayeraddroption', $srclinklayeraddroption) } if ( $PSBoundParameters.ContainsKey('onlyunicastrtadvresponse') ) { $payload.Add('onlyunicastrtadvresponse', $onlyunicastrtadvresponse) } if ( $PSBoundParameters.ContainsKey('managedaddrconfig') ) { $payload.Add('managedaddrconfig', $managedaddrconfig) } if ( $PSBoundParameters.ContainsKey('otheraddrconfig') ) { $payload.Add('otheraddrconfig', $otheraddrconfig) } if ( $PSBoundParameters.ContainsKey('currhoplimit') ) { $payload.Add('currhoplimit', $currhoplimit) } if ( $PSBoundParameters.ContainsKey('maxrtadvinterval') ) { $payload.Add('maxrtadvinterval', $maxrtadvinterval) } if ( $PSBoundParameters.ContainsKey('minrtadvinterval') ) { $payload.Add('minrtadvinterval', $minrtadvinterval) } if ( $PSBoundParameters.ContainsKey('linkmtu') ) { $payload.Add('linkmtu', $linkmtu) } if ( $PSBoundParameters.ContainsKey('reachabletime') ) { $payload.Add('reachabletime', $reachabletime) } if ( $PSBoundParameters.ContainsKey('retranstime') ) { $payload.Add('retranstime', $retranstime) } if ( $PSBoundParameters.ContainsKey('defaultlifetime') ) { $payload.Add('defaultlifetime', $defaultlifetime) } if ( $PSCmdlet.ShouldProcess("$vlan", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type nd6ravariables -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetNd6ravariables: Finished" } } function Invoke-NSGetNd6ravariables { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for nd6 Router Advertisment configuration variables resource. .PARAMETER Vlan The VLAN number. Maximum value = 4094 .PARAMETER GetAll Retrieve all nd6ravariables object(s). .PARAMETER Count If specified, the count of the nd6ravariables object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariables Get data. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariables -GetAll Get all nd6ravariables data. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariables -Count Get the number of nd6ravariables objects. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariables -name <string> Get nd6ravariables object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariables -Filter @{ 'name'='<value>' } Get nd6ravariables data with a filter. .NOTES File Name : Invoke-NSGetNd6ravariables Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6ravariables/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Vlan, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetNd6ravariables: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all nd6ravariables objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for nd6ravariables objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving nd6ravariables objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving nd6ravariables configuration for property 'vlan'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables -NitroPath nitro/v1/config -Resource $vlan -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving nd6ravariables configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNd6ravariables: Ended" } } function Invoke-NSGetNd6ravariablesBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to nd6ravariables. .PARAMETER Vlan The VLAN number. Maximum value = 4094 .PARAMETER GetAll Retrieve all nd6ravariables_binding object(s). .PARAMETER Count If specified, the count of the nd6ravariables_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesBinding -GetAll Get all nd6ravariables_binding data. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesBinding -name <string> Get nd6ravariables_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesBinding -Filter @{ 'name'='<value>' } Get nd6ravariables_binding data with a filter. .NOTES File Name : Invoke-NSGetNd6ravariablesBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6ravariables_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Vlan, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNd6ravariablesBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all nd6ravariables_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for nd6ravariables_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving nd6ravariables_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving nd6ravariables_binding configuration for property 'vlan'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_binding -NitroPath nitro/v1/config -Resource $vlan -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving nd6ravariables_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNd6ravariablesBinding: Ended" } } function Invoke-NSAddNd6ravariablesOnlinkipv6prefixBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the onlinkipv6prefix that can be bound to nd6ravariables. .PARAMETER Vlan The VLAN number. Maximum value = 4094 .PARAMETER Ipv6prefix Onlink prefixes for RA messages. .PARAMETER PassThru Return details about the created nd6ravariables_onlinkipv6prefix_binding item. .EXAMPLE PS C:\>Invoke-NSAddNd6ravariablesOnlinkipv6prefixBinding -vlan <double> -ipv6prefix <string> An example how to add nd6ravariables_onlinkipv6prefix_binding config Object(s). .NOTES File Name : Invoke-NSAddNd6ravariablesOnlinkipv6prefixBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6ravariables_onlinkipv6prefix_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Vlan, [Parameter(Mandatory)] [string]$Ipv6prefix, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNd6ravariablesOnlinkipv6prefixBinding: Starting" } process { try { $payload = @{ vlan = $vlan ipv6prefix = $ipv6prefix } if ( $PSCmdlet.ShouldProcess("nd6ravariables_onlinkipv6prefix_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type nd6ravariables_onlinkipv6prefix_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNd6ravariablesOnlinkipv6prefixBinding: Finished" } } function Invoke-NSDeleteNd6ravariablesOnlinkipv6prefixBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the onlinkipv6prefix that can be bound to nd6ravariables. .PARAMETER Vlan The VLAN number. Maximum value = 4094 .PARAMETER Ipv6prefix Onlink prefixes for RA messages. .EXAMPLE PS C:\>Invoke-NSDeleteNd6ravariablesOnlinkipv6prefixBinding -Vlan <double> An example how to delete nd6ravariables_onlinkipv6prefix_binding config Object(s). .NOTES File Name : Invoke-NSDeleteNd6ravariablesOnlinkipv6prefixBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6ravariables_onlinkipv6prefix_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Vlan, [string]$Ipv6prefix ) begin { Write-Verbose "Invoke-NSDeleteNd6ravariablesOnlinkipv6prefixBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipv6prefix') ) { $arguments.Add('ipv6prefix', $Ipv6prefix) } if ( $PSCmdlet.ShouldProcess("$vlan", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type nd6ravariables_onlinkipv6prefix_binding -NitroPath nitro/v1/config -Resource $vlan -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNd6ravariablesOnlinkipv6prefixBinding: Finished" } } function Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the onlinkipv6prefix that can be bound to nd6ravariables. .PARAMETER Vlan The VLAN number. Maximum value = 4094 .PARAMETER GetAll Retrieve all nd6ravariables_onlinkipv6prefix_binding object(s). .PARAMETER Count If specified, the count of the nd6ravariables_onlinkipv6prefix_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding -GetAll Get all nd6ravariables_onlinkipv6prefix_binding data. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding -Count Get the number of nd6ravariables_onlinkipv6prefix_binding objects. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding -name <string> Get nd6ravariables_onlinkipv6prefix_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding -Filter @{ 'name'='<value>' } Get nd6ravariables_onlinkipv6prefix_binding data with a filter. .NOTES File Name : Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/nd6ravariables_onlinkipv6prefix_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Vlan, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all nd6ravariables_onlinkipv6prefix_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_onlinkipv6prefix_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for nd6ravariables_onlinkipv6prefix_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_onlinkipv6prefix_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving nd6ravariables_onlinkipv6prefix_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_onlinkipv6prefix_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving nd6ravariables_onlinkipv6prefix_binding configuration for property 'vlan'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_onlinkipv6prefix_binding -NitroPath nitro/v1/config -Resource $vlan -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving nd6ravariables_onlinkipv6prefix_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type nd6ravariables_onlinkipv6prefix_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNd6ravariablesOnlinkipv6prefixBinding: Ended" } } function Invoke-NSAddNetbridge { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for network bridge resource. .PARAMETER Name The name of the network bridge. .PARAMETER Vxlanvlanmap The vlan to vxlan mapping to be applied to this netbridge. .PARAMETER PassThru Return details about the created netbridge item. .EXAMPLE PS C:\>Invoke-NSAddNetbridge -name <string> An example how to add netbridge config Object(s). .NOTES File Name : Invoke-NSAddNetbridge Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Vxlanvlanmap, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNetbridge: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('vxlanvlanmap') ) { $payload.Add('vxlanvlanmap', $vxlanvlanmap) } if ( $PSCmdlet.ShouldProcess("netbridge", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type netbridge -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetbridge -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNetbridge: Finished" } } function Invoke-NSUpdateNetbridge { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for network bridge resource. .PARAMETER Name The name of the network bridge. .PARAMETER Vxlanvlanmap The vlan to vxlan mapping to be applied to this netbridge. .PARAMETER PassThru Return details about the created netbridge item. .EXAMPLE PS C:\>Invoke-NSUpdateNetbridge -name <string> An example how to update netbridge config Object(s). .NOTES File Name : Invoke-NSUpdateNetbridge Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Vxlanvlanmap, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateNetbridge: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('vxlanvlanmap') ) { $payload.Add('vxlanvlanmap', $vxlanvlanmap) } if ( $PSCmdlet.ShouldProcess("netbridge", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type netbridge -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetbridge -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateNetbridge: Finished" } } function Invoke-NSUnsetNetbridge { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for network bridge resource. .PARAMETER Name The name of the network bridge. .PARAMETER Vxlanvlanmap The vlan to vxlan mapping to be applied to this netbridge. .EXAMPLE PS C:\>Invoke-NSUnsetNetbridge -name <string> An example how to unset netbridge config Object(s). .NOTES File Name : Invoke-NSUnsetNetbridge Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Name, [Boolean]$vxlanvlanmap ) begin { Write-Verbose "Invoke-NSUnsetNetbridge: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('vxlanvlanmap') ) { $payload.Add('vxlanvlanmap', $vxlanvlanmap) } if ( $PSCmdlet.ShouldProcess("$name", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type netbridge -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetNetbridge: Finished" } } function Invoke-NSDeleteNetbridge { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for network bridge resource. .PARAMETER Name The name of the network bridge. .EXAMPLE PS C:\>Invoke-NSDeleteNetbridge -Name <string> An example how to delete netbridge config Object(s). .NOTES File Name : Invoke-NSDeleteNetbridge Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteNetbridge: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type netbridge -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNetbridge: Finished" } } function Invoke-NSGetNetbridge { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for network bridge resource. .PARAMETER Name The name of the network bridge. .PARAMETER GetAll Retrieve all netbridge object(s). .PARAMETER Count If specified, the count of the netbridge object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetbridge Get data. .EXAMPLE PS C:\>Invoke-NSGetNetbridge -GetAll Get all netbridge data. .EXAMPLE PS C:\>Invoke-NSGetNetbridge -Count Get the number of netbridge objects. .EXAMPLE PS C:\>Invoke-NSGetNetbridge -name <string> Get netbridge object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetbridge -Filter @{ 'name'='<value>' } Get netbridge data with a filter. .NOTES File Name : Invoke-NSGetNetbridge Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetNetbridge: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all netbridge objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netbridge objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netbridge objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netbridge configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netbridge configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetbridge: Ended" } } function Invoke-NSGetNetbridgeBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER GetAll Retrieve all netbridge_binding object(s). .PARAMETER Count If specified, the count of the netbridge_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeBinding -GetAll Get all netbridge_binding data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeBinding -name <string> Get netbridge_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeBinding -Filter @{ 'name'='<value>' } Get netbridge_binding data with a filter. .NOTES File Name : Invoke-NSGetNetbridgeBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNetbridgeBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all netbridge_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netbridge_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netbridge_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netbridge_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netbridge_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetbridgeBinding: Ended" } } function Invoke-NSAddNetbridgeIptunnelBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the iptunnel that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER Tunnel The name of the tunnel that is a part of this bridge. .PARAMETER PassThru Return details about the created netbridge_iptunnel_binding item. .EXAMPLE PS C:\>Invoke-NSAddNetbridgeIptunnelBinding -name <string> An example how to add netbridge_iptunnel_binding config Object(s). .NOTES File Name : Invoke-NSAddNetbridgeIptunnelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_iptunnel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Tunnel, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNetbridgeIptunnelBinding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('tunnel') ) { $payload.Add('tunnel', $tunnel) } if ( $PSCmdlet.ShouldProcess("netbridge_iptunnel_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type netbridge_iptunnel_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetbridgeIptunnelBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNetbridgeIptunnelBinding: Finished" } } function Invoke-NSDeleteNetbridgeIptunnelBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the iptunnel that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER Tunnel The name of the tunnel that is a part of this bridge. .EXAMPLE PS C:\>Invoke-NSDeleteNetbridgeIptunnelBinding -Name <string> An example how to delete netbridge_iptunnel_binding config Object(s). .NOTES File Name : Invoke-NSDeleteNetbridgeIptunnelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_iptunnel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Tunnel ) begin { Write-Verbose "Invoke-NSDeleteNetbridgeIptunnelBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Tunnel') ) { $arguments.Add('tunnel', $Tunnel) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type netbridge_iptunnel_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNetbridgeIptunnelBinding: Finished" } } function Invoke-NSGetNetbridgeIptunnelBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the iptunnel that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER GetAll Retrieve all netbridge_iptunnel_binding object(s). .PARAMETER Count If specified, the count of the netbridge_iptunnel_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeIptunnelBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeIptunnelBinding -GetAll Get all netbridge_iptunnel_binding data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeIptunnelBinding -Count Get the number of netbridge_iptunnel_binding objects. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeIptunnelBinding -name <string> Get netbridge_iptunnel_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeIptunnelBinding -Filter @{ 'name'='<value>' } Get netbridge_iptunnel_binding data with a filter. .NOTES File Name : Invoke-NSGetNetbridgeIptunnelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_iptunnel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNetbridgeIptunnelBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all netbridge_iptunnel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_iptunnel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netbridge_iptunnel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_iptunnel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netbridge_iptunnel_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_iptunnel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netbridge_iptunnel_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_iptunnel_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netbridge_iptunnel_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_iptunnel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetbridgeIptunnelBinding: Ended" } } function Invoke-NSAddNetbridgeNsip6Binding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER Ipaddress The subnet that is extended by this network bridge. .PARAMETER Netmask The network mask for the subnet. .PARAMETER PassThru Return details about the created netbridge_nsip6_binding item. .EXAMPLE PS C:\>Invoke-NSAddNetbridgeNsip6Binding -name <string> An example how to add netbridge_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSAddNetbridgeNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Ipaddress, [string]$Netmask, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNetbridgeNsip6Binding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSCmdlet.ShouldProcess("netbridge_nsip6_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type netbridge_nsip6_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetbridgeNsip6Binding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNetbridgeNsip6Binding: Finished" } } function Invoke-NSDeleteNetbridgeNsip6Binding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER Ipaddress The subnet that is extended by this network bridge. .PARAMETER Netmask The network mask for the subnet. .EXAMPLE PS C:\>Invoke-NSDeleteNetbridgeNsip6Binding -Name <string> An example how to delete netbridge_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSDeleteNetbridgeNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Ipaddress, [string]$Netmask ) begin { Write-Verbose "Invoke-NSDeleteNetbridgeNsip6Binding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type netbridge_nsip6_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNetbridgeNsip6Binding: Finished" } } function Invoke-NSGetNetbridgeNsip6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip6 that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER GetAll Retrieve all netbridge_nsip6_binding object(s). .PARAMETER Count If specified, the count of the netbridge_nsip6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsip6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsip6Binding -GetAll Get all netbridge_nsip6_binding data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsip6Binding -Count Get the number of netbridge_nsip6_binding objects. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsip6Binding -name <string> Get netbridge_nsip6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsip6Binding -Filter @{ 'name'='<value>' } Get netbridge_nsip6_binding data with a filter. .NOTES File Name : Invoke-NSGetNetbridgeNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNetbridgeNsip6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all netbridge_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netbridge_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netbridge_nsip6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netbridge_nsip6_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip6_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netbridge_nsip6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetbridgeNsip6Binding: Ended" } } function Invoke-NSAddNetbridgeNsipBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER Ipaddress The subnet that is extended by this network bridge. .PARAMETER Netmask The network mask for the subnet. .PARAMETER PassThru Return details about the created netbridge_nsip_binding item. .EXAMPLE PS C:\>Invoke-NSAddNetbridgeNsipBinding -name <string> An example how to add netbridge_nsip_binding config Object(s). .NOTES File Name : Invoke-NSAddNetbridgeNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Ipaddress, [string]$Netmask, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNetbridgeNsipBinding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSCmdlet.ShouldProcess("netbridge_nsip_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type netbridge_nsip_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetbridgeNsipBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNetbridgeNsipBinding: Finished" } } function Invoke-NSDeleteNetbridgeNsipBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER Ipaddress The subnet that is extended by this network bridge. .PARAMETER Netmask The network mask for the subnet. .EXAMPLE PS C:\>Invoke-NSDeleteNetbridgeNsipBinding -Name <string> An example how to delete netbridge_nsip_binding config Object(s). .NOTES File Name : Invoke-NSDeleteNetbridgeNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Ipaddress, [string]$Netmask ) begin { Write-Verbose "Invoke-NSDeleteNetbridgeNsipBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type netbridge_nsip_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNetbridgeNsipBinding: Finished" } } function Invoke-NSGetNetbridgeNsipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER GetAll Retrieve all netbridge_nsip_binding object(s). .PARAMETER Count If specified, the count of the netbridge_nsip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsipBinding -GetAll Get all netbridge_nsip_binding data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsipBinding -Count Get the number of netbridge_nsip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsipBinding -name <string> Get netbridge_nsip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeNsipBinding -Filter @{ 'name'='<value>' } Get netbridge_nsip_binding data with a filter. .NOTES File Name : Invoke-NSGetNetbridgeNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNetbridgeNsipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all netbridge_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netbridge_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netbridge_nsip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netbridge_nsip_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netbridge_nsip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_nsip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetbridgeNsipBinding: Ended" } } function Invoke-NSAddNetbridgeVlanBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the vlan that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER Vlan The VLAN that is extended by this network bridge. Maximum value = 4094 .PARAMETER PassThru Return details about the created netbridge_vlan_binding item. .EXAMPLE PS C:\>Invoke-NSAddNetbridgeVlanBinding -name <string> An example how to add netbridge_vlan_binding config Object(s). .NOTES File Name : Invoke-NSAddNetbridgeVlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_vlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [double]$Vlan, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNetbridgeVlanBinding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSCmdlet.ShouldProcess("netbridge_vlan_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type netbridge_vlan_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetbridgeVlanBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNetbridgeVlanBinding: Finished" } } function Invoke-NSDeleteNetbridgeVlanBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the vlan that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER Vlan The VLAN that is extended by this network bridge. Maximum value = 4094 .EXAMPLE PS C:\>Invoke-NSDeleteNetbridgeVlanBinding -Name <string> An example how to delete netbridge_vlan_binding config Object(s). .NOTES File Name : Invoke-NSDeleteNetbridgeVlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_vlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [double]$Vlan ) begin { Write-Verbose "Invoke-NSDeleteNetbridgeVlanBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Vlan') ) { $arguments.Add('vlan', $Vlan) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type netbridge_vlan_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNetbridgeVlanBinding: Finished" } } function Invoke-NSGetNetbridgeVlanBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the vlan that can be bound to netbridge. .PARAMETER Name The name of the network bridge. .PARAMETER GetAll Retrieve all netbridge_vlan_binding object(s). .PARAMETER Count If specified, the count of the netbridge_vlan_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeVlanBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeVlanBinding -GetAll Get all netbridge_vlan_binding data. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeVlanBinding -Count Get the number of netbridge_vlan_binding objects. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeVlanBinding -name <string> Get netbridge_vlan_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetbridgeVlanBinding -Filter @{ 'name'='<value>' } Get netbridge_vlan_binding data with a filter. .NOTES File Name : Invoke-NSGetNetbridgeVlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netbridge_vlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNetbridgeVlanBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all netbridge_vlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_vlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netbridge_vlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_vlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netbridge_vlan_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_vlan_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netbridge_vlan_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_vlan_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netbridge_vlan_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netbridge_vlan_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetbridgeVlanBinding: Ended" } } function Invoke-NSAddNetprofile { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for Network profile resource. .PARAMETER Name Name for the net profile. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the profile is created. Choose a name that helps identify the net profile. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Srcip IP address or the name of an IP set. .PARAMETER Srcippersistency When the net profile is associated with a virtual server or its bound services, this option enables the Citrix ADC to use the same address, specified in the net profile, to communicate to servers for all sessions initiated from a particular client to the virtual server. Possible values = ENABLED, DISABLED .PARAMETER Overridelsn USNIP/USIP settings override LSN settings for configured service/virtual server traffic.. . Possible values = ENABLED, DISABLED .PARAMETER Mbf Response will be sent using learnt info if enabled. When creating a netprofile, if you do not set this parameter, the netprofile inherits the global MBF setting (available in the enable ns mode and disable ns mode CLI commands, or in the System > Settings > Configure modes > Configure Modes dialog box). However, you can override this setting after you create the netprofile. Possible values = ENABLED, DISABLED .PARAMETER Proxyprotocol Proxy Protocol Action (Enabled/Disabled). Possible values = ENABLED, DISABLED .PARAMETER Proxyprotocoltxversion Proxy Protocol Version (V1/V2). Possible values = V1, V2 .PARAMETER Proxyprotocolaftertlshandshake ADC doesnt look for proxy header before TLS handshake, if enabled. Proxy protocol parsed after TLS handshake. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created netprofile item. .EXAMPLE PS C:\>Invoke-NSAddNetprofile -name <string> An example how to add netprofile config Object(s). .NOTES File Name : Invoke-NSAddNetprofile Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [double]$Td, [string]$Srcip, [ValidateSet('ENABLED', 'DISABLED')] [string]$Srcippersistency = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Overridelsn = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Mbf, [ValidateSet('ENABLED', 'DISABLED')] [string]$Proxyprotocol = 'DISABLED', [ValidateSet('V1', 'V2')] [string]$Proxyprotocoltxversion = 'V1', [ValidateSet('ENABLED', 'DISABLED')] [string]$Proxyprotocolaftertlshandshake = 'DISABLED', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNetprofile: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('overridelsn') ) { $payload.Add('overridelsn', $overridelsn) } if ( $PSBoundParameters.ContainsKey('mbf') ) { $payload.Add('mbf', $mbf) } if ( $PSBoundParameters.ContainsKey('proxyprotocol') ) { $payload.Add('proxyprotocol', $proxyprotocol) } if ( $PSBoundParameters.ContainsKey('proxyprotocoltxversion') ) { $payload.Add('proxyprotocoltxversion', $proxyprotocoltxversion) } if ( $PSBoundParameters.ContainsKey('proxyprotocolaftertlshandshake') ) { $payload.Add('proxyprotocolaftertlshandshake', $proxyprotocolaftertlshandshake) } if ( $PSCmdlet.ShouldProcess("netprofile", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type netprofile -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetprofile -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNetprofile: Finished" } } function Invoke-NSDeleteNetprofile { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for Network profile resource. .PARAMETER Name Name for the net profile. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the profile is created. Choose a name that helps identify the net profile. .EXAMPLE PS C:\>Invoke-NSDeleteNetprofile -Name <string> An example how to delete netprofile config Object(s). .NOTES File Name : Invoke-NSDeleteNetprofile Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteNetprofile: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type netprofile -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNetprofile: Finished" } } function Invoke-NSUpdateNetprofile { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Network profile resource. .PARAMETER Name Name for the net profile. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the profile is created. Choose a name that helps identify the net profile. .PARAMETER Srcip IP address or the name of an IP set. .PARAMETER Srcippersistency When the net profile is associated with a virtual server or its bound services, this option enables the Citrix ADC to use the same address, specified in the net profile, to communicate to servers for all sessions initiated from a particular client to the virtual server. Possible values = ENABLED, DISABLED .PARAMETER Overridelsn USNIP/USIP settings override LSN settings for configured service/virtual server traffic.. . Possible values = ENABLED, DISABLED .PARAMETER Mbf Response will be sent using learnt info if enabled. When creating a netprofile, if you do not set this parameter, the netprofile inherits the global MBF setting (available in the enable ns mode and disable ns mode CLI commands, or in the System > Settings > Configure modes > Configure Modes dialog box). However, you can override this setting after you create the netprofile. Possible values = ENABLED, DISABLED .PARAMETER Proxyprotocol Proxy Protocol Action (Enabled/Disabled). Possible values = ENABLED, DISABLED .PARAMETER Proxyprotocoltxversion Proxy Protocol Version (V1/V2). Possible values = V1, V2 .PARAMETER Proxyprotocolaftertlshandshake ADC doesnt look for proxy header before TLS handshake, if enabled. Proxy protocol parsed after TLS handshake. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created netprofile item. .EXAMPLE PS C:\>Invoke-NSUpdateNetprofile -name <string> An example how to update netprofile config Object(s). .NOTES File Name : Invoke-NSUpdateNetprofile Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [string]$Srcip, [ValidateSet('ENABLED', 'DISABLED')] [string]$Srcippersistency, [ValidateSet('ENABLED', 'DISABLED')] [string]$Overridelsn, [ValidateSet('ENABLED', 'DISABLED')] [string]$Mbf, [ValidateSet('ENABLED', 'DISABLED')] [string]$Proxyprotocol, [ValidateSet('V1', 'V2')] [string]$Proxyprotocoltxversion, [ValidateSet('ENABLED', 'DISABLED')] [string]$Proxyprotocolaftertlshandshake, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateNetprofile: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('overridelsn') ) { $payload.Add('overridelsn', $overridelsn) } if ( $PSBoundParameters.ContainsKey('mbf') ) { $payload.Add('mbf', $mbf) } if ( $PSBoundParameters.ContainsKey('proxyprotocol') ) { $payload.Add('proxyprotocol', $proxyprotocol) } if ( $PSBoundParameters.ContainsKey('proxyprotocoltxversion') ) { $payload.Add('proxyprotocoltxversion', $proxyprotocoltxversion) } if ( $PSBoundParameters.ContainsKey('proxyprotocolaftertlshandshake') ) { $payload.Add('proxyprotocolaftertlshandshake', $proxyprotocolaftertlshandshake) } if ( $PSCmdlet.ShouldProcess("netprofile", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type netprofile -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetprofile -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateNetprofile: Finished" } } function Invoke-NSUnsetNetprofile { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for Network profile resource. .PARAMETER Name Name for the net profile. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the profile is created. Choose a name that helps identify the net profile. .PARAMETER Srcip IP address or the name of an IP set. .PARAMETER Srcippersistency When the net profile is associated with a virtual server or its bound services, this option enables the Citrix ADC to use the same address, specified in the net profile, to communicate to servers for all sessions initiated from a particular client to the virtual server. Possible values = ENABLED, DISABLED .PARAMETER Overridelsn USNIP/USIP settings override LSN settings for configured service/virtual server traffic.. . Possible values = ENABLED, DISABLED .PARAMETER Mbf Response will be sent using learnt info if enabled. When creating a netprofile, if you do not set this parameter, the netprofile inherits the global MBF setting (available in the enable ns mode and disable ns mode CLI commands, or in the System > Settings > Configure modes > Configure Modes dialog box). However, you can override this setting after you create the netprofile. Possible values = ENABLED, DISABLED .PARAMETER Proxyprotocol Proxy Protocol Action (Enabled/Disabled). Possible values = ENABLED, DISABLED .PARAMETER Proxyprotocoltxversion Proxy Protocol Version (V1/V2). Possible values = V1, V2 .PARAMETER Proxyprotocolaftertlshandshake ADC doesnt look for proxy header before TLS handshake, if enabled. Proxy protocol parsed after TLS handshake. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetNetprofile -name <string> An example how to unset netprofile config Object(s). .NOTES File Name : Invoke-NSUnsetNetprofile Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Boolean]$srcip, [Boolean]$srcippersistency, [Boolean]$overridelsn, [Boolean]$mbf, [Boolean]$proxyprotocol, [Boolean]$proxyprotocoltxversion, [Boolean]$proxyprotocolaftertlshandshake ) begin { Write-Verbose "Invoke-NSUnsetNetprofile: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('overridelsn') ) { $payload.Add('overridelsn', $overridelsn) } if ( $PSBoundParameters.ContainsKey('mbf') ) { $payload.Add('mbf', $mbf) } if ( $PSBoundParameters.ContainsKey('proxyprotocol') ) { $payload.Add('proxyprotocol', $proxyprotocol) } if ( $PSBoundParameters.ContainsKey('proxyprotocoltxversion') ) { $payload.Add('proxyprotocoltxversion', $proxyprotocoltxversion) } if ( $PSBoundParameters.ContainsKey('proxyprotocolaftertlshandshake') ) { $payload.Add('proxyprotocolaftertlshandshake', $proxyprotocolaftertlshandshake) } if ( $PSCmdlet.ShouldProcess("$name", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type netprofile -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetNetprofile: Finished" } } function Invoke-NSGetNetprofile { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Network profile resource. .PARAMETER Name Name for the net profile. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the profile is created. Choose a name that helps identify the net profile. .PARAMETER GetAll Retrieve all netprofile object(s). .PARAMETER Count If specified, the count of the netprofile object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetprofile Get data. .EXAMPLE PS C:\>Invoke-NSGetNetprofile -GetAll Get all netprofile data. .EXAMPLE PS C:\>Invoke-NSGetNetprofile -Count Get the number of netprofile objects. .EXAMPLE PS C:\>Invoke-NSGetNetprofile -name <string> Get netprofile object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetprofile -Filter @{ 'name'='<value>' } Get netprofile data with a filter. .NOTES File Name : Invoke-NSGetNetprofile Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetNetprofile: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all netprofile objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netprofile objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netprofile objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netprofile configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netprofile configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetprofile: Ended" } } function Invoke-NSGetNetprofileBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to netprofile. .PARAMETER Name Name of the net profile whose details you want to display. .PARAMETER GetAll Retrieve all netprofile_binding object(s). .PARAMETER Count If specified, the count of the netprofile_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetprofileBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNetprofileBinding -GetAll Get all netprofile_binding data. .EXAMPLE PS C:\>Invoke-NSGetNetprofileBinding -name <string> Get netprofile_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetprofileBinding -Filter @{ 'name'='<value>' } Get netprofile_binding data with a filter. .NOTES File Name : Invoke-NSGetNetprofileBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNetprofileBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all netprofile_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netprofile_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netprofile_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netprofile_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netprofile_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetprofileBinding: Ended" } } function Invoke-NSAddNetprofileNatruleBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the natrule that can be bound to netprofile. .PARAMETER Name Name of the netprofile to which to bind port ranges. .PARAMETER Natrule IPv4 network address on whose traffic you want the Citrix ADC to do rewrite ip prefix. .PARAMETER Netmask . .PARAMETER Rewriteip . .PARAMETER PassThru Return details about the created netprofile_natrule_binding item. .EXAMPLE PS C:\>Invoke-NSAddNetprofileNatruleBinding -name <string> An example how to add netprofile_natrule_binding config Object(s). .NOTES File Name : Invoke-NSAddNetprofileNatruleBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile_natrule_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [string]$Natrule, [string]$Netmask, [string]$Rewriteip, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNetprofileNatruleBinding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('natrule') ) { $payload.Add('natrule', $natrule) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('rewriteip') ) { $payload.Add('rewriteip', $rewriteip) } if ( $PSCmdlet.ShouldProcess("netprofile_natrule_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type netprofile_natrule_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetprofileNatruleBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNetprofileNatruleBinding: Finished" } } function Invoke-NSDeleteNetprofileNatruleBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the natrule that can be bound to netprofile. .PARAMETER Name Name of the netprofile to which to bind port ranges. .PARAMETER Natrule IPv4 network address on whose traffic you want the Citrix ADC to do rewrite ip prefix. .PARAMETER Netmask . .EXAMPLE PS C:\>Invoke-NSDeleteNetprofileNatruleBinding -Name <string> An example how to delete netprofile_natrule_binding config Object(s). .NOTES File Name : Invoke-NSDeleteNetprofileNatruleBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile_natrule_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Natrule, [string]$Netmask ) begin { Write-Verbose "Invoke-NSDeleteNetprofileNatruleBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Natrule') ) { $arguments.Add('natrule', $Natrule) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type netprofile_natrule_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNetprofileNatruleBinding: Finished" } } function Invoke-NSGetNetprofileNatruleBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the natrule that can be bound to netprofile. .PARAMETER Name Name of the netprofile to which to bind port ranges. .PARAMETER GetAll Retrieve all netprofile_natrule_binding object(s). .PARAMETER Count If specified, the count of the netprofile_natrule_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetprofileNatruleBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNetprofileNatruleBinding -GetAll Get all netprofile_natrule_binding data. .EXAMPLE PS C:\>Invoke-NSGetNetprofileNatruleBinding -Count Get the number of netprofile_natrule_binding objects. .EXAMPLE PS C:\>Invoke-NSGetNetprofileNatruleBinding -name <string> Get netprofile_natrule_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetprofileNatruleBinding -Filter @{ 'name'='<value>' } Get netprofile_natrule_binding data with a filter. .NOTES File Name : Invoke-NSGetNetprofileNatruleBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile_natrule_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNetprofileNatruleBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all netprofile_natrule_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_natrule_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netprofile_natrule_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_natrule_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netprofile_natrule_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_natrule_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netprofile_natrule_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_natrule_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netprofile_natrule_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_natrule_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetprofileNatruleBinding: Ended" } } function Invoke-NSAddNetprofileSrcportsetBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the srcportset that can be bound to netprofile. .PARAMETER Name Name of the netprofile to which to bind port ranges. .PARAMETER Srcportrange When the source port range is configured and associated with the netprofile bound to a service group, Citrix ADC will choose a port from the range configured for connection establishment at the backend servers. .PARAMETER PassThru Return details about the created netprofile_srcportset_binding item. .EXAMPLE PS C:\>Invoke-NSAddNetprofileSrcportsetBinding -name <string> An example how to add netprofile_srcportset_binding config Object(s). .NOTES File Name : Invoke-NSAddNetprofileSrcportsetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile_srcportset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateLength(1024, 65535)] [string]$Srcportrange, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddNetprofileSrcportsetBinding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('srcportrange') ) { $payload.Add('srcportrange', $srcportrange) } if ( $PSCmdlet.ShouldProcess("netprofile_srcportset_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type netprofile_srcportset_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetNetprofileSrcportsetBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddNetprofileSrcportsetBinding: Finished" } } function Invoke-NSDeleteNetprofileSrcportsetBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the srcportset that can be bound to netprofile. .PARAMETER Name Name of the netprofile to which to bind port ranges. .PARAMETER Srcportrange When the source port range is configured and associated with the netprofile bound to a service group, Citrix ADC will choose a port from the range configured for connection establishment at the backend servers. .EXAMPLE PS C:\>Invoke-NSDeleteNetprofileSrcportsetBinding -Name <string> An example how to delete netprofile_srcportset_binding config Object(s). .NOTES File Name : Invoke-NSDeleteNetprofileSrcportsetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile_srcportset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Srcportrange ) begin { Write-Verbose "Invoke-NSDeleteNetprofileSrcportsetBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Srcportrange') ) { $arguments.Add('srcportrange', $Srcportrange) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type netprofile_srcportset_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteNetprofileSrcportsetBinding: Finished" } } function Invoke-NSGetNetprofileSrcportsetBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the srcportset that can be bound to netprofile. .PARAMETER Name Name of the netprofile to which to bind port ranges. .PARAMETER GetAll Retrieve all netprofile_srcportset_binding object(s). .PARAMETER Count If specified, the count of the netprofile_srcportset_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetNetprofileSrcportsetBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetNetprofileSrcportsetBinding -GetAll Get all netprofile_srcportset_binding data. .EXAMPLE PS C:\>Invoke-NSGetNetprofileSrcportsetBinding -Count Get the number of netprofile_srcportset_binding objects. .EXAMPLE PS C:\>Invoke-NSGetNetprofileSrcportsetBinding -name <string> Get netprofile_srcportset_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetNetprofileSrcportsetBinding -Filter @{ 'name'='<value>' } Get netprofile_srcportset_binding data with a filter. .NOTES File Name : Invoke-NSGetNetprofileSrcportsetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/netprofile_srcportset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetNetprofileSrcportsetBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all netprofile_srcportset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_srcportset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for netprofile_srcportset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_srcportset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving netprofile_srcportset_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_srcportset_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving netprofile_srcportset_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_srcportset_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving netprofile_srcportset_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type netprofile_srcportset_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetNetprofileSrcportsetBinding: Ended" } } function Invoke-NSAddOnlinkipv6prefix { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for on-link IPv6 global prefixes for Router Advertisment resource. .PARAMETER Ipv6prefix Onlink prefixes for RA messages. .PARAMETER Onlinkprefix RA Prefix onlink flag. Possible values = YES, NO .PARAMETER Autonomusprefix RA Prefix Autonomus flag. Possible values = YES, NO .PARAMETER Depricateprefix Depricate the prefix. Possible values = YES, NO .PARAMETER Decrementprefixlifetimes RA Prefix Autonomus flag. Possible values = YES, NO .PARAMETER Prefixvalidelifetime Valide life time of the prefix, in seconds. .PARAMETER Prefixpreferredlifetime Preferred life time of the prefix, in seconds. .PARAMETER PassThru Return details about the created onlinkipv6prefix item. .EXAMPLE PS C:\>Invoke-NSAddOnlinkipv6prefix -ipv6prefix <string> An example how to add onlinkipv6prefix config Object(s). .NOTES File Name : Invoke-NSAddOnlinkipv6prefix Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/onlinkipv6prefix/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Ipv6prefix, [ValidateSet('YES', 'NO')] [string]$Onlinkprefix = 'YES', [ValidateSet('YES', 'NO')] [string]$Autonomusprefix = 'YES', [ValidateSet('YES', 'NO')] [string]$Depricateprefix = 'NO', [ValidateSet('YES', 'NO')] [string]$Decrementprefixlifetimes = 'NO', [double]$Prefixvalidelifetime = '2592000', [double]$Prefixpreferredlifetime = '604800', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddOnlinkipv6prefix: Starting" } process { try { $payload = @{ ipv6prefix = $ipv6prefix } if ( $PSBoundParameters.ContainsKey('onlinkprefix') ) { $payload.Add('onlinkprefix', $onlinkprefix) } if ( $PSBoundParameters.ContainsKey('autonomusprefix') ) { $payload.Add('autonomusprefix', $autonomusprefix) } if ( $PSBoundParameters.ContainsKey('depricateprefix') ) { $payload.Add('depricateprefix', $depricateprefix) } if ( $PSBoundParameters.ContainsKey('decrementprefixlifetimes') ) { $payload.Add('decrementprefixlifetimes', $decrementprefixlifetimes) } if ( $PSBoundParameters.ContainsKey('prefixvalidelifetime') ) { $payload.Add('prefixvalidelifetime', $prefixvalidelifetime) } if ( $PSBoundParameters.ContainsKey('prefixpreferredlifetime') ) { $payload.Add('prefixpreferredlifetime', $prefixpreferredlifetime) } if ( $PSCmdlet.ShouldProcess("onlinkipv6prefix", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type onlinkipv6prefix -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetOnlinkipv6prefix -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddOnlinkipv6prefix: Finished" } } function Invoke-NSDeleteOnlinkipv6prefix { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for on-link IPv6 global prefixes for Router Advertisment resource. .PARAMETER Ipv6prefix Onlink prefixes for RA messages. .EXAMPLE PS C:\>Invoke-NSDeleteOnlinkipv6prefix -Ipv6prefix <string> An example how to delete onlinkipv6prefix config Object(s). .NOTES File Name : Invoke-NSDeleteOnlinkipv6prefix Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/onlinkipv6prefix/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Ipv6prefix ) begin { Write-Verbose "Invoke-NSDeleteOnlinkipv6prefix: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$ipv6prefix", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type onlinkipv6prefix -NitroPath nitro/v1/config -Resource $ipv6prefix -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteOnlinkipv6prefix: Finished" } } function Invoke-NSUpdateOnlinkipv6prefix { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for on-link IPv6 global prefixes for Router Advertisment resource. .PARAMETER Ipv6prefix Onlink prefixes for RA messages. .PARAMETER Onlinkprefix RA Prefix onlink flag. Possible values = YES, NO .PARAMETER Autonomusprefix RA Prefix Autonomus flag. Possible values = YES, NO .PARAMETER Depricateprefix Depricate the prefix. Possible values = YES, NO .PARAMETER Decrementprefixlifetimes RA Prefix Autonomus flag. Possible values = YES, NO .PARAMETER Prefixvalidelifetime Valide life time of the prefix, in seconds. .PARAMETER Prefixpreferredlifetime Preferred life time of the prefix, in seconds. .PARAMETER PassThru Return details about the created onlinkipv6prefix item. .EXAMPLE PS C:\>Invoke-NSUpdateOnlinkipv6prefix -ipv6prefix <string> An example how to update onlinkipv6prefix config Object(s). .NOTES File Name : Invoke-NSUpdateOnlinkipv6prefix Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/onlinkipv6prefix/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Ipv6prefix, [ValidateSet('YES', 'NO')] [string]$Onlinkprefix, [ValidateSet('YES', 'NO')] [string]$Autonomusprefix, [ValidateSet('YES', 'NO')] [string]$Depricateprefix, [ValidateSet('YES', 'NO')] [string]$Decrementprefixlifetimes, [double]$Prefixvalidelifetime, [double]$Prefixpreferredlifetime, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateOnlinkipv6prefix: Starting" } process { try { $payload = @{ ipv6prefix = $ipv6prefix } if ( $PSBoundParameters.ContainsKey('onlinkprefix') ) { $payload.Add('onlinkprefix', $onlinkprefix) } if ( $PSBoundParameters.ContainsKey('autonomusprefix') ) { $payload.Add('autonomusprefix', $autonomusprefix) } if ( $PSBoundParameters.ContainsKey('depricateprefix') ) { $payload.Add('depricateprefix', $depricateprefix) } if ( $PSBoundParameters.ContainsKey('decrementprefixlifetimes') ) { $payload.Add('decrementprefixlifetimes', $decrementprefixlifetimes) } if ( $PSBoundParameters.ContainsKey('prefixvalidelifetime') ) { $payload.Add('prefixvalidelifetime', $prefixvalidelifetime) } if ( $PSBoundParameters.ContainsKey('prefixpreferredlifetime') ) { $payload.Add('prefixpreferredlifetime', $prefixpreferredlifetime) } if ( $PSCmdlet.ShouldProcess("onlinkipv6prefix", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type onlinkipv6prefix -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetOnlinkipv6prefix -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateOnlinkipv6prefix: Finished" } } function Invoke-NSUnsetOnlinkipv6prefix { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for on-link IPv6 global prefixes for Router Advertisment resource. .PARAMETER Ipv6prefix Onlink prefixes for RA messages. .PARAMETER Onlinkprefix RA Prefix onlink flag. Possible values = YES, NO .PARAMETER Autonomusprefix RA Prefix Autonomus flag. Possible values = YES, NO .PARAMETER Depricateprefix Depricate the prefix. Possible values = YES, NO .PARAMETER Decrementprefixlifetimes RA Prefix Autonomus flag. Possible values = YES, NO .PARAMETER Prefixvalidelifetime Valide life time of the prefix, in seconds. .PARAMETER Prefixpreferredlifetime Preferred life time of the prefix, in seconds. .EXAMPLE PS C:\>Invoke-NSUnsetOnlinkipv6prefix -ipv6prefix <string> An example how to unset onlinkipv6prefix config Object(s). .NOTES File Name : Invoke-NSUnsetOnlinkipv6prefix Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/onlinkipv6prefix Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Ipv6prefix, [Boolean]$onlinkprefix, [Boolean]$autonomusprefix, [Boolean]$depricateprefix, [Boolean]$decrementprefixlifetimes, [Boolean]$prefixvalidelifetime, [Boolean]$prefixpreferredlifetime ) begin { Write-Verbose "Invoke-NSUnsetOnlinkipv6prefix: Starting" } process { try { $payload = @{ ipv6prefix = $ipv6prefix } if ( $PSBoundParameters.ContainsKey('onlinkprefix') ) { $payload.Add('onlinkprefix', $onlinkprefix) } if ( $PSBoundParameters.ContainsKey('autonomusprefix') ) { $payload.Add('autonomusprefix', $autonomusprefix) } if ( $PSBoundParameters.ContainsKey('depricateprefix') ) { $payload.Add('depricateprefix', $depricateprefix) } if ( $PSBoundParameters.ContainsKey('decrementprefixlifetimes') ) { $payload.Add('decrementprefixlifetimes', $decrementprefixlifetimes) } if ( $PSBoundParameters.ContainsKey('prefixvalidelifetime') ) { $payload.Add('prefixvalidelifetime', $prefixvalidelifetime) } if ( $PSBoundParameters.ContainsKey('prefixpreferredlifetime') ) { $payload.Add('prefixpreferredlifetime', $prefixpreferredlifetime) } if ( $PSCmdlet.ShouldProcess("$ipv6prefix", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type onlinkipv6prefix -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetOnlinkipv6prefix: Finished" } } function Invoke-NSGetOnlinkipv6prefix { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for on-link IPv6 global prefixes for Router Advertisment resource. .PARAMETER Ipv6prefix Onlink prefixes for RA messages. .PARAMETER GetAll Retrieve all onlinkipv6prefix object(s). .PARAMETER Count If specified, the count of the onlinkipv6prefix object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetOnlinkipv6prefix Get data. .EXAMPLE PS C:\>Invoke-NSGetOnlinkipv6prefix -GetAll Get all onlinkipv6prefix data. .EXAMPLE PS C:\>Invoke-NSGetOnlinkipv6prefix -Count Get the number of onlinkipv6prefix objects. .EXAMPLE PS C:\>Invoke-NSGetOnlinkipv6prefix -name <string> Get onlinkipv6prefix object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetOnlinkipv6prefix -Filter @{ 'name'='<value>' } Get onlinkipv6prefix data with a filter. .NOTES File Name : Invoke-NSGetOnlinkipv6prefix Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/onlinkipv6prefix/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [string]$Ipv6prefix, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetOnlinkipv6prefix: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all onlinkipv6prefix objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type onlinkipv6prefix -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for onlinkipv6prefix objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type onlinkipv6prefix -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving onlinkipv6prefix objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type onlinkipv6prefix -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving onlinkipv6prefix configuration for property 'ipv6prefix'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type onlinkipv6prefix -NitroPath nitro/v1/config -Resource $ipv6prefix -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving onlinkipv6prefix configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type onlinkipv6prefix -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetOnlinkipv6prefix: Ended" } } function Invoke-NSGetPortallocation { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for portallocation resource. .PARAMETER Srcip IP address for which Port allocation needs to be seen. IP address can be SNIP/VIP/NSIP. .PARAMETER Destip Destination IP address or Server IP for which Port allocation needs to be seen. .PARAMETER Destport Destination Port or Server port configuration. Maximum value = 65535 .PARAMETER Protocol Protocol for the traffic. TCP traffic: 1, All other protocol traffic: 0. Maximum value = 1 .PARAMETER Nodeid Unique number that identifies the cluster node. Maximum value = 31 .PARAMETER GetAll Retrieve all portallocation object(s). .PARAMETER Count If specified, the count of the portallocation object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetPortallocation Get data. .EXAMPLE PS C:\>Invoke-NSGetPortallocation -GetAll Get all portallocation data. .EXAMPLE PS C:\>Invoke-NSGetPortallocation -Count Get the number of portallocation objects. .EXAMPLE PS C:\>Invoke-NSGetPortallocation -name <string> Get portallocation object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetPortallocation -Filter @{ 'name'='<value>' } Get portallocation data with a filter. .NOTES File Name : Invoke-NSGetPortallocation Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/portallocation/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByArgument')] [string]$Srcip, [Parameter(ParameterSetName = 'GetByArgument')] [string]$Destip, [Parameter(ParameterSetName = 'GetByArgument')] [int]$Destport, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Protocol, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Nodeid, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetPortallocation: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all portallocation objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type portallocation -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for portallocation objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type portallocation -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving portallocation objects by arguments" $arguments = @{ } if ( $PSBoundParameters.ContainsKey('srcip') ) { $arguments.Add('srcip', $srcip) } if ( $PSBoundParameters.ContainsKey('destip') ) { $arguments.Add('destip', $destip) } if ( $PSBoundParameters.ContainsKey('destport') ) { $arguments.Add('destport', $destport) } if ( $PSBoundParameters.ContainsKey('protocol') ) { $arguments.Add('protocol', $protocol) } if ( $PSBoundParameters.ContainsKey('nodeid') ) { $arguments.Add('nodeid', $nodeid) } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type portallocation -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving portallocation configuration for property ''" } else { Write-Verbose "Retrieving portallocation configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type portallocation -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetPortallocation: Ended" } } function Invoke-NSUpdatePtp { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Precision Time Protocol resource. .PARAMETER State Enables or disables Precision Time Protocol (PTP) on the appliance. If you disable PTP, make sure you enable Network Time Protocol (NTP) on the cluster. Possible values = DISABLE, ENABLE .EXAMPLE PS C:\>Invoke-NSUpdatePtp -state <string> An example how to update ptp config Object(s). .NOTES File Name : Invoke-NSUpdatePtp Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ptp/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateSet('DISABLE', 'ENABLE')] [string]$State ) begin { Write-Verbose "Invoke-NSUpdatePtp: Starting" } process { try { $payload = @{ state = $state } if ( $PSCmdlet.ShouldProcess("ptp", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type ptp -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdatePtp: Finished" } } function Invoke-NSGetPtp { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Precision Time Protocol resource. .PARAMETER GetAll Retrieve all ptp object(s). .PARAMETER Count If specified, the count of the ptp object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetPtp Get data. .EXAMPLE PS C:\>Invoke-NSGetPtp -GetAll Get all ptp data. .EXAMPLE PS C:\>Invoke-NSGetPtp -name <string> Get ptp object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetPtp -Filter @{ 'name'='<value>' } Get ptp data with a filter. .NOTES File Name : Invoke-NSGetPtp Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/ptp/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetPtp: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all ptp objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ptp -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for ptp objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ptp -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving ptp objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ptp -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving ptp configuration for property ''" } else { Write-Verbose "Retrieving ptp configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type ptp -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetPtp: Ended" } } function Invoke-NSClearRnat { <# .SYNOPSIS Clear Networking commands. config Object. .DESCRIPTION Configuration for RNAT configured route resource. .PARAMETER Network The network address defined for the RNAT entry. .PARAMETER Netmask The subnet mask for the network address. .PARAMETER Aclname An extended ACL defined for the RNAT entry. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .EXAMPLE PS C:\>Invoke-NSClearRnat An example how to clear rnat config Object(s). .NOTES File Name : Invoke-NSClearRnat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Network, [ValidateScript({ $_.Length -gt 1 })] [string]$Netmask, [ValidateScript({ $_.Length -gt 1 })] [string]$Aclname, [double]$Td, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSClearRnat: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('network') ) { $payload.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('aclname') ) { $payload.Add('aclname', $aclname) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess($Name, "Clear Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type rnat -Action clear -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSClearRnat: Finished" } } function Invoke-NSUpdateRnat { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for RNAT configured route resource. .PARAMETER Name Name for the RNAT4 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT4 rule. .PARAMETER Network The network address defined for the RNAT entry. .PARAMETER Netmask The subnet mask for the network address. .PARAMETER Aclname An extended ACL defined for the RNAT entry. .PARAMETER Redirectport Port number to which the IPv4 packets are redirected. Applicable to TCP and UDP protocols. Maximum value = 65535 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Natip Any NetScaler-owned IPv4 address except the NSIP address. The NetScaler appliance replaces the source IP addresses of server-generated packets with the IP address specified. The IP address must be a public NetScaler-owned IP address. If you specify multiple addresses for this field, NATIP selection uses the round robin algorithm for each session. By specifying a range of IP addresses, you can specify all NetScaler-owned IP addresses, except the NSIP, that fall within the specified range. .PARAMETER Srcippersistency Enables the Citrix ADC to use the same NAT IP address for all RNAT sessions initiated from a particular server. Possible values = ENABLED, DISABLED .PARAMETER Useproxyport Enable source port proxying, which enables the Citrix ADC to use the RNAT ips using proxied source port. Possible values = ENABLED, DISABLED .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .PARAMETER Connfailover Synchronize all connection-related information for the RNAT sessions with the secondary ADC in a high availability (HA) pair. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created rnat item. .EXAMPLE PS C:\>Invoke-NSUpdateRnat An example how to update rnat config Object(s). .NOTES File Name : Invoke-NSUpdateRnat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Network, [ValidateScript({ $_.Length -gt 1 })] [string]$Netmask, [ValidateScript({ $_.Length -gt 1 })] [string]$Aclname, [int]$Redirectport, [double]$Td, [ValidateScript({ $_.Length -gt 1 })] [string]$Natip, [ValidateSet('ENABLED', 'DISABLED')] [string]$Srcippersistency, [ValidateSet('ENABLED', 'DISABLED')] [string]$Useproxyport, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup, [ValidateSet('ENABLED', 'DISABLED')] [string]$Connfailover, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateRnat: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('name') ) { $payload.Add('name', $name) } if ( $PSBoundParameters.ContainsKey('network') ) { $payload.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('aclname') ) { $payload.Add('aclname', $aclname) } if ( $PSBoundParameters.ContainsKey('redirectport') ) { $payload.Add('redirectport', $redirectport) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('natip') ) { $payload.Add('natip', $natip) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('useproxyport') ) { $payload.Add('useproxyport', $useproxyport) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSBoundParameters.ContainsKey('connfailover') ) { $payload.Add('connfailover', $connfailover) } if ( $PSCmdlet.ShouldProcess("rnat", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type rnat -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnat -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateRnat: Finished" } } function Invoke-NSUnsetRnat { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for RNAT configured route resource. .PARAMETER Name Name for the RNAT4 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT4 rule. .PARAMETER Network The network address defined for the RNAT entry. .PARAMETER Netmask The subnet mask for the network address. .PARAMETER Aclname An extended ACL defined for the RNAT entry. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Redirectport Port number to which the IPv4 packets are redirected. Applicable to TCP and UDP protocols. Maximum value = 65535 .PARAMETER Natip Any NetScaler-owned IPv4 address except the NSIP address. The NetScaler appliance replaces the source IP addresses of server-generated packets with the IP address specified. The IP address must be a public NetScaler-owned IP address. If you specify multiple addresses for this field, NATIP selection uses the round robin algorithm for each session. By specifying a range of IP addresses, you can specify all NetScaler-owned IP addresses, except the NSIP, that fall within the specified range. .PARAMETER Srcippersistency Enables the Citrix ADC to use the same NAT IP address for all RNAT sessions initiated from a particular server. Possible values = ENABLED, DISABLED .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .PARAMETER Useproxyport Enable source port proxying, which enables the Citrix ADC to use the RNAT ips using proxied source port. Possible values = ENABLED, DISABLED .PARAMETER Connfailover Synchronize all connection-related information for the RNAT sessions with the secondary ADC in a high availability (HA) pair. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetRnat An example how to unset rnat config Object(s). .NOTES File Name : Invoke-NSUnsetRnat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$name, [Boolean]$network, [Boolean]$netmask, [Boolean]$aclname, [Boolean]$td, [Boolean]$redirectport, [Boolean]$natip, [Boolean]$srcippersistency, [Boolean]$ownergroup, [Boolean]$useproxyport, [Boolean]$connfailover ) begin { Write-Verbose "Invoke-NSUnsetRnat: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('name') ) { $payload.Add('name', $name) } if ( $PSBoundParameters.ContainsKey('network') ) { $payload.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('aclname') ) { $payload.Add('aclname', $aclname) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('redirectport') ) { $payload.Add('redirectport', $redirectport) } if ( $PSBoundParameters.ContainsKey('natip') ) { $payload.Add('natip', $natip) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSBoundParameters.ContainsKey('useproxyport') ) { $payload.Add('useproxyport', $useproxyport) } if ( $PSBoundParameters.ContainsKey('connfailover') ) { $payload.Add('connfailover', $connfailover) } if ( $PSCmdlet.ShouldProcess("rnat", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type rnat -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetRnat: Finished" } } function Invoke-NSAddRnat { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for RNAT configured route resource. .PARAMETER Name Name for the RNAT4 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT4 rule. .PARAMETER Network The network address defined for the RNAT entry. .PARAMETER Netmask The subnet mask for the network address. .PARAMETER Aclname An extended ACL defined for the RNAT entry. .PARAMETER Redirectport Port number to which the IPv4 packets are redirected. Applicable to TCP and UDP protocols. Maximum value = 65535 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Srcippersistency Enables the Citrix ADC to use the same NAT IP address for all RNAT sessions initiated from a particular server. Possible values = ENABLED, DISABLED .PARAMETER Useproxyport Enable source port proxying, which enables the Citrix ADC to use the RNAT ips using proxied source port. Possible values = ENABLED, DISABLED .PARAMETER Connfailover Synchronize all connection-related information for the RNAT sessions with the secondary ADC in a high availability (HA) pair. Possible values = ENABLED, DISABLED .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .PARAMETER PassThru Return details about the created rnat item. .EXAMPLE PS C:\>Invoke-NSAddRnat -name <string> An example how to add rnat config Object(s). .NOTES File Name : Invoke-NSAddRnat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Network, [ValidateScript({ $_.Length -gt 1 })] [string]$Netmask, [ValidateScript({ $_.Length -gt 1 })] [string]$Aclname, [int]$Redirectport, [double]$Td, [ValidateSet('ENABLED', 'DISABLED')] [string]$Srcippersistency = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Useproxyport = 'ENABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Connfailover = 'DISABLED', [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddRnat: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('network') ) { $payload.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('aclname') ) { $payload.Add('aclname', $aclname) } if ( $PSBoundParameters.ContainsKey('redirectport') ) { $payload.Add('redirectport', $redirectport) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('useproxyport') ) { $payload.Add('useproxyport', $useproxyport) } if ( $PSBoundParameters.ContainsKey('connfailover') ) { $payload.Add('connfailover', $connfailover) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("rnat", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type rnat -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnat -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddRnat: Finished" } } function Invoke-NSRenameRnat { <# .SYNOPSIS Rename Networking commands. config Object. .DESCRIPTION Configuration for RNAT configured route resource. .PARAMETER Name Name for the RNAT4 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT4 rule. .PARAMETER Newname New name for the RNAT4 rule. Must begin with an ASCII alphabetic or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. .PARAMETER PassThru Return details about the created rnat item. .EXAMPLE PS C:\>Invoke-NSRenameRnat -name <string> -newname <string> An example how to rename rnat config Object(s). .NOTES File Name : Invoke-NSRenameRnat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [ValidatePattern('^(?>(?>[a-zA-Z0-9]|[_])+(?>[\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])*)$')] [string]$Newname, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSRenameRnat: Starting" } process { try { $payload = @{ name = $name newname = $newname } if ( $PSCmdlet.ShouldProcess("rnat", "Rename Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type rnat -Action rename -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnat -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSRenameRnat: Finished" } } function Invoke-NSDeleteRnat { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for RNAT configured route resource. .PARAMETER Name Name for the RNAT4 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT4 rule. .EXAMPLE PS C:\>Invoke-NSDeleteRnat -Name <string> An example how to delete rnat config Object(s). .NOTES File Name : Invoke-NSDeleteRnat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteRnat: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type rnat -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteRnat: Finished" } } function Invoke-NSGetRnat { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for RNAT configured route resource. .PARAMETER Name Name for the RNAT4 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT4 rule. .PARAMETER GetAll Retrieve all rnat object(s). .PARAMETER Count If specified, the count of the rnat object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnat Get data. .EXAMPLE PS C:\>Invoke-NSGetRnat -GetAll Get all rnat data. .EXAMPLE PS C:\>Invoke-NSGetRnat -Count Get the number of rnat objects. .EXAMPLE PS C:\>Invoke-NSGetRnat -name <string> Get rnat object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnat -Filter @{ 'name'='<value>' } Get rnat data with a filter. .NOTES File Name : Invoke-NSGetRnat Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetRnat: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all rnat objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnat objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnat objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnat configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving rnat configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnat: Ended" } } function Invoke-NSAddRnat6 { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for IPv6 RNAT configured route resource. .PARAMETER Name Name for the RNAT6 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT6 rule. .PARAMETER Network IPv6 address of the network on whose traffic you want the Citrix ADC to do RNAT processing. .PARAMETER Acl6name Name of any configured ACL6 whose action is ALLOW. The rule of the ACL6 is used as an RNAT6 rule. .PARAMETER Redirectport Port number to which the IPv6 packets are redirected. Applicable to TCP and UDP protocols. Maximum value = 65535 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Srcippersistency Enable source ip persistency, which enables the Citrix ADC to use the RNAT ips using source ip. Possible values = ENABLED, DISABLED .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .PARAMETER PassThru Return details about the created rnat6 item. .EXAMPLE PS C:\>Invoke-NSAddRnat6 -name <string> An example how to add rnat6 config Object(s). .NOTES File Name : Invoke-NSAddRnat6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Network, [ValidateScript({ $_.Length -gt 1 })] [string]$Acl6name, [int]$Redirectport, [double]$Td, [ValidateSet('ENABLED', 'DISABLED')] [string]$Srcippersistency = 'DISABLED', [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddRnat6: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('network') ) { $payload.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('acl6name') ) { $payload.Add('acl6name', $acl6name) } if ( $PSBoundParameters.ContainsKey('redirectport') ) { $payload.Add('redirectport', $redirectport) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("rnat6", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type rnat6 -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnat6 -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddRnat6: Finished" } } function Invoke-NSUpdateRnat6 { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for IPv6 RNAT configured route resource. .PARAMETER Name Name for the RNAT6 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT6 rule. .PARAMETER Redirectport Port number to which the IPv6 packets are redirected. Applicable to TCP and UDP protocols. Maximum value = 65535 .PARAMETER Srcippersistency Enable source ip persistency, which enables the Citrix ADC to use the RNAT ips using source ip. Possible values = ENABLED, DISABLED .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .PARAMETER PassThru Return details about the created rnat6 item. .EXAMPLE PS C:\>Invoke-NSUpdateRnat6 -name <string> An example how to update rnat6 config Object(s). .NOTES File Name : Invoke-NSUpdateRnat6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [int]$Redirectport, [ValidateSet('ENABLED', 'DISABLED')] [string]$Srcippersistency, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateRnat6: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('redirectport') ) { $payload.Add('redirectport', $redirectport) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("rnat6", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type rnat6 -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnat6 -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateRnat6: Finished" } } function Invoke-NSUnsetRnat6 { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for IPv6 RNAT configured route resource. .PARAMETER Name Name for the RNAT6 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT6 rule. .PARAMETER Redirectport Port number to which the IPv6 packets are redirected. Applicable to TCP and UDP protocols. Maximum value = 65535 .PARAMETER Srcippersistency Enable source ip persistency, which enables the Citrix ADC to use the RNAT ips using source ip. Possible values = ENABLED, DISABLED .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .EXAMPLE PS C:\>Invoke-NSUnsetRnat6 -name <string> An example how to unset rnat6 config Object(s). .NOTES File Name : Invoke-NSUnsetRnat6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6 Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Boolean]$redirectport, [Boolean]$srcippersistency, [Boolean]$ownergroup ) begin { Write-Verbose "Invoke-NSUnsetRnat6: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('redirectport') ) { $payload.Add('redirectport', $redirectport) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("$name", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type rnat6 -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetRnat6: Finished" } } function Invoke-NSClearRnat6 { <# .SYNOPSIS Clear Networking commands. config Object. .DESCRIPTION Configuration for IPv6 RNAT configured route resource. .PARAMETER Name Name for the RNAT6 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT6 rule. .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .EXAMPLE PS C:\>Invoke-NSClearRnat6 -name <string> An example how to clear rnat6 config Object(s). .NOTES File Name : Invoke-NSClearRnat6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSClearRnat6: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess($Name, "Clear Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type rnat6 -Action clear -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSClearRnat6: Finished" } } function Invoke-NSGetRnat6 { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for IPv6 RNAT configured route resource. .PARAMETER Name Name for the RNAT6 rule. Must begin with a letter, number, or the underscore character (_), and can consist of letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore characters. Cannot be changed after the rule is created. Choose a name that helps identify the RNAT6 rule. .PARAMETER GetAll Retrieve all rnat6 object(s). .PARAMETER Count If specified, the count of the rnat6 object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnat6 Get data. .EXAMPLE PS C:\>Invoke-NSGetRnat6 -GetAll Get all rnat6 data. .EXAMPLE PS C:\>Invoke-NSGetRnat6 -Count Get the number of rnat6 objects. .EXAMPLE PS C:\>Invoke-NSGetRnat6 -name <string> Get rnat6 object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnat6 -Filter @{ 'name'='<value>' } Get rnat6 data with a filter. .NOTES File Name : Invoke-NSGetRnat6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetRnat6: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all rnat6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnat6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnat6 objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6 -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnat6 configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6 -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving rnat6 configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6 -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnat6: Ended" } } function Invoke-NSGetRnat6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to rnat6. .PARAMETER Name Name of the RNAT6 rule whose details you want to display. .PARAMETER GetAll Retrieve all rnat6_binding object(s). .PARAMETER Count If specified, the count of the rnat6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnat6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetRnat6Binding -GetAll Get all rnat6_binding data. .EXAMPLE PS C:\>Invoke-NSGetRnat6Binding -name <string> Get rnat6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnat6Binding -Filter @{ 'name'='<value>' } Get rnat6_binding data with a filter. .NOTES File Name : Invoke-NSGetRnat6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRnat6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all rnat6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnat6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnat6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnat6_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving rnat6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnat6Binding: Ended" } } function Invoke-NSAddRnat6Nsip6Binding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to rnat6. .PARAMETER Name Name of the RNAT6 rule to which to bind NAT IPs. .PARAMETER Natip6 Nat IP Address. .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .PARAMETER PassThru Return details about the created rnat6_nsip6_binding item. .EXAMPLE PS C:\>Invoke-NSAddRnat6Nsip6Binding -name <string> -natip6 <string> An example how to add rnat6_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSAddRnat6Nsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Natip6, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddRnat6Nsip6Binding: Starting" } process { try { $payload = @{ name = $name natip6 = $natip6 } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("rnat6_nsip6_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type rnat6_nsip6_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnat6Nsip6Binding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddRnat6Nsip6Binding: Finished" } } function Invoke-NSDeleteRnat6Nsip6Binding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to rnat6. .PARAMETER Name Name of the RNAT6 rule to which to bind NAT IPs. .PARAMETER Natip6 Nat IP Address. .PARAMETER Ownergroup The owner node group in a Cluster for this rnat rule. .EXAMPLE PS C:\>Invoke-NSDeleteRnat6Nsip6Binding -Name <string> An example how to delete rnat6_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSDeleteRnat6Nsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Natip6, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteRnat6Nsip6Binding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Natip6') ) { $arguments.Add('natip6', $Natip6) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type rnat6_nsip6_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteRnat6Nsip6Binding: Finished" } } function Invoke-NSGetRnat6Nsip6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip6 that can be bound to rnat6. .PARAMETER Name Name of the RNAT6 rule to which to bind NAT IPs. .PARAMETER GetAll Retrieve all rnat6_nsip6_binding object(s). .PARAMETER Count If specified, the count of the rnat6_nsip6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnat6Nsip6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetRnat6Nsip6Binding -GetAll Get all rnat6_nsip6_binding data. .EXAMPLE PS C:\>Invoke-NSGetRnat6Nsip6Binding -Count Get the number of rnat6_nsip6_binding objects. .EXAMPLE PS C:\>Invoke-NSGetRnat6Nsip6Binding -name <string> Get rnat6_nsip6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnat6Nsip6Binding -Filter @{ 'name'='<value>' } Get rnat6_nsip6_binding data with a filter. .NOTES File Name : Invoke-NSGetRnat6Nsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat6_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRnat6Nsip6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all rnat6_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnat6_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnat6_nsip6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_nsip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnat6_nsip6_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_nsip6_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving rnat6_nsip6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat6_nsip6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnat6Nsip6Binding: Ended" } } function Invoke-NSGetRnatBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to rnat. .PARAMETER Name Name of the RNAT rule whose details you want to display. .PARAMETER GetAll Retrieve all rnat_binding object(s). .PARAMETER Count If specified, the count of the rnat_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnatBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetRnatBinding -GetAll Get all rnat_binding data. .EXAMPLE PS C:\>Invoke-NSGetRnatBinding -name <string> Get rnat_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnatBinding -Filter @{ 'name'='<value>' } Get rnat_binding data with a filter. .NOTES File Name : Invoke-NSGetRnatBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRnatBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all rnat_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnat_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnat_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnat_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving rnat_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnatBinding: Ended" } } function Invoke-NSAddRnatNsipBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to rnat. .PARAMETER Name Name of the RNAT rule to which to bind NAT IPs. .PARAMETER Natip Any NetScaler-owned IPv4 address except the NSIP address. The NetScaler appliance replaces the source IP addresses of server-generated packets with the IP address specified. The IP address must be a public NetScaler-owned IP address. If you specify multiple addresses for this field, NATIP selection uses the round robin algorithm for each session. By specifying a range of IP addresses, you can specify all NetScaler-owned IP addresses, except the NSIP, that fall within the specified range. .PARAMETER PassThru Return details about the created rnat_nsip_binding item. .EXAMPLE PS C:\>Invoke-NSAddRnatNsipBinding -name <string> An example how to add rnat_nsip_binding config Object(s). .NOTES File Name : Invoke-NSAddRnatNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateScript({ $_.Length -gt 1 })] [string]$Natip, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddRnatNsipBinding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('natip') ) { $payload.Add('natip', $natip) } if ( $PSCmdlet.ShouldProcess("rnat_nsip_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type rnat_nsip_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnatNsipBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddRnatNsipBinding: Finished" } } function Invoke-NSDeleteRnatNsipBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to rnat. .PARAMETER Name Name of the RNAT rule to which to bind NAT IPs. .PARAMETER Natip Any NetScaler-owned IPv4 address except the NSIP address. The NetScaler appliance replaces the source IP addresses of server-generated packets with the IP address specified. The IP address must be a public NetScaler-owned IP address. If you specify multiple addresses for this field, NATIP selection uses the round robin algorithm for each session. By specifying a range of IP addresses, you can specify all NetScaler-owned IP addresses, except the NSIP, that fall within the specified range. .EXAMPLE PS C:\>Invoke-NSDeleteRnatNsipBinding -Name <string> An example how to delete rnat_nsip_binding config Object(s). .NOTES File Name : Invoke-NSDeleteRnatNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Natip ) begin { Write-Verbose "Invoke-NSDeleteRnatNsipBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Natip') ) { $arguments.Add('natip', $Natip) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type rnat_nsip_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteRnatNsipBinding: Finished" } } function Invoke-NSGetRnatNsipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip that can be bound to rnat. .PARAMETER Name Name of the RNAT rule to which to bind NAT IPs. .PARAMETER GetAll Retrieve all rnat_nsip_binding object(s). .PARAMETER Count If specified, the count of the rnat_nsip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnatNsipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetRnatNsipBinding -GetAll Get all rnat_nsip_binding data. .EXAMPLE PS C:\>Invoke-NSGetRnatNsipBinding -Count Get the number of rnat_nsip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetRnatNsipBinding -name <string> Get rnat_nsip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnatNsipBinding -Filter @{ 'name'='<value>' } Get rnat_nsip_binding data with a filter. .NOTES File Name : Invoke-NSGetRnatNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRnatNsipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all rnat_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnat_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnat_nsip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_nsip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnat_nsip_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_nsip_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving rnat_nsip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_nsip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnatNsipBinding: Ended" } } function Invoke-NSAddRnatRetainsourceportsetBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the retainsourceportset that can be bound to rnat. .PARAMETER Name Name of the RNAT rule to which to bind NAT IPs. .PARAMETER Retainsourceportrange When the source port range is configured and associated with the RNAT rule, Citrix ADC will choose a port from the specified source port range configured for connection establishment at the backend servers. .PARAMETER PassThru Return details about the created rnat_retainsourceportset_binding item. .EXAMPLE PS C:\>Invoke-NSAddRnatRetainsourceportsetBinding -name <string> An example how to add rnat_retainsourceportset_binding config Object(s). .NOTES File Name : Invoke-NSAddRnatRetainsourceportsetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat_retainsourceportset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [ValidateLength(1024, 65535)] [string]$Retainsourceportrange, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddRnatRetainsourceportsetBinding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('retainsourceportrange') ) { $payload.Add('retainsourceportrange', $retainsourceportrange) } if ( $PSCmdlet.ShouldProcess("rnat_retainsourceportset_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type rnat_retainsourceportset_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnatRetainsourceportsetBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddRnatRetainsourceportsetBinding: Finished" } } function Invoke-NSDeleteRnatRetainsourceportsetBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the retainsourceportset that can be bound to rnat. .PARAMETER Name Name of the RNAT rule to which to bind NAT IPs. .PARAMETER Retainsourceportrange When the source port range is configured and associated with the RNAT rule, Citrix ADC will choose a port from the specified source port range configured for connection establishment at the backend servers. .EXAMPLE PS C:\>Invoke-NSDeleteRnatRetainsourceportsetBinding -Name <string> An example how to delete rnat_retainsourceportset_binding config Object(s). .NOTES File Name : Invoke-NSDeleteRnatRetainsourceportsetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat_retainsourceportset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [string]$Retainsourceportrange ) begin { Write-Verbose "Invoke-NSDeleteRnatRetainsourceportsetBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Retainsourceportrange') ) { $arguments.Add('retainsourceportrange', $Retainsourceportrange) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type rnat_retainsourceportset_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteRnatRetainsourceportsetBinding: Finished" } } function Invoke-NSGetRnatRetainsourceportsetBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the retainsourceportset that can be bound to rnat. .PARAMETER Name Name of the RNAT rule to which to bind NAT IPs. .PARAMETER GetAll Retrieve all rnat_retainsourceportset_binding object(s). .PARAMETER Count If specified, the count of the rnat_retainsourceportset_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnatRetainsourceportsetBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetRnatRetainsourceportsetBinding -GetAll Get all rnat_retainsourceportset_binding data. .EXAMPLE PS C:\>Invoke-NSGetRnatRetainsourceportsetBinding -Count Get the number of rnat_retainsourceportset_binding objects. .EXAMPLE PS C:\>Invoke-NSGetRnatRetainsourceportsetBinding -name <string> Get rnat_retainsourceportset_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnatRetainsourceportsetBinding -Filter @{ 'name'='<value>' } Get rnat_retainsourceportset_binding data with a filter. .NOTES File Name : Invoke-NSGetRnatRetainsourceportsetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnat_retainsourceportset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRnatRetainsourceportsetBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all rnat_retainsourceportset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_retainsourceportset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnat_retainsourceportset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_retainsourceportset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnat_retainsourceportset_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_retainsourceportset_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnat_retainsourceportset_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_retainsourceportset_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving rnat_retainsourceportset_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnat_retainsourceportset_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnatRetainsourceportsetBinding: Ended" } } function Invoke-NSAddRnatglobalAuditsyslogpolicyBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the auditsyslogpolicy that can be bound to rnatglobal. .PARAMETER Policy The policy Name. .PARAMETER Priority The priority of the policy. .PARAMETER PassThru Return details about the created rnatglobal_auditsyslogpolicy_binding item. .EXAMPLE PS C:\>Invoke-NSAddRnatglobalAuditsyslogpolicyBinding An example how to add rnatglobal_auditsyslogpolicy_binding config Object(s). .NOTES File Name : Invoke-NSAddRnatglobalAuditsyslogpolicyBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnatglobal_auditsyslogpolicy_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Policy, [double]$Priority, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddRnatglobalAuditsyslogpolicyBinding: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) } if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) } if ( $PSCmdlet.ShouldProcess("rnatglobal_auditsyslogpolicy_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type rnatglobal_auditsyslogpolicy_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetRnatglobalAuditsyslogpolicyBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddRnatglobalAuditsyslogpolicyBinding: Finished" } } function Invoke-NSDeleteRnatglobalAuditsyslogpolicyBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the auditsyslogpolicy that can be bound to rnatglobal. .PARAMETER Policy The policy Name. .PARAMETER All Remove all RNAT global config. .EXAMPLE PS C:\>Invoke-NSDeleteRnatglobalAuditsyslogpolicyBinding An example how to delete rnatglobal_auditsyslogpolicy_binding config Object(s). .NOTES File Name : Invoke-NSDeleteRnatglobalAuditsyslogpolicyBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnatglobal_auditsyslogpolicy_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Policy, [boolean]$All ) begin { Write-Verbose "Invoke-NSDeleteRnatglobalAuditsyslogpolicyBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) } if ( $PSBoundParameters.ContainsKey('All') ) { $arguments.Add('all', $All) } if ( $PSCmdlet.ShouldProcess("rnatglobal_auditsyslogpolicy_binding", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type rnatglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Resource $ -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteRnatglobalAuditsyslogpolicyBinding: Finished" } } function Invoke-NSGetRnatglobalAuditsyslogpolicyBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the auditsyslogpolicy that can be bound to rnatglobal. .PARAMETER GetAll Retrieve all rnatglobal_auditsyslogpolicy_binding object(s). .PARAMETER Count If specified, the count of the rnatglobal_auditsyslogpolicy_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalAuditsyslogpolicyBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalAuditsyslogpolicyBinding -GetAll Get all rnatglobal_auditsyslogpolicy_binding data. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalAuditsyslogpolicyBinding -Count Get the number of rnatglobal_auditsyslogpolicy_binding objects. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalAuditsyslogpolicyBinding -name <string> Get rnatglobal_auditsyslogpolicy_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalAuditsyslogpolicyBinding -Filter @{ 'name'='<value>' } Get rnatglobal_auditsyslogpolicy_binding data with a filter. .NOTES File Name : Invoke-NSGetRnatglobalAuditsyslogpolicyBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnatglobal_auditsyslogpolicy_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRnatglobalAuditsyslogpolicyBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all rnatglobal_auditsyslogpolicy_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnatglobal_auditsyslogpolicy_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnatglobal_auditsyslogpolicy_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnatglobal_auditsyslogpolicy_binding configuration for property ''" } else { Write-Verbose "Retrieving rnatglobal_auditsyslogpolicy_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnatglobalAuditsyslogpolicyBinding: Ended" } } function Invoke-NSGetRnatglobalBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to rnatglobal. .PARAMETER GetAll Retrieve all rnatglobal_binding object(s). .PARAMETER Count If specified, the count of the rnatglobal_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalBinding -GetAll Get all rnatglobal_binding data. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalBinding -name <string> Get rnatglobal_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnatglobalBinding -Filter @{ 'name'='<value>' } Get rnatglobal_binding data with a filter. .NOTES File Name : Invoke-NSGetRnatglobalBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnatglobal_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRnatglobalBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all rnatglobal_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnatglobal_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnatglobal_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatglobal_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnatglobal_binding configuration for property ''" } else { Write-Verbose "Retrieving rnatglobal_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatglobal_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnatglobalBinding: Ended" } } function Invoke-NSUpdateRnatparam { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for RNAT parameter resource. .PARAMETER Tcpproxy Enable TCP proxy, which enables the Citrix ADC to optimize the RNAT TCP traffic by using Layer 4 features. Possible values = ENABLED, DISABLED .PARAMETER Srcippersistency Enable source ip persistency, which enables the Citrix ADC to use the RNAT ips using source ip. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUpdateRnatparam An example how to update rnatparam config Object(s). .NOTES File Name : Invoke-NSUpdateRnatparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnatparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateSet('ENABLED', 'DISABLED')] [string]$Tcpproxy, [ValidateSet('ENABLED', 'DISABLED')] [string]$Srcippersistency ) begin { Write-Verbose "Invoke-NSUpdateRnatparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('tcpproxy') ) { $payload.Add('tcpproxy', $tcpproxy) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSCmdlet.ShouldProcess("rnatparam", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type rnatparam -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateRnatparam: Finished" } } function Invoke-NSUnsetRnatparam { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for RNAT parameter resource. .PARAMETER Tcpproxy Enable TCP proxy, which enables the Citrix ADC to optimize the RNAT TCP traffic by using Layer 4 features. Possible values = ENABLED, DISABLED .PARAMETER Srcippersistency Enable source ip persistency, which enables the Citrix ADC to use the RNAT ips using source ip. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetRnatparam An example how to unset rnatparam config Object(s). .NOTES File Name : Invoke-NSUnsetRnatparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnatparam Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$tcpproxy, [Boolean]$srcippersistency ) begin { Write-Verbose "Invoke-NSUnsetRnatparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('tcpproxy') ) { $payload.Add('tcpproxy', $tcpproxy) } if ( $PSBoundParameters.ContainsKey('srcippersistency') ) { $payload.Add('srcippersistency', $srcippersistency) } if ( $PSCmdlet.ShouldProcess("rnatparam", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type rnatparam -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetRnatparam: Finished" } } function Invoke-NSGetRnatparam { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for RNAT parameter resource. .PARAMETER GetAll Retrieve all rnatparam object(s). .PARAMETER Count If specified, the count of the rnatparam object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRnatparam Get data. .EXAMPLE PS C:\>Invoke-NSGetRnatparam -GetAll Get all rnatparam data. .EXAMPLE PS C:\>Invoke-NSGetRnatparam -name <string> Get rnatparam object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRnatparam -Filter @{ 'name'='<value>' } Get rnatparam data with a filter. .NOTES File Name : Invoke-NSGetRnatparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnatparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRnatparam: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all rnatparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rnatparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rnatparam objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatparam -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rnatparam configuration for property ''" } else { Write-Verbose "Retrieving rnatparam configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rnatparam -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRnatparam: Ended" } } function Invoke-NSFlushRnatsession { <# .SYNOPSIS Flush Networking commands. config Object. .DESCRIPTION Configuration for RNAT session resource. .PARAMETER Network IPv4 network address on whose traffic you want the Citrix ADC to do RNAT processing. .PARAMETER Netmask Subnet mask associated with the network address. .PARAMETER Natip The NAT IP address defined for the RNAT entry. .PARAMETER Aclname Name of any configured extended ACL whose action is ALLOW. .EXAMPLE PS C:\>Invoke-NSFlushRnatsession An example how to flush rnatsession config Object(s). .NOTES File Name : Invoke-NSFlushRnatsession Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rnatsession/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateScript({ $_.Length -gt 1 })] [string]$Network, [ValidateScript({ $_.Length -gt 1 })] [string]$Netmask, [ValidateScript({ $_.Length -gt 1 })] [string]$Natip, [ValidateScript({ $_.Length -gt 1 })] [string]$Aclname ) begin { Write-Verbose "Invoke-NSFlushRnatsession: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('network') ) { $payload.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('natip') ) { $payload.Add('natip', $natip) } if ( $PSBoundParameters.ContainsKey('aclname') ) { $payload.Add('aclname', $aclname) } if ( $PSCmdlet.ShouldProcess($Name, "Flush Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type rnatsession -Action flush -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSFlushRnatsession: Finished" } } function Invoke-NSAddRoute { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for route resource. .PARAMETER Network IPv4 network address for which to add a route entry in the routing table of the Citrix ADC. .PARAMETER Netmask The subnet mask associated with the network address. .PARAMETER Gateway IP address of the gateway for this route. Can be either the IP address of the gateway, or can be null to specify a null interface route. .PARAMETER Vlan VLAN as the gateway for this route. Maximum value = 4094 .PARAMETER Cost Positive integer used by the routing algorithms to determine preference for using this route. The lower the cost, the higher the preference. Maximum value = 65535 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Distance Administrative distance of this route, which determines the preference of this route over other routes, with same destination, from different routing protocols. A lower value is preferred. Maximum value = 255 .PARAMETER Cost1 The cost of a route is used to compare routes of the same type. The route having the lowest cost is the most preferred route. Possible values: 0 through 65535. Default: 0. Maximum value = 65535 .PARAMETER Weight Positive integer used by the routing algorithms to determine preference for this route over others of equal cost. The lower the weight, the higher the preference. Maximum value = 65535 .PARAMETER Advertise Advertise this route. Possible values = DISABLED, ENABLED .PARAMETER Protocol Routing protocol used for advertising this route. Possible values = OSPF, ISIS, RIP, BGP .PARAMETER Msr Monitor this route using a monitor of type ARP or PING. Possible values = ENABLED, DISABLED .PARAMETER Monitor Name of the monitor, of type ARP or PING, configured on the Citrix ADC to monitor this route. .PARAMETER Ownergroup The owner node group in a Cluster for this route. If owner node group is not specified then the route is treated as Striped route. .EXAMPLE PS C:\>Invoke-NSAddRoute -network <string> -netmask <string> An example how to add route config Object(s). .NOTES File Name : Invoke-NSAddRoute Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Network, [Parameter(Mandatory)] [string]$Netmask, [ValidateScript({ $_.Length -gt 1 })] [string]$Gateway, [double]$Vlan, [double]$Cost, [double]$Td, [double]$Distance = '1', [double]$Cost1, [double]$Weight = '1', [ValidateSet('DISABLED', 'ENABLED')] [string]$Advertise, [ValidateSet('OSPF', 'ISIS', 'RIP', 'BGP')] [string[]]$Protocol = 'ADV_ROUTE_FLAGS', [ValidateSet('ENABLED', 'DISABLED')] [string]$Msr = 'DISABLED', [ValidateScript({ $_.Length -gt 1 })] [string]$Monitor, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG' ) begin { Write-Verbose "Invoke-NSAddRoute: Starting" } process { try { $payload = @{ network = $network netmask = $netmask } if ( $PSBoundParameters.ContainsKey('gateway') ) { $payload.Add('gateway', $gateway) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('cost') ) { $payload.Add('cost', $cost) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('distance') ) { $payload.Add('distance', $distance) } if ( $PSBoundParameters.ContainsKey('cost1') ) { $payload.Add('cost1', $cost1) } if ( $PSBoundParameters.ContainsKey('weight') ) { $payload.Add('weight', $weight) } if ( $PSBoundParameters.ContainsKey('advertise') ) { $payload.Add('advertise', $advertise) } if ( $PSBoundParameters.ContainsKey('protocol') ) { $payload.Add('protocol', $protocol) } if ( $PSBoundParameters.ContainsKey('msr') ) { $payload.Add('msr', $msr) } if ( $PSBoundParameters.ContainsKey('monitor') ) { $payload.Add('monitor', $monitor) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("route", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type route -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddRoute: Finished" } } function Invoke-NSClearRoute { <# .SYNOPSIS Clear Networking commands. config Object. .DESCRIPTION Configuration for route resource. .PARAMETER Routetype Protocol used by routes that you want to remove from the routing table of the Citrix ADC. Possible values = CONNECTED, STATIC, DYNAMIC, OSPF, ISIS, RIP, BGP .EXAMPLE PS C:\>Invoke-NSClearRoute -routetype <string> An example how to clear route config Object(s). .NOTES File Name : Invoke-NSClearRoute Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateSet('CONNECTED', 'STATIC', 'DYNAMIC', 'OSPF', 'ISIS', 'RIP', 'BGP')] [string]$Routetype ) begin { Write-Verbose "Invoke-NSClearRoute: Starting" } process { try { $payload = @{ routetype = $routetype } if ( $PSCmdlet.ShouldProcess($Name, "Clear Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type route -Action clear -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSClearRoute: Finished" } } function Invoke-NSDeleteRoute { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for route resource. .PARAMETER Network IPv4 network address for which to add a route entry in the routing table of the Citrix ADC. .PARAMETER Netmask The subnet mask associated with the network address. .PARAMETER Gateway IP address of the gateway for this route. Can be either the IP address of the gateway, or can be null to specify a null interface route. .PARAMETER Vlan VLAN as the gateway for this route. Maximum value = 4094 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this route. If owner node group is not specified then the route is treated as Striped route. .EXAMPLE PS C:\>Invoke-NSDeleteRoute -Network <string> An example how to delete route config Object(s). .NOTES File Name : Invoke-NSDeleteRoute Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Network, [string]$Netmask, [string]$Gateway, [double]$Vlan, [double]$Td, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteRoute: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSBoundParameters.ContainsKey('Gateway') ) { $arguments.Add('gateway', $Gateway) } if ( $PSBoundParameters.ContainsKey('Vlan') ) { $arguments.Add('vlan', $Vlan) } if ( $PSBoundParameters.ContainsKey('Td') ) { $arguments.Add('td', $Td) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$network", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type route -NitroPath nitro/v1/config -Resource $network -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteRoute: Finished" } } function Invoke-NSUpdateRoute { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for route resource. .PARAMETER Network IPv4 network address for which to add a route entry in the routing table of the Citrix ADC. .PARAMETER Netmask The subnet mask associated with the network address. .PARAMETER Gateway IP address of the gateway for this route. Can be either the IP address of the gateway, or can be null to specify a null interface route. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Distance Administrative distance of this route, which determines the preference of this route over other routes, with same destination, from different routing protocols. A lower value is preferred. Maximum value = 255 .PARAMETER Cost1 The cost of a route is used to compare routes of the same type. The route having the lowest cost is the most preferred route. Possible values: 0 through 65535. Default: 0. Maximum value = 65535 .PARAMETER Weight Positive integer used by the routing algorithms to determine preference for this route over others of equal cost. The lower the weight, the higher the preference. Maximum value = 65535 .PARAMETER Advertise Advertise this route. Possible values = DISABLED, ENABLED .PARAMETER Protocol Routing protocol used for advertising this route. Possible values = OSPF, ISIS, RIP, BGP .PARAMETER Msr Monitor this route using a monitor of type ARP or PING. Possible values = ENABLED, DISABLED .PARAMETER Monitor Name of the monitor, of type ARP or PING, configured on the Citrix ADC to monitor this route. .EXAMPLE PS C:\>Invoke-NSUpdateRoute -network <string> -netmask <string> -gateway <string> An example how to update route config Object(s). .NOTES File Name : Invoke-NSUpdateRoute Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Network, [Parameter(Mandatory)] [string]$Netmask, [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Gateway, [double]$Td, [double]$Distance, [double]$Cost1, [double]$Weight, [ValidateSet('DISABLED', 'ENABLED')] [string]$Advertise, [ValidateSet('OSPF', 'ISIS', 'RIP', 'BGP')] [string[]]$Protocol, [ValidateSet('ENABLED', 'DISABLED')] [string]$Msr, [ValidateScript({ $_.Length -gt 1 })] [string]$Monitor ) begin { Write-Verbose "Invoke-NSUpdateRoute: Starting" } process { try { $payload = @{ network = $network netmask = $netmask gateway = $gateway } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('distance') ) { $payload.Add('distance', $distance) } if ( $PSBoundParameters.ContainsKey('cost1') ) { $payload.Add('cost1', $cost1) } if ( $PSBoundParameters.ContainsKey('weight') ) { $payload.Add('weight', $weight) } if ( $PSBoundParameters.ContainsKey('advertise') ) { $payload.Add('advertise', $advertise) } if ( $PSBoundParameters.ContainsKey('protocol') ) { $payload.Add('protocol', $protocol) } if ( $PSBoundParameters.ContainsKey('msr') ) { $payload.Add('msr', $msr) } if ( $PSBoundParameters.ContainsKey('monitor') ) { $payload.Add('monitor', $monitor) } if ( $PSCmdlet.ShouldProcess("route", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type route -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateRoute: Finished" } } function Invoke-NSUnsetRoute { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for route resource. .PARAMETER Network IPv4 network address for which to add a route entry in the routing table of the Citrix ADC. .PARAMETER Netmask The subnet mask associated with the network address. .PARAMETER Gateway IP address of the gateway for this route. Can be either the IP address of the gateway, or can be null to specify a null interface route. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Advertise Advertise this route. Possible values = DISABLED, ENABLED .PARAMETER Distance Administrative distance of this route, which determines the preference of this route over other routes, with same destination, from different routing protocols. A lower value is preferred. Maximum value = 255 .PARAMETER Cost1 The cost of a route is used to compare routes of the same type. The route having the lowest cost is the most preferred route. Possible values: 0 through 65535. Default: 0. Maximum value = 65535 .PARAMETER Weight Positive integer used by the routing algorithms to determine preference for this route over others of equal cost. The lower the weight, the higher the preference. Maximum value = 65535 .PARAMETER Protocol Routing protocol used for advertising this route. Possible values = OSPF, ISIS, RIP, BGP .PARAMETER Msr Monitor this route using a monitor of type ARP or PING. Possible values = ENABLED, DISABLED .PARAMETER Monitor Name of the monitor, of type ARP or PING, configured on the Citrix ADC to monitor this route. .EXAMPLE PS C:\>Invoke-NSUnsetRoute -network <string> -netmask <string> -gateway <string> An example how to unset route config Object(s). .NOTES File Name : Invoke-NSUnsetRoute Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Network, [string]$Netmask, [ValidateScript({ $_.Length -gt 1 })] [string]$Gateway, [Boolean]$td, [Boolean]$advertise, [Boolean]$distance, [Boolean]$cost1, [Boolean]$weight, [Boolean]$protocol, [Boolean]$msr, [Boolean]$monitor ) begin { Write-Verbose "Invoke-NSUnsetRoute: Starting" } process { try { $payload = @{ network = $network netmask = $netmask gateway = $gateway } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('advertise') ) { $payload.Add('advertise', $advertise) } if ( $PSBoundParameters.ContainsKey('distance') ) { $payload.Add('distance', $distance) } if ( $PSBoundParameters.ContainsKey('cost1') ) { $payload.Add('cost1', $cost1) } if ( $PSBoundParameters.ContainsKey('weight') ) { $payload.Add('weight', $weight) } if ( $PSBoundParameters.ContainsKey('protocol') ) { $payload.Add('protocol', $protocol) } if ( $PSBoundParameters.ContainsKey('msr') ) { $payload.Add('msr', $msr) } if ( $PSBoundParameters.ContainsKey('monitor') ) { $payload.Add('monitor', $monitor) } if ( $PSCmdlet.ShouldProcess("$network netmask gateway", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type route -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetRoute: Finished" } } function Invoke-NSGetRoute { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for route resource. .PARAMETER Network IPv4 network address for which to add a route entry in the routing table of the Citrix ADC. .PARAMETER Netmask The subnet mask associated with the network address. .PARAMETER Gateway IP address of the gateway for this route. Can be either the IP address of the gateway, or can be null to specify a null interface route. .PARAMETER Vlan VLAN as the gateway for this route. Maximum value = 4094 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Routetype Protocol used by routes that you want to remove from the routing table of the Citrix ADC. Possible values = CONNECTED, STATIC, DYNAMIC, OSPF, ISIS, RIP, BGP .PARAMETER Detail Display a detailed view. .PARAMETER GetAll Retrieve all route object(s). .PARAMETER Count If specified, the count of the route object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRoute Get data. .EXAMPLE PS C:\>Invoke-NSGetRoute -GetAll Get all route data. .EXAMPLE PS C:\>Invoke-NSGetRoute -Count Get the number of route objects. .EXAMPLE PS C:\>Invoke-NSGetRoute -name <string> Get route object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRoute -Filter @{ 'name'='<value>' } Get route data with a filter. .NOTES File Name : Invoke-NSGetRoute Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByArgument')] [string]$Network, [Parameter(ParameterSetName = 'GetByArgument')] [string]$Netmask, [Parameter(ParameterSetName = 'GetByArgument')] [ValidateScript({ $_.Length -gt 1 })] [string]$Gateway, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Vlan, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Td, [Parameter(ParameterSetName = 'GetByArgument')] [ValidateSet('CONNECTED', 'STATIC', 'DYNAMIC', 'OSPF', 'ISIS', 'RIP', 'BGP')] [string]$Routetype, [Parameter(ParameterSetName = 'GetByArgument')] [boolean]$Detail, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetRoute: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all route objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type route -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for route objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type route -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving route objects by arguments" $arguments = @{ } if ( $PSBoundParameters.ContainsKey('network') ) { $arguments.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $arguments.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('gateway') ) { $arguments.Add('gateway', $gateway) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $arguments.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('td') ) { $arguments.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('routetype') ) { $arguments.Add('routetype', $routetype) } if ( $PSBoundParameters.ContainsKey('detail') ) { $arguments.Add('detail', $detail) } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type route -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving route configuration for property ''" } else { Write-Verbose "Retrieving route configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type route -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRoute: Ended" } } function Invoke-NSAddRoute6 { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for route 6 resource. .PARAMETER Network IPv6 network address for which to add a route entry to the routing table of the Citrix ADC. .PARAMETER Gateway The gateway for this route. The value for this parameter is either an IPv6 address or null. .PARAMETER Vlan Integer value that uniquely identifies a VLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 4094 .PARAMETER Vxlan Integer value that uniquely identifies a VXLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 16777215 .PARAMETER Weight Positive integer used by the routing algorithms to determine preference for this route over others of equal cost. The lower the weight, the higher the preference. Maximum value = 65535 .PARAMETER Distance Administrative distance of this route from the appliance. Maximum value = 254 .PARAMETER Cost Positive integer used by the routing algorithms to determine preference for this route. The lower the cost, the higher the preference. Maximum value = 65535 .PARAMETER Advertise Advertise this route. Possible values = DISABLED, ENABLED .PARAMETER Msr Monitor this route with a monitor of type ND6 or PING. Possible values = ENABLED, DISABLED .PARAMETER Monitor Name of the monitor, of type ND6 or PING, configured on the Citrix ADC to monitor this route. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this route6. If owner node group is not specified then the route is treated as Striped route. .EXAMPLE PS C:\>Invoke-NSAddRoute6 -network <string> An example how to add route6 config Object(s). .NOTES File Name : Invoke-NSAddRoute6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Network, [string]$Gateway = '0', [double]$Vlan = '0', [double]$Vxlan, [double]$Weight = '1', [double]$Distance = '1', [double]$Cost = '1', [ValidateSet('DISABLED', 'ENABLED')] [string]$Advertise, [ValidateSet('ENABLED', 'DISABLED')] [string]$Msr = 'DISABLED', [ValidateScript({ $_.Length -gt 1 })] [string]$Monitor, [double]$Td, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG' ) begin { Write-Verbose "Invoke-NSAddRoute6: Starting" } process { try { $payload = @{ network = $network } if ( $PSBoundParameters.ContainsKey('gateway') ) { $payload.Add('gateway', $gateway) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('vxlan') ) { $payload.Add('vxlan', $vxlan) } if ( $PSBoundParameters.ContainsKey('weight') ) { $payload.Add('weight', $weight) } if ( $PSBoundParameters.ContainsKey('distance') ) { $payload.Add('distance', $distance) } if ( $PSBoundParameters.ContainsKey('cost') ) { $payload.Add('cost', $cost) } if ( $PSBoundParameters.ContainsKey('advertise') ) { $payload.Add('advertise', $advertise) } if ( $PSBoundParameters.ContainsKey('msr') ) { $payload.Add('msr', $msr) } if ( $PSBoundParameters.ContainsKey('monitor') ) { $payload.Add('monitor', $monitor) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("route6", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type route6 -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddRoute6: Finished" } } function Invoke-NSClearRoute6 { <# .SYNOPSIS Clear Networking commands. config Object. .DESCRIPTION Configuration for route 6 resource. .PARAMETER Routetype Type of IPv6 routes to remove from the routing table of the Citrix ADC. Possible values = CONNECTED, STATIC, DYNAMIC, OSPF, ISIS, BGP, RIP, ND-RA-ROUTE, FIB6 .EXAMPLE PS C:\>Invoke-NSClearRoute6 -routetype <string> An example how to clear route6 config Object(s). .NOTES File Name : Invoke-NSClearRoute6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateSet('CONNECTED', 'STATIC', 'DYNAMIC', 'OSPF', 'ISIS', 'BGP', 'RIP', 'ND-RA-ROUTE', 'FIB6')] [string]$Routetype ) begin { Write-Verbose "Invoke-NSClearRoute6: Starting" } process { try { $payload = @{ routetype = $routetype } if ( $PSCmdlet.ShouldProcess($Name, "Clear Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type route6 -Action clear -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSClearRoute6: Finished" } } function Invoke-NSDeleteRoute6 { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for route 6 resource. .PARAMETER Network IPv6 network address for which to add a route entry to the routing table of the Citrix ADC. .PARAMETER Gateway The gateway for this route. The value for this parameter is either an IPv6 address or null. .PARAMETER Vlan Integer value that uniquely identifies a VLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 4094 .PARAMETER Vxlan Integer value that uniquely identifies a VXLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 16777215 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this route6. If owner node group is not specified then the route is treated as Striped route. .EXAMPLE PS C:\>Invoke-NSDeleteRoute6 -Network <string> An example how to delete route6 config Object(s). .NOTES File Name : Invoke-NSDeleteRoute6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Network, [string]$Gateway, [double]$Vlan, [double]$Vxlan, [double]$Td, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteRoute6: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Gateway') ) { $arguments.Add('gateway', $Gateway) } if ( $PSBoundParameters.ContainsKey('Vlan') ) { $arguments.Add('vlan', $Vlan) } if ( $PSBoundParameters.ContainsKey('Vxlan') ) { $arguments.Add('vxlan', $Vxlan) } if ( $PSBoundParameters.ContainsKey('Td') ) { $arguments.Add('td', $Td) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$network", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type route6 -NitroPath nitro/v1/config -Resource $network -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteRoute6: Finished" } } function Invoke-NSUpdateRoute6 { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for route 6 resource. .PARAMETER Network IPv6 network address for which to add a route entry to the routing table of the Citrix ADC. .PARAMETER Gateway The gateway for this route. The value for this parameter is either an IPv6 address or null. .PARAMETER Vlan Integer value that uniquely identifies a VLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 4094 .PARAMETER Vxlan Integer value that uniquely identifies a VXLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 16777215 .PARAMETER Weight Positive integer used by the routing algorithms to determine preference for this route over others of equal cost. The lower the weight, the higher the preference. Maximum value = 65535 .PARAMETER Distance Administrative distance of this route from the appliance. Maximum value = 254 .PARAMETER Cost Positive integer used by the routing algorithms to determine preference for this route. The lower the cost, the higher the preference. Maximum value = 65535 .PARAMETER Advertise Advertise this route. Possible values = DISABLED, ENABLED .PARAMETER Msr Monitor this route with a monitor of type ND6 or PING. Possible values = ENABLED, DISABLED .PARAMETER Monitor Name of the monitor, of type ND6 or PING, configured on the Citrix ADC to monitor this route. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .EXAMPLE PS C:\>Invoke-NSUpdateRoute6 -network <string> An example how to update route6 config Object(s). .NOTES File Name : Invoke-NSUpdateRoute6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Network, [string]$Gateway, [double]$Vlan, [double]$Vxlan, [double]$Weight, [double]$Distance, [double]$Cost, [ValidateSet('DISABLED', 'ENABLED')] [string]$Advertise, [ValidateSet('ENABLED', 'DISABLED')] [string]$Msr, [ValidateScript({ $_.Length -gt 1 })] [string]$Monitor, [double]$Td ) begin { Write-Verbose "Invoke-NSUpdateRoute6: Starting" } process { try { $payload = @{ network = $network } if ( $PSBoundParameters.ContainsKey('gateway') ) { $payload.Add('gateway', $gateway) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('vxlan') ) { $payload.Add('vxlan', $vxlan) } if ( $PSBoundParameters.ContainsKey('weight') ) { $payload.Add('weight', $weight) } if ( $PSBoundParameters.ContainsKey('distance') ) { $payload.Add('distance', $distance) } if ( $PSBoundParameters.ContainsKey('cost') ) { $payload.Add('cost', $cost) } if ( $PSBoundParameters.ContainsKey('advertise') ) { $payload.Add('advertise', $advertise) } if ( $PSBoundParameters.ContainsKey('msr') ) { $payload.Add('msr', $msr) } if ( $PSBoundParameters.ContainsKey('monitor') ) { $payload.Add('monitor', $monitor) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSCmdlet.ShouldProcess("route6", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type route6 -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateRoute6: Finished" } } function Invoke-NSUnsetRoute6 { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for route 6 resource. .PARAMETER Network IPv6 network address for which to add a route entry to the routing table of the Citrix ADC. .PARAMETER Gateway The gateway for this route. The value for this parameter is either an IPv6 address or null. .PARAMETER Vlan Integer value that uniquely identifies a VLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 4094 .PARAMETER Vxlan Integer value that uniquely identifies a VXLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 16777215 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Weight Positive integer used by the routing algorithms to determine preference for this route over others of equal cost. The lower the weight, the higher the preference. Maximum value = 65535 .PARAMETER Distance Administrative distance of this route from the appliance. Maximum value = 254 .PARAMETER Cost Positive integer used by the routing algorithms to determine preference for this route. The lower the cost, the higher the preference. Maximum value = 65535 .PARAMETER Advertise Advertise this route. Possible values = DISABLED, ENABLED .PARAMETER Msr Monitor this route with a monitor of type ND6 or PING. Possible values = ENABLED, DISABLED .PARAMETER Monitor Name of the monitor, of type ND6 or PING, configured on the Citrix ADC to monitor this route. .EXAMPLE PS C:\>Invoke-NSUnsetRoute6 -network <string> An example how to unset route6 config Object(s). .NOTES File Name : Invoke-NSUnsetRoute6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route6 Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [string]$Network, [Boolean]$gateway, [Boolean]$vlan, [Boolean]$vxlan, [Boolean]$td, [Boolean]$weight, [Boolean]$distance, [Boolean]$cost, [Boolean]$advertise, [Boolean]$msr, [Boolean]$monitor ) begin { Write-Verbose "Invoke-NSUnsetRoute6: Starting" } process { try { $payload = @{ network = $network } if ( $PSBoundParameters.ContainsKey('gateway') ) { $payload.Add('gateway', $gateway) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('vxlan') ) { $payload.Add('vxlan', $vxlan) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('weight') ) { $payload.Add('weight', $weight) } if ( $PSBoundParameters.ContainsKey('distance') ) { $payload.Add('distance', $distance) } if ( $PSBoundParameters.ContainsKey('cost') ) { $payload.Add('cost', $cost) } if ( $PSBoundParameters.ContainsKey('advertise') ) { $payload.Add('advertise', $advertise) } if ( $PSBoundParameters.ContainsKey('msr') ) { $payload.Add('msr', $msr) } if ( $PSBoundParameters.ContainsKey('monitor') ) { $payload.Add('monitor', $monitor) } if ( $PSCmdlet.ShouldProcess("$network", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type route6 -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetRoute6: Finished" } } function Invoke-NSGetRoute6 { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for route 6 resource. .PARAMETER Network IPv6 network address for which to add a route entry to the routing table of the Citrix ADC. .PARAMETER Gateway The gateway for this route. The value for this parameter is either an IPv6 address or null. .PARAMETER Vlan Integer value that uniquely identifies a VLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 4094 .PARAMETER Vxlan Integer value that uniquely identifies a VXLAN through which the Citrix ADC forwards the packets for this route. Maximum value = 16777215 .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Routetype Type of IPv6 routes to remove from the routing table of the Citrix ADC. Possible values = CONNECTED, STATIC, DYNAMIC, OSPF, ISIS, BGP, RIP, ND-RA-ROUTE, FIB6 .PARAMETER Detail To get a detailed view. .PARAMETER GetAll Retrieve all route6 object(s). .PARAMETER Count If specified, the count of the route6 object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRoute6 Get data. .EXAMPLE PS C:\>Invoke-NSGetRoute6 -GetAll Get all route6 data. .EXAMPLE PS C:\>Invoke-NSGetRoute6 -Count Get the number of route6 objects. .EXAMPLE PS C:\>Invoke-NSGetRoute6 -name <string> Get route6 object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRoute6 -Filter @{ 'name'='<value>' } Get route6 data with a filter. .NOTES File Name : Invoke-NSGetRoute6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/route6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByArgument')] [string]$Network, [Parameter(ParameterSetName = 'GetByArgument')] [string]$Gateway, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Vlan, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Vxlan, [Parameter(ParameterSetName = 'GetByArgument')] [double]$Td, [Parameter(ParameterSetName = 'GetByArgument')] [ValidateSet('CONNECTED', 'STATIC', 'DYNAMIC', 'OSPF', 'ISIS', 'BGP', 'RIP', 'ND-RA-ROUTE', 'FIB6')] [string]$Routetype, [Parameter(ParameterSetName = 'GetByArgument')] [boolean]$Detail, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetRoute6: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all route6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type route6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for route6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type route6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving route6 objects by arguments" $arguments = @{ } if ( $PSBoundParameters.ContainsKey('network') ) { $arguments.Add('network', $network) } if ( $PSBoundParameters.ContainsKey('gateway') ) { $arguments.Add('gateway', $gateway) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $arguments.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('vxlan') ) { $arguments.Add('vxlan', $vxlan) } if ( $PSBoundParameters.ContainsKey('td') ) { $arguments.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('routetype') ) { $arguments.Add('routetype', $routetype) } if ( $PSBoundParameters.ContainsKey('detail') ) { $arguments.Add('detail', $detail) } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type route6 -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving route6 configuration for property ''" } else { Write-Verbose "Retrieving route6 configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type route6 -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRoute6: Ended" } } function Invoke-NSUpdateRsskeytype { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for RSS key type resource. .PARAMETER Rsstype Type of RSS key, possible values are SYMMETRIC and ASYMMETRIC. Possible values = ASYMMETRIC, SYMMETRIC .EXAMPLE PS C:\>Invoke-NSUpdateRsskeytype -rsstype <string> An example how to update rsskeytype config Object(s). .NOTES File Name : Invoke-NSUpdateRsskeytype Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rsskeytype/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateSet('ASYMMETRIC', 'SYMMETRIC')] [string]$Rsstype ) begin { Write-Verbose "Invoke-NSUpdateRsskeytype: Starting" } process { try { $payload = @{ rsstype = $rsstype } if ( $PSCmdlet.ShouldProcess("rsskeytype", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type rsskeytype -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateRsskeytype: Finished" } } function Invoke-NSGetRsskeytype { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for RSS key type resource. .PARAMETER GetAll Retrieve all rsskeytype object(s). .PARAMETER Count If specified, the count of the rsskeytype object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetRsskeytype Get data. .EXAMPLE PS C:\>Invoke-NSGetRsskeytype -GetAll Get all rsskeytype data. .EXAMPLE PS C:\>Invoke-NSGetRsskeytype -name <string> Get rsskeytype object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetRsskeytype -Filter @{ 'name'='<value>' } Get rsskeytype data with a filter. .NOTES File Name : Invoke-NSGetRsskeytype Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/rsskeytype/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetRsskeytype: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all rsskeytype objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rsskeytype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for rsskeytype objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rsskeytype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving rsskeytype objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rsskeytype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving rsskeytype configuration for property ''" } else { Write-Verbose "Retrieving rsskeytype configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type rsskeytype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetRsskeytype: Ended" } } function Invoke-NSAddVlan { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for "VLAN" resource. .PARAMETER Id A positive integer that uniquely identifies a VLAN. Maximum value = 4094 .PARAMETER Aliasname A name for the VLAN. Must begin with a letter, a number, or the underscore symbol, and can consist of from 1 to 31 letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore (_) characters. You should choose a name that helps identify the VLAN. However, you cannot perform any VLAN operation by specifying this name instead of the VLAN ID. .PARAMETER Dynamicrouting Enable dynamic routing on this VLAN. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on this VLAN. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .PARAMETER Mtu Specifies the maximum transmission unit (MTU), in bytes. The MTU is the largest packet size, excluding 14 bytes of ethernet header and 4 bytes of crc, that can be transmitted and received over this VLAN. Maximum value = 9216 .PARAMETER Sharing If sharing is enabled, then this vlan can be shared across multiple partitions by binding it to all those partitions. If sharing is disabled, then this vlan can be bound to only one of the partitions. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created vlan item. .EXAMPLE PS C:\>Invoke-NSAddVlan -id <double> An example how to add vlan config Object(s). .NOTES File Name : Invoke-NSAddVlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Aliasname, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dynamicrouting = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Ipv6dynamicrouting = 'DISABLED', [double]$Mtu = '0', [ValidateSet('ENABLED', 'DISABLED')] [string]$Sharing = 'DISABLED', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVlan: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('aliasname') ) { $payload.Add('aliasname', $aliasname) } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSBoundParameters.ContainsKey('mtu') ) { $payload.Add('mtu', $mtu) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSCmdlet.ShouldProcess("vlan", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type vlan -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVlan -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVlan: Finished" } } function Invoke-NSDeleteVlan { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for "VLAN" resource. .PARAMETER Id A positive integer that uniquely identifies a VLAN. Maximum value = 4094 .EXAMPLE PS C:\>Invoke-NSDeleteVlan -Id <double> An example how to delete vlan config Object(s). .NOTES File Name : Invoke-NSDeleteVlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id ) begin { Write-Verbose "Invoke-NSDeleteVlan: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vlan -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVlan: Finished" } } function Invoke-NSUpdateVlan { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for "VLAN" resource. .PARAMETER Id A positive integer that uniquely identifies a VLAN. Maximum value = 4094 .PARAMETER Aliasname A name for the VLAN. Must begin with a letter, a number, or the underscore symbol, and can consist of from 1 to 31 letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore (_) characters. You should choose a name that helps identify the VLAN. However, you cannot perform any VLAN operation by specifying this name instead of the VLAN ID. .PARAMETER Dynamicrouting Enable dynamic routing on this VLAN. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on this VLAN. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .PARAMETER Mtu Specifies the maximum transmission unit (MTU), in bytes. The MTU is the largest packet size, excluding 14 bytes of ethernet header and 4 bytes of crc, that can be transmitted and received over this VLAN. Maximum value = 9216 .PARAMETER Sharing If sharing is enabled, then this vlan can be shared across multiple partitions by binding it to all those partitions. If sharing is disabled, then this vlan can be bound to only one of the partitions. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created vlan item. .EXAMPLE PS C:\>Invoke-NSUpdateVlan -id <double> An example how to update vlan config Object(s). .NOTES File Name : Invoke-NSUpdateVlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Aliasname, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dynamicrouting, [ValidateSet('ENABLED', 'DISABLED')] [string]$Ipv6dynamicrouting, [double]$Mtu, [ValidateSet('ENABLED', 'DISABLED')] [string]$Sharing, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateVlan: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('aliasname') ) { $payload.Add('aliasname', $aliasname) } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSBoundParameters.ContainsKey('mtu') ) { $payload.Add('mtu', $mtu) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSCmdlet.ShouldProcess("vlan", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vlan -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVlan -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateVlan: Finished" } } function Invoke-NSUnsetVlan { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for "VLAN" resource. .PARAMETER Id A positive integer that uniquely identifies a VLAN. Maximum value = 4094 .PARAMETER Aliasname A name for the VLAN. Must begin with a letter, a number, or the underscore symbol, and can consist of from 1 to 31 letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at sign (@), equals (=), colon (:), and underscore (_) characters. You should choose a name that helps identify the VLAN. However, you cannot perform any VLAN operation by specifying this name instead of the VLAN ID. .PARAMETER Dynamicrouting Enable dynamic routing on this VLAN. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on this VLAN. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .PARAMETER Mtu Specifies the maximum transmission unit (MTU), in bytes. The MTU is the largest packet size, excluding 14 bytes of ethernet header and 4 bytes of crc, that can be transmitted and received over this VLAN. Maximum value = 9216 .PARAMETER Sharing If sharing is enabled, then this vlan can be shared across multiple partitions by binding it to all those partitions. If sharing is disabled, then this vlan can be bound to only one of the partitions. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetVlan -id <double> An example how to unset vlan config Object(s). .NOTES File Name : Invoke-NSUnsetVlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Id, [Boolean]$aliasname, [Boolean]$dynamicrouting, [Boolean]$ipv6dynamicrouting, [Boolean]$mtu, [Boolean]$sharing ) begin { Write-Verbose "Invoke-NSUnsetVlan: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('aliasname') ) { $payload.Add('aliasname', $aliasname) } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSBoundParameters.ContainsKey('mtu') ) { $payload.Add('mtu', $mtu) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSCmdlet.ShouldProcess("$id", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type vlan -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetVlan: Finished" } } function Invoke-NSGetVlan { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for "VLAN" resource. .PARAMETER Id A positive integer that uniquely identifies a VLAN. Maximum value = 4094 .PARAMETER GetAll Retrieve all vlan object(s). .PARAMETER Count If specified, the count of the vlan object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVlan Get data. .EXAMPLE PS C:\>Invoke-NSGetVlan -GetAll Get all vlan data. .EXAMPLE PS C:\>Invoke-NSGetVlan -Count Get the number of vlan objects. .EXAMPLE PS C:\>Invoke-NSGetVlan -name <string> Get vlan object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVlan -Filter @{ 'name'='<value>' } Get vlan data with a filter. .NOTES File Name : Invoke-NSGetVlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetVlan: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all vlan objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vlan objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vlan objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vlan configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vlan configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVlan: Ended" } } function Invoke-NSGetVlanBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to vlan. .PARAMETER Id Integer that uniquely identifies the VLAN for which the details are to be displayed. Maximum value = 4094 .PARAMETER GetAll Retrieve all vlan_binding object(s). .PARAMETER Count If specified, the count of the vlan_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVlanBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVlanBinding -GetAll Get all vlan_binding data. .EXAMPLE PS C:\>Invoke-NSGetVlanBinding -name <string> Get vlan_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVlanBinding -Filter @{ 'name'='<value>' } Get vlan_binding data with a filter. .NOTES File Name : Invoke-NSGetVlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVlanBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vlan_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vlan_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vlan_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVlanBinding: Ended" } } function Invoke-NSAddVlanChannelBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ifnum The interface to be bound to the VLAN, specified in slot/port notation (for example, 1/3). .PARAMETER Tagged Make the interface an 802.1q tagged interface. Packets sent on this interface on this VLAN have an additional 4-byte 802.1q tag, which identifies the VLAN. To use 802.1q tagging, you must also configure the switch connected to the appliance's interfaces. .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .PARAMETER PassThru Return details about the created vlan_channel_binding item. .EXAMPLE PS C:\>Invoke-NSAddVlanChannelBinding -id <double> An example how to add vlan_channel_binding config Object(s). .NOTES File Name : Invoke-NSAddVlanChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [ValidateScript({ $_.Length -gt 1 })] [string]$Ifnum, [boolean]$Tagged, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVlanChannelBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSBoundParameters.ContainsKey('tagged') ) { $payload.Add('tagged', $tagged) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("vlan_channel_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vlan_channel_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVlanChannelBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVlanChannelBinding: Finished" } } function Invoke-NSDeleteVlanChannelBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ifnum The interface to be bound to the VLAN, specified in slot/port notation (for example, 1/3). .PARAMETER Tagged Make the interface an 802.1q tagged interface. Packets sent on this interface on this VLAN have an additional 4-byte 802.1q tag, which identifies the VLAN. To use 802.1q tagging, you must also configure the switch connected to the appliance's interfaces. .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .EXAMPLE PS C:\>Invoke-NSDeleteVlanChannelBinding -Id <double> An example how to delete vlan_channel_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVlanChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum, [boolean]$Tagged, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteVlanChannelBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSBoundParameters.ContainsKey('Tagged') ) { $arguments.Add('tagged', $Tagged) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vlan_channel_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVlanChannelBinding: Finished" } } function Invoke-NSGetVlanChannelBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the channel that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER GetAll Retrieve all vlan_channel_binding object(s). .PARAMETER Count If specified, the count of the vlan_channel_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVlanChannelBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVlanChannelBinding -GetAll Get all vlan_channel_binding data. .EXAMPLE PS C:\>Invoke-NSGetVlanChannelBinding -Count Get the number of vlan_channel_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVlanChannelBinding -name <string> Get vlan_channel_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVlanChannelBinding -Filter @{ 'name'='<value>' } Get vlan_channel_binding data with a filter. .NOTES File Name : Invoke-NSGetVlanChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVlanChannelBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vlan_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vlan_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vlan_channel_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_channel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vlan_channel_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_channel_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vlan_channel_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_channel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVlanChannelBinding: Ended" } } function Invoke-NSAddVlanInterfaceBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ifnum The interface to be bound to the VLAN, specified in slot/port notation (for example, 1/3). .PARAMETER Tagged Make the interface an 802.1q tagged interface. Packets sent on this interface on this VLAN have an additional 4-byte 802.1q tag, which identifies the VLAN. To use 802.1q tagging, you must also configure the switch connected to the appliance's interfaces. .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .PARAMETER PassThru Return details about the created vlan_interface_binding item. .EXAMPLE PS C:\>Invoke-NSAddVlanInterfaceBinding -id <double> An example how to add vlan_interface_binding config Object(s). .NOTES File Name : Invoke-NSAddVlanInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [ValidateScript({ $_.Length -gt 1 })] [string]$Ifnum, [boolean]$Tagged, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVlanInterfaceBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSBoundParameters.ContainsKey('tagged') ) { $payload.Add('tagged', $tagged) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("vlan_interface_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vlan_interface_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVlanInterfaceBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVlanInterfaceBinding: Finished" } } function Invoke-NSDeleteVlanInterfaceBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ifnum The interface to be bound to the VLAN, specified in slot/port notation (for example, 1/3). .PARAMETER Tagged Make the interface an 802.1q tagged interface. Packets sent on this interface on this VLAN have an additional 4-byte 802.1q tag, which identifies the VLAN. To use 802.1q tagging, you must also configure the switch connected to the appliance's interfaces. .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .EXAMPLE PS C:\>Invoke-NSDeleteVlanInterfaceBinding -Id <double> An example how to delete vlan_interface_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVlanInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum, [boolean]$Tagged, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteVlanInterfaceBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSBoundParameters.ContainsKey('Tagged') ) { $arguments.Add('tagged', $Tagged) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vlan_interface_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVlanInterfaceBinding: Finished" } } function Invoke-NSGetVlanInterfaceBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the interface that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER GetAll Retrieve all vlan_interface_binding object(s). .PARAMETER Count If specified, the count of the vlan_interface_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVlanInterfaceBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVlanInterfaceBinding -GetAll Get all vlan_interface_binding data. .EXAMPLE PS C:\>Invoke-NSGetVlanInterfaceBinding -Count Get the number of vlan_interface_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVlanInterfaceBinding -name <string> Get vlan_interface_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVlanInterfaceBinding -Filter @{ 'name'='<value>' } Get vlan_interface_binding data with a filter. .NOTES File Name : Invoke-NSGetVlanInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVlanInterfaceBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vlan_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vlan_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vlan_interface_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_interface_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vlan_interface_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_interface_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vlan_interface_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_interface_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVlanInterfaceBinding: Ended" } } function Invoke-NSAddVlanLinksetBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the linkset that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ifnum The interface to be bound to the VLAN, specified in slot/port notation (for example, 1/3). .PARAMETER Tagged Make the interface an 802.1q tagged interface. Packets sent on this interface on this VLAN have an additional 4-byte 802.1q tag, which identifies the VLAN. To use 802.1q tagging, you must also configure the switch connected to the appliance's interfaces. .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .PARAMETER PassThru Return details about the created vlan_linkset_binding item. .EXAMPLE PS C:\>Invoke-NSAddVlanLinksetBinding -id <double> An example how to add vlan_linkset_binding config Object(s). .NOTES File Name : Invoke-NSAddVlanLinksetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_linkset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [ValidateScript({ $_.Length -gt 1 })] [string]$Ifnum, [boolean]$Tagged, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVlanLinksetBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSBoundParameters.ContainsKey('tagged') ) { $payload.Add('tagged', $tagged) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("vlan_linkset_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vlan_linkset_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVlanLinksetBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVlanLinksetBinding: Finished" } } function Invoke-NSDeleteVlanLinksetBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the linkset that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ifnum The interface to be bound to the VLAN, specified in slot/port notation (for example, 1/3). .PARAMETER Tagged Make the interface an 802.1q tagged interface. Packets sent on this interface on this VLAN have an additional 4-byte 802.1q tag, which identifies the VLAN. To use 802.1q tagging, you must also configure the switch connected to the appliance's interfaces. .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .EXAMPLE PS C:\>Invoke-NSDeleteVlanLinksetBinding -Id <double> An example how to delete vlan_linkset_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVlanLinksetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_linkset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum, [boolean]$Tagged, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteVlanLinksetBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSBoundParameters.ContainsKey('Tagged') ) { $arguments.Add('tagged', $Tagged) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vlan_linkset_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVlanLinksetBinding: Finished" } } function Invoke-NSGetVlanLinksetBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the linkset that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER GetAll Retrieve all vlan_linkset_binding object(s). .PARAMETER Count If specified, the count of the vlan_linkset_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVlanLinksetBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVlanLinksetBinding -GetAll Get all vlan_linkset_binding data. .EXAMPLE PS C:\>Invoke-NSGetVlanLinksetBinding -Count Get the number of vlan_linkset_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVlanLinksetBinding -name <string> Get vlan_linkset_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVlanLinksetBinding -Filter @{ 'name'='<value>' } Get vlan_linkset_binding data with a filter. .NOTES File Name : Invoke-NSGetVlanLinksetBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_linkset_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVlanLinksetBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vlan_linkset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_linkset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vlan_linkset_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_linkset_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vlan_linkset_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_linkset_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vlan_linkset_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_linkset_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vlan_linkset_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_linkset_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVlanLinksetBinding: Ended" } } function Invoke-NSAddVlanNsip6Binding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ipaddress The IP address assigned to the VLAN. .PARAMETER Netmask Subnet mask for the network address defined for this VLAN. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .PARAMETER PassThru Return details about the created vlan_nsip6_binding item. .EXAMPLE PS C:\>Invoke-NSAddVlanNsip6Binding -id <double> An example how to add vlan_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSAddVlanNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [ValidateScript({ $_.Length -gt 1 })] [string]$Netmask, [double]$Td, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVlanNsip6Binding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("vlan_nsip6_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vlan_nsip6_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVlanNsip6Binding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVlanNsip6Binding: Finished" } } function Invoke-NSDeleteVlanNsip6Binding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ipaddress The IP address assigned to the VLAN. .PARAMETER Netmask Subnet mask for the network address defined for this VLAN. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .EXAMPLE PS C:\>Invoke-NSDeleteVlanNsip6Binding -Id <double> An example how to delete vlan_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVlanNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask, [double]$Td, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteVlanNsip6Binding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSBoundParameters.ContainsKey('Td') ) { $arguments.Add('td', $Td) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vlan_nsip6_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVlanNsip6Binding: Finished" } } function Invoke-NSGetVlanNsip6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip6 that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER GetAll Retrieve all vlan_nsip6_binding object(s). .PARAMETER Count If specified, the count of the vlan_nsip6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVlanNsip6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetVlanNsip6Binding -GetAll Get all vlan_nsip6_binding data. .EXAMPLE PS C:\>Invoke-NSGetVlanNsip6Binding -Count Get the number of vlan_nsip6_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVlanNsip6Binding -name <string> Get vlan_nsip6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVlanNsip6Binding -Filter @{ 'name'='<value>' } Get vlan_nsip6_binding data with a filter. .NOTES File Name : Invoke-NSGetVlanNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVlanNsip6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vlan_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vlan_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vlan_nsip6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vlan_nsip6_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip6_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vlan_nsip6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVlanNsip6Binding: Ended" } } function Invoke-NSAddVlanNsipBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ipaddress The IP address assigned to the VLAN. .PARAMETER Netmask Subnet mask for the network address defined for this VLAN. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .PARAMETER PassThru Return details about the created vlan_nsip_binding item. .EXAMPLE PS C:\>Invoke-NSAddVlanNsipBinding -id <double> An example how to add vlan_nsip_binding config Object(s). .NOTES File Name : Invoke-NSAddVlanNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask, [double]$Td, [ValidateScript({ $_.Length -gt 1 })] [string]$Ownergroup = 'DEFAULT_NG', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVlanNsipBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSBoundParameters.ContainsKey('td') ) { $payload.Add('td', $td) } if ( $PSBoundParameters.ContainsKey('ownergroup') ) { $payload.Add('ownergroup', $ownergroup) } if ( $PSCmdlet.ShouldProcess("vlan_nsip_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vlan_nsip_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVlanNsipBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVlanNsipBinding: Finished" } } function Invoke-NSDeleteVlanNsipBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER Ipaddress The IP address assigned to the VLAN. .PARAMETER Netmask Subnet mask for the network address defined for this VLAN. .PARAMETER Td Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Maximum value = 4094 .PARAMETER Ownergroup The owner node group in a Cluster for this vlan. .EXAMPLE PS C:\>Invoke-NSDeleteVlanNsipBinding -Id <double> An example how to delete vlan_nsip_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVlanNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask, [double]$Td, [string]$Ownergroup ) begin { Write-Verbose "Invoke-NSDeleteVlanNsipBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSBoundParameters.ContainsKey('Td') ) { $arguments.Add('td', $Td) } if ( $PSBoundParameters.ContainsKey('Ownergroup') ) { $arguments.Add('ownergroup', $Ownergroup) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vlan_nsip_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVlanNsipBinding: Finished" } } function Invoke-NSGetVlanNsipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip that can be bound to vlan. .PARAMETER Id Specifies the virtual LAN ID. Maximum value = 4094 .PARAMETER GetAll Retrieve all vlan_nsip_binding object(s). .PARAMETER Count If specified, the count of the vlan_nsip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVlanNsipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVlanNsipBinding -GetAll Get all vlan_nsip_binding data. .EXAMPLE PS C:\>Invoke-NSGetVlanNsipBinding -Count Get the number of vlan_nsip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVlanNsipBinding -name <string> Get vlan_nsip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVlanNsipBinding -Filter @{ 'name'='<value>' } Get vlan_nsip_binding data with a filter. .NOTES File Name : Invoke-NSGetVlanNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vlan_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVlanNsipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vlan_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vlan_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vlan_nsip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vlan_nsip_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vlan_nsip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vlan_nsip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVlanNsipBinding: Ended" } } function Invoke-NSAddVrid { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for Virtual Router ID resource. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Priority Base priority (BP), in an active-active mode configuration, which ordinarily determines the master VIP address. Maximum value = 255 .PARAMETER Preemption In an active-active mode configuration, make a backup VIP address the master if its priority becomes higher than that of a master VIP address bound to this VMAC address. If you disable pre-emption while a backup VIP address is the master, the backup VIP address remains master until the original master VIP's priority becomes higher than that of the current master. Possible values = ENABLED, DISABLED .PARAMETER Sharing In an active-active mode configuration, enable the backup VIP address to process any traffic instead of dropping it. Possible values = ENABLED, DISABLED .PARAMETER Tracking The effective priority (EP) value, relative to the base priority (BP) value in an active-active mode configuration. When EP is set to a value other than None, it is EP, not BP, which determines the master VIP address. Available settings function as follows: * NONE - No tracking. EP = BP * ALL - If the status of all virtual servers is UP, EP = BP. Otherwise, EP = 0. * ONE - If the status of at least one virtual server is UP, EP = BP. Otherwise, EP = 0. * PROGRESSIVE - If the status of all virtual servers is UP, EP = BP. If the status of all virtual servers is DOWN, EP = 0. Otherwise EP = BP (1 - K/N), where N is the total number of virtual servers associated with the VIP address and K is the number of virtual servers for which the status is DOWN. Default: NONE. Possible values = NONE, ONE, ALL, PROGRESSIVE .PARAMETER Ownernode In a cluster setup, assign a cluster node as the owner of this VMAC address for IP based VRRP configuration. If no owner is configured, owner node is displayed as ALL and one node is dynamically elected as the owner. Maximum value = 31 .PARAMETER Trackifnumpriority Priority by which the Effective priority will be reduced if any of the tracked interfaces goes down in an active-active configuration. Maximum value = 255 .PARAMETER Preemptiondelaytimer Preemption delay time, in seconds, in an active-active configuration. If any high priority node will come in network, it will wait for these many seconds before becoming master. Maximum value = 36000 .PARAMETER PassThru Return details about the created vrid item. .EXAMPLE PS C:\>Invoke-NSAddVrid -id <double> An example how to add vrid config Object(s). .NOTES File Name : Invoke-NSAddVrid Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [double]$Priority = '255', [ValidateSet('ENABLED', 'DISABLED')] [string]$Preemption = 'ENABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Sharing = 'DISABLED', [ValidateSet('NONE', 'ONE', 'ALL', 'PROGRESSIVE')] [string]$Tracking = 'NONE', [double]$Ownernode, [double]$Trackifnumpriority = '0', [double]$Preemptiondelaytimer = '0', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVrid: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) } if ( $PSBoundParameters.ContainsKey('preemption') ) { $payload.Add('preemption', $preemption) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSBoundParameters.ContainsKey('tracking') ) { $payload.Add('tracking', $tracking) } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSBoundParameters.ContainsKey('trackifnumpriority') ) { $payload.Add('trackifnumpriority', $trackifnumpriority) } if ( $PSBoundParameters.ContainsKey('preemptiondelaytimer') ) { $payload.Add('preemptiondelaytimer', $preemptiondelaytimer) } if ( $PSCmdlet.ShouldProcess("vrid", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type vrid -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVrid -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVrid: Finished" } } function Invoke-NSDeleteVrid { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for Virtual Router ID resource. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER All Remove all the configured VMAC addresses from the Citrix ADC. .EXAMPLE PS C:\>Invoke-NSDeleteVrid -Id <double> An example how to delete vrid config Object(s). .NOTES File Name : Invoke-NSDeleteVrid Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [boolean]$All ) begin { Write-Verbose "Invoke-NSDeleteVrid: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('All') ) { $arguments.Add('all', $All) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vrid -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVrid: Finished" } } function Invoke-NSUpdateVrid { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Virtual Router ID resource. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Priority Base priority (BP), in an active-active mode configuration, which ordinarily determines the master VIP address. Maximum value = 255 .PARAMETER Preemption In an active-active mode configuration, make a backup VIP address the master if its priority becomes higher than that of a master VIP address bound to this VMAC address. If you disable pre-emption while a backup VIP address is the master, the backup VIP address remains master until the original master VIP's priority becomes higher than that of the current master. Possible values = ENABLED, DISABLED .PARAMETER Sharing In an active-active mode configuration, enable the backup VIP address to process any traffic instead of dropping it. Possible values = ENABLED, DISABLED .PARAMETER Tracking The effective priority (EP) value, relative to the base priority (BP) value in an active-active mode configuration. When EP is set to a value other than None, it is EP, not BP, which determines the master VIP address. Available settings function as follows: * NONE - No tracking. EP = BP * ALL - If the status of all virtual servers is UP, EP = BP. Otherwise, EP = 0. * ONE - If the status of at least one virtual server is UP, EP = BP. Otherwise, EP = 0. * PROGRESSIVE - If the status of all virtual servers is UP, EP = BP. If the status of all virtual servers is DOWN, EP = 0. Otherwise EP = BP (1 - K/N), where N is the total number of virtual servers associated with the VIP address and K is the number of virtual servers for which the status is DOWN. Default: NONE. Possible values = NONE, ONE, ALL, PROGRESSIVE .PARAMETER Ownernode In a cluster setup, assign a cluster node as the owner of this VMAC address for IP based VRRP configuration. If no owner is configured, owner node is displayed as ALL and one node is dynamically elected as the owner. Maximum value = 31 .PARAMETER Trackifnumpriority Priority by which the Effective priority will be reduced if any of the tracked interfaces goes down in an active-active configuration. Maximum value = 255 .PARAMETER Preemptiondelaytimer Preemption delay time, in seconds, in an active-active configuration. If any high priority node will come in network, it will wait for these many seconds before becoming master. Maximum value = 36000 .PARAMETER PassThru Return details about the created vrid item. .EXAMPLE PS C:\>Invoke-NSUpdateVrid -id <double> An example how to update vrid config Object(s). .NOTES File Name : Invoke-NSUpdateVrid Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [double]$Priority, [ValidateSet('ENABLED', 'DISABLED')] [string]$Preemption, [ValidateSet('ENABLED', 'DISABLED')] [string]$Sharing, [ValidateSet('NONE', 'ONE', 'ALL', 'PROGRESSIVE')] [string]$Tracking, [double]$Ownernode, [double]$Trackifnumpriority, [double]$Preemptiondelaytimer, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateVrid: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) } if ( $PSBoundParameters.ContainsKey('preemption') ) { $payload.Add('preemption', $preemption) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSBoundParameters.ContainsKey('tracking') ) { $payload.Add('tracking', $tracking) } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSBoundParameters.ContainsKey('trackifnumpriority') ) { $payload.Add('trackifnumpriority', $trackifnumpriority) } if ( $PSBoundParameters.ContainsKey('preemptiondelaytimer') ) { $payload.Add('preemptiondelaytimer', $preemptiondelaytimer) } if ( $PSCmdlet.ShouldProcess("vrid", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vrid -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVrid -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateVrid: Finished" } } function Invoke-NSUnsetVrid { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for Virtual Router ID resource. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Priority Base priority (BP), in an active-active mode configuration, which ordinarily determines the master VIP address. Maximum value = 255 .PARAMETER Preemption In an active-active mode configuration, make a backup VIP address the master if its priority becomes higher than that of a master VIP address bound to this VMAC address. If you disable pre-emption while a backup VIP address is the master, the backup VIP address remains master until the original master VIP's priority becomes higher than that of the current master. Possible values = ENABLED, DISABLED .PARAMETER Sharing In an active-active mode configuration, enable the backup VIP address to process any traffic instead of dropping it. Possible values = ENABLED, DISABLED .PARAMETER Tracking The effective priority (EP) value, relative to the base priority (BP) value in an active-active mode configuration. When EP is set to a value other than None, it is EP, not BP, which determines the master VIP address. Available settings function as follows: * NONE - No tracking. EP = BP * ALL - If the status of all virtual servers is UP, EP = BP. Otherwise, EP = 0. * ONE - If the status of at least one virtual server is UP, EP = BP. Otherwise, EP = 0. * PROGRESSIVE - If the status of all virtual servers is UP, EP = BP. If the status of all virtual servers is DOWN, EP = 0. Otherwise EP = BP (1 - K/N), where N is the total number of virtual servers associated with the VIP address and K is the number of virtual servers for which the status is DOWN. Default: NONE. Possible values = NONE, ONE, ALL, PROGRESSIVE .PARAMETER Ownernode In a cluster setup, assign a cluster node as the owner of this VMAC address for IP based VRRP configuration. If no owner is configured, owner node is displayed as ALL and one node is dynamically elected as the owner. Maximum value = 31 .PARAMETER Trackifnumpriority Priority by which the Effective priority will be reduced if any of the tracked interfaces goes down in an active-active configuration. Maximum value = 255 .PARAMETER Preemptiondelaytimer Preemption delay time, in seconds, in an active-active configuration. If any high priority node will come in network, it will wait for these many seconds before becoming master. Maximum value = 36000 .EXAMPLE PS C:\>Invoke-NSUnsetVrid -id <double> An example how to unset vrid config Object(s). .NOTES File Name : Invoke-NSUnsetVrid Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Id, [Boolean]$priority, [Boolean]$preemption, [Boolean]$sharing, [Boolean]$tracking, [Boolean]$ownernode, [Boolean]$trackifnumpriority, [Boolean]$preemptiondelaytimer ) begin { Write-Verbose "Invoke-NSUnsetVrid: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) } if ( $PSBoundParameters.ContainsKey('preemption') ) { $payload.Add('preemption', $preemption) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSBoundParameters.ContainsKey('tracking') ) { $payload.Add('tracking', $tracking) } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSBoundParameters.ContainsKey('trackifnumpriority') ) { $payload.Add('trackifnumpriority', $trackifnumpriority) } if ( $PSBoundParameters.ContainsKey('preemptiondelaytimer') ) { $payload.Add('preemptiondelaytimer', $preemptiondelaytimer) } if ( $PSCmdlet.ShouldProcess("$id", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type vrid -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetVrid: Finished" } } function Invoke-NSGetVrid { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Virtual Router ID resource. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid object(s). .PARAMETER Count If specified, the count of the vrid object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVrid Get data. .EXAMPLE PS C:\>Invoke-NSGetVrid -GetAll Get all vrid data. .EXAMPLE PS C:\>Invoke-NSGetVrid -Count Get the number of vrid objects. .EXAMPLE PS C:\>Invoke-NSGetVrid -name <string> Get vrid object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVrid -Filter @{ 'name'='<value>' } Get vrid data with a filter. .NOTES File Name : Invoke-NSGetVrid Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetVrid: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all vrid objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVrid: Ended" } } function Invoke-NSAddVrid6 { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for Virtual Router ID for IPv6 resource. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Priority Base priority (BP), in an active-active mode configuration, which ordinarily determines the master VIP address. Maximum value = 255 .PARAMETER Preemption In an active-active mode configuration, make a backup VIP address the master if its priority becomes higher than that of a master VIP address bound to this VMAC address. If you disable pre-emption while a backup VIP address is the master, the backup VIP address remains master until the original master VIP's priority becomes higher than that of the current master. Possible values = ENABLED, DISABLED .PARAMETER Sharing In an active-active mode configuration, enable the backup VIP address to process any traffic instead of dropping it. Possible values = ENABLED, DISABLED .PARAMETER Tracking The effective priority (EP) value, relative to the base priority (BP) value in an active-active mode configuration. When EP is set to a value other than None, it is EP, not BP, which determines the master VIP address. Available settings function as follows: * NONE - No tracking. EP = BP * ALL - If the status of all virtual servers is UP, EP = BP. Otherwise, EP = 0. * ONE - If the status of at least one virtual server is UP, EP = BP. Otherwise, EP = 0. * PROGRESSIVE - If the status of all virtual servers is UP, EP = BP. If the status of all virtual servers is DOWN, EP = 0. Otherwise EP = BP (1 - K/N), where N is the total number of virtual servers associated with the VIP address and K is the number of virtual servers for which the status is DOWN. Default: NONE. Possible values = NONE, ONE, ALL, PROGRESSIVE .PARAMETER Preemptiondelaytimer Preemption delay time in seconds, in an active-active configuration. If any high priority node will come in network, it will wait for these many seconds before becoming master. Maximum value = 36000 .PARAMETER Trackifnumpriority Priority by which the Effective priority will be reduced if any of the tracked interfaces goes down in an active-active configuration. Maximum value = 255 .PARAMETER Ownernode In a cluster setup, assign a cluster node as the owner of this VMAC address for IP based VRRP configuration. If no owner is configured, ow ner node is displayed as ALL and one node is dynamically elected as the owner. Maximum value = 31 .PARAMETER PassThru Return details about the created vrid6 item. .EXAMPLE PS C:\>Invoke-NSAddVrid6 -id <double> An example how to add vrid6 config Object(s). .NOTES File Name : Invoke-NSAddVrid6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [double]$Priority = '255', [ValidateSet('ENABLED', 'DISABLED')] [string]$Preemption = 'ENABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Sharing = 'DISABLED', [ValidateSet('NONE', 'ONE', 'ALL', 'PROGRESSIVE')] [string]$Tracking = 'NONE', [double]$Preemptiondelaytimer = '0', [double]$Trackifnumpriority = '0', [double]$Ownernode, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVrid6: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) } if ( $PSBoundParameters.ContainsKey('preemption') ) { $payload.Add('preemption', $preemption) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSBoundParameters.ContainsKey('tracking') ) { $payload.Add('tracking', $tracking) } if ( $PSBoundParameters.ContainsKey('preemptiondelaytimer') ) { $payload.Add('preemptiondelaytimer', $preemptiondelaytimer) } if ( $PSBoundParameters.ContainsKey('trackifnumpriority') ) { $payload.Add('trackifnumpriority', $trackifnumpriority) } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSCmdlet.ShouldProcess("vrid6", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type vrid6 -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVrid6 -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVrid6: Finished" } } function Invoke-NSDeleteVrid6 { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for Virtual Router ID for IPv6 resource. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER All Remove all configured VMAC6 addresses from the Citrix ADC. .EXAMPLE PS C:\>Invoke-NSDeleteVrid6 -Id <double> An example how to delete vrid6 config Object(s). .NOTES File Name : Invoke-NSDeleteVrid6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [boolean]$All ) begin { Write-Verbose "Invoke-NSDeleteVrid6: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('All') ) { $arguments.Add('all', $All) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vrid6 -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVrid6: Finished" } } function Invoke-NSUpdateVrid6 { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for Virtual Router ID for IPv6 resource. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Priority Base priority (BP), in an active-active mode configuration, which ordinarily determines the master VIP address. Maximum value = 255 .PARAMETER Preemption In an active-active mode configuration, make a backup VIP address the master if its priority becomes higher than that of a master VIP address bound to this VMAC address. If you disable pre-emption while a backup VIP address is the master, the backup VIP address remains master until the original master VIP's priority becomes higher than that of the current master. Possible values = ENABLED, DISABLED .PARAMETER Sharing In an active-active mode configuration, enable the backup VIP address to process any traffic instead of dropping it. Possible values = ENABLED, DISABLED .PARAMETER Tracking The effective priority (EP) value, relative to the base priority (BP) value in an active-active mode configuration. When EP is set to a value other than None, it is EP, not BP, which determines the master VIP address. Available settings function as follows: * NONE - No tracking. EP = BP * ALL - If the status of all virtual servers is UP, EP = BP. Otherwise, EP = 0. * ONE - If the status of at least one virtual server is UP, EP = BP. Otherwise, EP = 0. * PROGRESSIVE - If the status of all virtual servers is UP, EP = BP. If the status of all virtual servers is DOWN, EP = 0. Otherwise EP = BP (1 - K/N), where N is the total number of virtual servers associated with the VIP address and K is the number of virtual servers for which the status is DOWN. Default: NONE. Possible values = NONE, ONE, ALL, PROGRESSIVE .PARAMETER Preemptiondelaytimer Preemption delay time in seconds, in an active-active configuration. If any high priority node will come in network, it will wait for these many seconds before becoming master. Maximum value = 36000 .PARAMETER Trackifnumpriority Priority by which the Effective priority will be reduced if any of the tracked interfaces goes down in an active-active configuration. Maximum value = 255 .PARAMETER Ownernode In a cluster setup, assign a cluster node as the owner of this VMAC address for IP based VRRP configuration. If no owner is configured, ow ner node is displayed as ALL and one node is dynamically elected as the owner. Maximum value = 31 .PARAMETER PassThru Return details about the created vrid6 item. .EXAMPLE PS C:\>Invoke-NSUpdateVrid6 -id <double> An example how to update vrid6 config Object(s). .NOTES File Name : Invoke-NSUpdateVrid6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [double]$Priority, [ValidateSet('ENABLED', 'DISABLED')] [string]$Preemption, [ValidateSet('ENABLED', 'DISABLED')] [string]$Sharing, [ValidateSet('NONE', 'ONE', 'ALL', 'PROGRESSIVE')] [string]$Tracking, [double]$Preemptiondelaytimer, [double]$Trackifnumpriority, [double]$Ownernode, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateVrid6: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) } if ( $PSBoundParameters.ContainsKey('preemption') ) { $payload.Add('preemption', $preemption) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSBoundParameters.ContainsKey('tracking') ) { $payload.Add('tracking', $tracking) } if ( $PSBoundParameters.ContainsKey('preemptiondelaytimer') ) { $payload.Add('preemptiondelaytimer', $preemptiondelaytimer) } if ( $PSBoundParameters.ContainsKey('trackifnumpriority') ) { $payload.Add('trackifnumpriority', $trackifnumpriority) } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSCmdlet.ShouldProcess("vrid6", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vrid6 -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVrid6 -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateVrid6: Finished" } } function Invoke-NSUnsetVrid6 { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for Virtual Router ID for IPv6 resource. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Priority Base priority (BP), in an active-active mode configuration, which ordinarily determines the master VIP address. Maximum value = 255 .PARAMETER Preemption In an active-active mode configuration, make a backup VIP address the master if its priority becomes higher than that of a master VIP address bound to this VMAC address. If you disable pre-emption while a backup VIP address is the master, the backup VIP address remains master until the original master VIP's priority becomes higher than that of the current master. Possible values = ENABLED, DISABLED .PARAMETER Sharing In an active-active mode configuration, enable the backup VIP address to process any traffic instead of dropping it. Possible values = ENABLED, DISABLED .PARAMETER Tracking The effective priority (EP) value, relative to the base priority (BP) value in an active-active mode configuration. When EP is set to a value other than None, it is EP, not BP, which determines the master VIP address. Available settings function as follows: * NONE - No tracking. EP = BP * ALL - If the status of all virtual servers is UP, EP = BP. Otherwise, EP = 0. * ONE - If the status of at least one virtual server is UP, EP = BP. Otherwise, EP = 0. * PROGRESSIVE - If the status of all virtual servers is UP, EP = BP. If the status of all virtual servers is DOWN, EP = 0. Otherwise EP = BP (1 - K/N), where N is the total number of virtual servers associated with the VIP address and K is the number of virtual servers for which the status is DOWN. Default: NONE. Possible values = NONE, ONE, ALL, PROGRESSIVE .PARAMETER Preemptiondelaytimer Preemption delay time in seconds, in an active-active configuration. If any high priority node will come in network, it will wait for these many seconds before becoming master. Maximum value = 36000 .PARAMETER Trackifnumpriority Priority by which the Effective priority will be reduced if any of the tracked interfaces goes down in an active-active configuration. Maximum value = 255 .PARAMETER Ownernode In a cluster setup, assign a cluster node as the owner of this VMAC address for IP based VRRP configuration. If no owner is configured, ow ner node is displayed as ALL and one node is dynamically elected as the owner. Maximum value = 31 .EXAMPLE PS C:\>Invoke-NSUnsetVrid6 -id <double> An example how to unset vrid6 config Object(s). .NOTES File Name : Invoke-NSUnsetVrid6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6 Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Id, [Boolean]$priority, [Boolean]$preemption, [Boolean]$sharing, [Boolean]$tracking, [Boolean]$preemptiondelaytimer, [Boolean]$trackifnumpriority, [Boolean]$ownernode ) begin { Write-Verbose "Invoke-NSUnsetVrid6: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) } if ( $PSBoundParameters.ContainsKey('preemption') ) { $payload.Add('preemption', $preemption) } if ( $PSBoundParameters.ContainsKey('sharing') ) { $payload.Add('sharing', $sharing) } if ( $PSBoundParameters.ContainsKey('tracking') ) { $payload.Add('tracking', $tracking) } if ( $PSBoundParameters.ContainsKey('preemptiondelaytimer') ) { $payload.Add('preemptiondelaytimer', $preemptiondelaytimer) } if ( $PSBoundParameters.ContainsKey('trackifnumpriority') ) { $payload.Add('trackifnumpriority', $trackifnumpriority) } if ( $PSBoundParameters.ContainsKey('ownernode') ) { $payload.Add('ownernode', $ownernode) } if ( $PSCmdlet.ShouldProcess("$id", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type vrid6 -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetVrid6: Finished" } } function Invoke-NSGetVrid6 { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for Virtual Router ID for IPv6 resource. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid6 object(s). .PARAMETER Count If specified, the count of the vrid6 object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVrid6 Get data. .EXAMPLE PS C:\>Invoke-NSGetVrid6 -GetAll Get all vrid6 data. .EXAMPLE PS C:\>Invoke-NSGetVrid6 -Count Get the number of vrid6 objects. .EXAMPLE PS C:\>Invoke-NSGetVrid6 -name <string> Get vrid6 object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVrid6 -Filter @{ 'name'='<value>' } Get vrid6 data with a filter. .NOTES File Name : Invoke-NSGetVrid6 Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetVrid6: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all vrid6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid6 objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6 -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid6 objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6 -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid6 configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6 -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid6 configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6 -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVrid6: Ended" } } function Invoke-NSGetVrid6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid6_binding object(s). .PARAMETER Count If specified, the count of the vrid6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVrid6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetVrid6Binding -GetAll Get all vrid6_binding data. .EXAMPLE PS C:\>Invoke-NSGetVrid6Binding -name <string> Get vrid6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVrid6Binding -Filter @{ 'name'='<value>' } Get vrid6_binding data with a filter. .NOTES File Name : Invoke-NSGetVrid6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVrid6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid6_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVrid6Binding: Ended" } } function Invoke-NSAddVrid6ChannelBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Ifnum Interfaces to bind to the VMAC6, specified in (slot/port) notation (for example, 1/2).Use spaces to separate multiple entries. .PARAMETER PassThru Return details about the created vrid6_channel_binding item. .EXAMPLE PS C:\>Invoke-NSAddVrid6ChannelBinding -id <double> An example how to add vrid6_channel_binding config Object(s). .NOTES File Name : Invoke-NSAddVrid6ChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVrid6ChannelBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSCmdlet.ShouldProcess("vrid6_channel_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vrid6_channel_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVrid6ChannelBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVrid6ChannelBinding: Finished" } } function Invoke-NSDeleteVrid6ChannelBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Ifnum Interfaces to bind to the VMAC6, specified in (slot/port) notation (for example, 1/2).Use spaces to separate multiple entries. .EXAMPLE PS C:\>Invoke-NSDeleteVrid6ChannelBinding -Id <double> An example how to delete vrid6_channel_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVrid6ChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteVrid6ChannelBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vrid6_channel_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVrid6ChannelBinding: Finished" } } function Invoke-NSGetVrid6ChannelBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the channel that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid6_channel_binding object(s). .PARAMETER Count If specified, the count of the vrid6_channel_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVrid6ChannelBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVrid6ChannelBinding -GetAll Get all vrid6_channel_binding data. .EXAMPLE PS C:\>Invoke-NSGetVrid6ChannelBinding -Count Get the number of vrid6_channel_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVrid6ChannelBinding -name <string> Get vrid6_channel_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVrid6ChannelBinding -Filter @{ 'name'='<value>' } Get vrid6_channel_binding data with a filter. .NOTES File Name : Invoke-NSGetVrid6ChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVrid6ChannelBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid6_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid6_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid6_channel_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_channel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid6_channel_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_channel_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid6_channel_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_channel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVrid6ChannelBinding: Ended" } } function Invoke-NSAddVrid6InterfaceBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Ifnum Interfaces to bind to the VMAC6, specified in (slot/port) notation (for example, 1/2).Use spaces to separate multiple entries. .PARAMETER PassThru Return details about the created vrid6_interface_binding item. .EXAMPLE PS C:\>Invoke-NSAddVrid6InterfaceBinding -id <double> An example how to add vrid6_interface_binding config Object(s). .NOTES File Name : Invoke-NSAddVrid6InterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVrid6InterfaceBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSCmdlet.ShouldProcess("vrid6_interface_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vrid6_interface_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVrid6InterfaceBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVrid6InterfaceBinding: Finished" } } function Invoke-NSDeleteVrid6InterfaceBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Ifnum Interfaces to bind to the VMAC6, specified in (slot/port) notation (for example, 1/2).Use spaces to separate multiple entries. .EXAMPLE PS C:\>Invoke-NSDeleteVrid6InterfaceBinding -Id <double> An example how to delete vrid6_interface_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVrid6InterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteVrid6InterfaceBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vrid6_interface_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVrid6InterfaceBinding: Finished" } } function Invoke-NSGetVrid6InterfaceBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the interface that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid6_interface_binding object(s). .PARAMETER Count If specified, the count of the vrid6_interface_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVrid6InterfaceBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVrid6InterfaceBinding -GetAll Get all vrid6_interface_binding data. .EXAMPLE PS C:\>Invoke-NSGetVrid6InterfaceBinding -Count Get the number of vrid6_interface_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVrid6InterfaceBinding -name <string> Get vrid6_interface_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVrid6InterfaceBinding -Filter @{ 'name'='<value>' } Get vrid6_interface_binding data with a filter. .NOTES File Name : Invoke-NSGetVrid6InterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVrid6InterfaceBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid6_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid6_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid6_interface_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_interface_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid6_interface_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_interface_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid6_interface_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_interface_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVrid6InterfaceBinding: Ended" } } function Invoke-NSGetVrid6Nsip6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip6 that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid6_nsip6_binding object(s). .PARAMETER Count If specified, the count of the vrid6_nsip6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVrid6Nsip6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetVrid6Nsip6Binding -GetAll Get all vrid6_nsip6_binding data. .EXAMPLE PS C:\>Invoke-NSGetVrid6Nsip6Binding -Count Get the number of vrid6_nsip6_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVrid6Nsip6Binding -name <string> Get vrid6_nsip6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVrid6Nsip6Binding -Filter @{ 'name'='<value>' } Get vrid6_nsip6_binding data with a filter. .NOTES File Name : Invoke-NSGetVrid6Nsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVrid6Nsip6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid6_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid6_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid6_nsip6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid6_nsip6_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip6_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid6_nsip6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVrid6Nsip6Binding: Ended" } } function Invoke-NSGetVrid6NsipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid6_nsip_binding object(s). .PARAMETER Count If specified, the count of the vrid6_nsip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVrid6NsipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVrid6NsipBinding -GetAll Get all vrid6_nsip_binding data. .EXAMPLE PS C:\>Invoke-NSGetVrid6NsipBinding -Count Get the number of vrid6_nsip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVrid6NsipBinding -name <string> Get vrid6_nsip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVrid6NsipBinding -Filter @{ 'name'='<value>' } Get vrid6_nsip_binding data with a filter. .NOTES File Name : Invoke-NSGetVrid6NsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVrid6NsipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid6_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid6_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid6_nsip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid6_nsip_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid6_nsip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_nsip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVrid6NsipBinding: Ended" } } function Invoke-NSAddVrid6TrackinterfaceBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the trackinterface that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Trackifnum Interfaces which need to be tracked for this vrID. .PARAMETER PassThru Return details about the created vrid6_trackinterface_binding item. .EXAMPLE PS C:\>Invoke-NSAddVrid6TrackinterfaceBinding -id <double> An example how to add vrid6_trackinterface_binding config Object(s). .NOTES File Name : Invoke-NSAddVrid6TrackinterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_trackinterface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Trackifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVrid6TrackinterfaceBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('trackifnum') ) { $payload.Add('trackifnum', $trackifnum) } if ( $PSCmdlet.ShouldProcess("vrid6_trackinterface_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vrid6_trackinterface_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVrid6TrackinterfaceBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVrid6TrackinterfaceBinding: Finished" } } function Invoke-NSDeleteVrid6TrackinterfaceBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the trackinterface that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER Trackifnum Interfaces which need to be tracked for this vrID. .EXAMPLE PS C:\>Invoke-NSDeleteVrid6TrackinterfaceBinding -Id <double> An example how to delete vrid6_trackinterface_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVrid6TrackinterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_trackinterface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Trackifnum ) begin { Write-Verbose "Invoke-NSDeleteVrid6TrackinterfaceBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Trackifnum') ) { $arguments.Add('trackifnum', $Trackifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vrid6_trackinterface_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVrid6TrackinterfaceBinding: Finished" } } function Invoke-NSGetVrid6TrackinterfaceBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the trackinterface that can be bound to vrid6. .PARAMETER Id Integer value that uniquely identifies a VMAC6 address. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid6_trackinterface_binding object(s). .PARAMETER Count If specified, the count of the vrid6_trackinterface_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVrid6TrackinterfaceBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVrid6TrackinterfaceBinding -GetAll Get all vrid6_trackinterface_binding data. .EXAMPLE PS C:\>Invoke-NSGetVrid6TrackinterfaceBinding -Count Get the number of vrid6_trackinterface_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVrid6TrackinterfaceBinding -name <string> Get vrid6_trackinterface_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVrid6TrackinterfaceBinding -Filter @{ 'name'='<value>' } Get vrid6_trackinterface_binding data with a filter. .NOTES File Name : Invoke-NSGetVrid6TrackinterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid6_trackinterface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVrid6TrackinterfaceBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid6_trackinterface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_trackinterface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid6_trackinterface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_trackinterface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid6_trackinterface_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_trackinterface_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid6_trackinterface_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_trackinterface_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid6_trackinterface_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid6_trackinterface_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVrid6TrackinterfaceBinding: Ended" } } function Invoke-NSGetVridBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to vrid. .PARAMETER Id Integer value that uniquely identifies the VMAC address. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid_binding object(s). .PARAMETER Count If specified, the count of the vrid_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVridBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVridBinding -GetAll Get all vrid_binding data. .EXAMPLE PS C:\>Invoke-NSGetVridBinding -name <string> Get vrid_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVridBinding -Filter @{ 'name'='<value>' } Get vrid_binding data with a filter. .NOTES File Name : Invoke-NSGetVridBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVridBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVridBinding: Ended" } } function Invoke-NSAddVridChannelBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Ifnum Interfaces to bind to the VMAC, specified in (slot/port) notation (for example, 1/2).Use spaces to separate multiple entries. .PARAMETER PassThru Return details about the created vrid_channel_binding item. .EXAMPLE PS C:\>Invoke-NSAddVridChannelBinding -id <double> An example how to add vrid_channel_binding config Object(s). .NOTES File Name : Invoke-NSAddVridChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVridChannelBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSCmdlet.ShouldProcess("vrid_channel_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vrid_channel_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVridChannelBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVridChannelBinding: Finished" } } function Invoke-NSDeleteVridChannelBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the channel that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Ifnum Interfaces to bind to the VMAC, specified in (slot/port) notation (for example, 1/2).Use spaces to separate multiple entries. .EXAMPLE PS C:\>Invoke-NSDeleteVridChannelBinding -Id <double> An example how to delete vrid_channel_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVridChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteVridChannelBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vrid_channel_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVridChannelBinding: Finished" } } function Invoke-NSGetVridChannelBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the channel that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid_channel_binding object(s). .PARAMETER Count If specified, the count of the vrid_channel_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVridChannelBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVridChannelBinding -GetAll Get all vrid_channel_binding data. .EXAMPLE PS C:\>Invoke-NSGetVridChannelBinding -Count Get the number of vrid_channel_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVridChannelBinding -name <string> Get vrid_channel_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVridChannelBinding -Filter @{ 'name'='<value>' } Get vrid_channel_binding data with a filter. .NOTES File Name : Invoke-NSGetVridChannelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_channel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVridChannelBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid_channel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_channel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid_channel_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_channel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid_channel_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_channel_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid_channel_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_channel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVridChannelBinding: Ended" } } function Invoke-NSAddVridInterfaceBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Ifnum Interfaces to bind to the VMAC, specified in (slot/port) notation (for example, 1/2).Use spaces to separate multiple entries. .PARAMETER PassThru Return details about the created vrid_interface_binding item. .EXAMPLE PS C:\>Invoke-NSAddVridInterfaceBinding -id <double> An example how to add vrid_interface_binding config Object(s). .NOTES File Name : Invoke-NSAddVridInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVridInterfaceBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ifnum') ) { $payload.Add('ifnum', $ifnum) } if ( $PSCmdlet.ShouldProcess("vrid_interface_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vrid_interface_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVridInterfaceBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVridInterfaceBinding: Finished" } } function Invoke-NSDeleteVridInterfaceBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the interface that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Ifnum Interfaces to bind to the VMAC, specified in (slot/port) notation (for example, 1/2).Use spaces to separate multiple entries. .EXAMPLE PS C:\>Invoke-NSDeleteVridInterfaceBinding -Id <double> An example how to delete vrid_interface_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVridInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ifnum ) begin { Write-Verbose "Invoke-NSDeleteVridInterfaceBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ifnum') ) { $arguments.Add('ifnum', $Ifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vrid_interface_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVridInterfaceBinding: Finished" } } function Invoke-NSGetVridInterfaceBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the interface that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid_interface_binding object(s). .PARAMETER Count If specified, the count of the vrid_interface_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVridInterfaceBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVridInterfaceBinding -GetAll Get all vrid_interface_binding data. .EXAMPLE PS C:\>Invoke-NSGetVridInterfaceBinding -Count Get the number of vrid_interface_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVridInterfaceBinding -name <string> Get vrid_interface_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVridInterfaceBinding -Filter @{ 'name'='<value>' } Get vrid_interface_binding data with a filter. .NOTES File Name : Invoke-NSGetVridInterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_interface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVridInterfaceBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid_interface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_interface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid_interface_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_interface_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid_interface_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_interface_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid_interface_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_interface_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVridInterfaceBinding: Ended" } } function Invoke-NSGetVridNsip6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip6 that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid_nsip6_binding object(s). .PARAMETER Count If specified, the count of the vrid_nsip6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVridNsip6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetVridNsip6Binding -GetAll Get all vrid_nsip6_binding data. .EXAMPLE PS C:\>Invoke-NSGetVridNsip6Binding -Count Get the number of vrid_nsip6_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVridNsip6Binding -name <string> Get vrid_nsip6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVridNsip6Binding -Filter @{ 'name'='<value>' } Get vrid_nsip6_binding data with a filter. .NOTES File Name : Invoke-NSGetVridNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVridNsip6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid_nsip6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid_nsip6_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip6_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid_nsip6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVridNsip6Binding: Ended" } } function Invoke-NSGetVridNsipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid_nsip_binding object(s). .PARAMETER Count If specified, the count of the vrid_nsip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVridNsipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVridNsipBinding -GetAll Get all vrid_nsip_binding data. .EXAMPLE PS C:\>Invoke-NSGetVridNsipBinding -Count Get the number of vrid_nsip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVridNsipBinding -name <string> Get vrid_nsip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVridNsipBinding -Filter @{ 'name'='<value>' } Get vrid_nsip_binding data with a filter. .NOTES File Name : Invoke-NSGetVridNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVridNsipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid_nsip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid_nsip_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid_nsip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_nsip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVridNsipBinding: Ended" } } function Invoke-NSAddVridTrackinterfaceBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the trackinterface that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Trackifnum Interfaces which need to be tracked for this vrID. .PARAMETER PassThru Return details about the created vrid_trackinterface_binding item. .EXAMPLE PS C:\>Invoke-NSAddVridTrackinterfaceBinding -id <double> An example how to add vrid_trackinterface_binding config Object(s). .NOTES File Name : Invoke-NSAddVridTrackinterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_trackinterface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Trackifnum, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVridTrackinterfaceBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('trackifnum') ) { $payload.Add('trackifnum', $trackifnum) } if ( $PSCmdlet.ShouldProcess("vrid_trackinterface_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vrid_trackinterface_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVridTrackinterfaceBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVridTrackinterfaceBinding: Finished" } } function Invoke-NSDeleteVridTrackinterfaceBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the trackinterface that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER Trackifnum Interfaces which need to be tracked for this vrID. .EXAMPLE PS C:\>Invoke-NSDeleteVridTrackinterfaceBinding -Id <double> An example how to delete vrid_trackinterface_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVridTrackinterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_trackinterface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Trackifnum ) begin { Write-Verbose "Invoke-NSDeleteVridTrackinterfaceBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Trackifnum') ) { $arguments.Add('trackifnum', $Trackifnum) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vrid_trackinterface_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVridTrackinterfaceBinding: Finished" } } function Invoke-NSGetVridTrackinterfaceBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the trackinterface that can be bound to vrid. .PARAMETER Id Integer that uniquely identifies the VMAC address. The generic VMAC address is in the form of 00:00:5e:00:01:<VRID>. For example, if you add a VRID with a value of 60 and bind it to an interface, the resulting VMAC address is 00:00:5e:00:01:3c, where 3c is the hexadecimal representation of 60. Maximum value = 255 .PARAMETER GetAll Retrieve all vrid_trackinterface_binding object(s). .PARAMETER Count If specified, the count of the vrid_trackinterface_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVridTrackinterfaceBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVridTrackinterfaceBinding -GetAll Get all vrid_trackinterface_binding data. .EXAMPLE PS C:\>Invoke-NSGetVridTrackinterfaceBinding -Count Get the number of vrid_trackinterface_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVridTrackinterfaceBinding -name <string> Get vrid_trackinterface_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVridTrackinterfaceBinding -Filter @{ 'name'='<value>' } Get vrid_trackinterface_binding data with a filter. .NOTES File Name : Invoke-NSGetVridTrackinterfaceBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vrid_trackinterface_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVridTrackinterfaceBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vrid_trackinterface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_trackinterface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vrid_trackinterface_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_trackinterface_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vrid_trackinterface_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_trackinterface_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vrid_trackinterface_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_trackinterface_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vrid_trackinterface_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vrid_trackinterface_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVridTrackinterfaceBinding: Ended" } } function Invoke-NSUpdateVridparam { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for VR ID parameter resource. .PARAMETER Sendtomaster Forward packets to the master node, in an active-active mode configuration, if the virtual server is in the backup state and sharing is disabled. Possible values = ENABLED, DISABLED .PARAMETER Hellointerval Interval, in milliseconds, between vrrp advertisement messages sent to the peer node in active-active mode. Maximum value = 1000 .PARAMETER Deadinterval Number of seconds after which a peer node in active-active mode is marked down if vrrp advertisements are not received from the peer node. Maximum value = 60 .EXAMPLE PS C:\>Invoke-NSUpdateVridparam An example how to update vridparam config Object(s). .NOTES File Name : Invoke-NSUpdateVridparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vridparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [ValidateSet('ENABLED', 'DISABLED')] [string]$Sendtomaster, [double]$Hellointerval, [double]$Deadinterval ) begin { Write-Verbose "Invoke-NSUpdateVridparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('sendtomaster') ) { $payload.Add('sendtomaster', $sendtomaster) } if ( $PSBoundParameters.ContainsKey('hellointerval') ) { $payload.Add('hellointerval', $hellointerval) } if ( $PSBoundParameters.ContainsKey('deadinterval') ) { $payload.Add('deadinterval', $deadinterval) } if ( $PSCmdlet.ShouldProcess("vridparam", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vridparam -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $result } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateVridparam: Finished" } } function Invoke-NSUnsetVridparam { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for VR ID parameter resource. .PARAMETER Sendtomaster Forward packets to the master node, in an active-active mode configuration, if the virtual server is in the backup state and sharing is disabled. Possible values = ENABLED, DISABLED .PARAMETER Hellointerval Interval, in milliseconds, between vrrp advertisement messages sent to the peer node in active-active mode. Maximum value = 1000 .PARAMETER Deadinterval Number of seconds after which a peer node in active-active mode is marked down if vrrp advertisements are not received from the peer node. Maximum value = 60 .EXAMPLE PS C:\>Invoke-NSUnsetVridparam An example how to unset vridparam config Object(s). .NOTES File Name : Invoke-NSUnsetVridparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vridparam Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Boolean]$sendtomaster, [Boolean]$hellointerval, [Boolean]$deadinterval ) begin { Write-Verbose "Invoke-NSUnsetVridparam: Starting" } process { try { $payload = @{ } if ( $PSBoundParameters.ContainsKey('sendtomaster') ) { $payload.Add('sendtomaster', $sendtomaster) } if ( $PSBoundParameters.ContainsKey('hellointerval') ) { $payload.Add('hellointerval', $hellointerval) } if ( $PSBoundParameters.ContainsKey('deadinterval') ) { $payload.Add('deadinterval', $deadinterval) } if ( $PSCmdlet.ShouldProcess("vridparam", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type vridparam -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetVridparam: Finished" } } function Invoke-NSGetVridparam { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for VR ID parameter resource. .PARAMETER GetAll Retrieve all vridparam object(s). .PARAMETER Count If specified, the count of the vridparam object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVridparam Get data. .EXAMPLE PS C:\>Invoke-NSGetVridparam -GetAll Get all vridparam data. .EXAMPLE PS C:\>Invoke-NSGetVridparam -name <string> Get vridparam object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVridparam -Filter @{ 'name'='<value>' } Get vridparam data with a filter. .NOTES File Name : Invoke-NSGetVridparam Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vridparam/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVridparam: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all vridparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vridparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vridparam objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vridparam -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vridparam objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vridparam -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vridparam configuration for property ''" } else { Write-Verbose "Retrieving vridparam configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vridparam -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVridparam: Ended" } } function Invoke-NSAddVxlan { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for "VXLAN" resource. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Vlan ID of VLANs whose traffic is allowed over this VXLAN. If you do not specify any VLAN IDs, the Citrix ADC allows traffic of all VLANs that are not part of any other VXLANs. Maximum value = 4094 .PARAMETER Port Specifies UDP destination port for VXLAN packets. Maximum value = 65534 .PARAMETER Dynamicrouting Enable dynamic routing on this VXLAN. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on this VXLAN. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .PARAMETER Type VXLAN encapsulation type. VXLAN, VXLANGPE. Possible values = VXLAN, VXLANGPE .PARAMETER Protocol VXLAN-GPE next protocol. RESERVED, IPv4, IPv6, ETHERNET, NSH. Possible values = IPv4, IPv6, ETHERNET, NSH .PARAMETER Innervlantagging Specifies whether Citrix ADC should generate VXLAN packets with inner VLAN tag. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created vxlan item. .EXAMPLE PS C:\>Invoke-NSAddVxlan -id <double> An example how to add vxlan config Object(s). .NOTES File Name : Invoke-NSAddVxlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [double]$Vlan, [int]$Port = '4789', [ValidateSet('ENABLED', 'DISABLED')] [string]$Dynamicrouting = 'DISABLED', [ValidateSet('ENABLED', 'DISABLED')] [string]$Ipv6dynamicrouting = 'DISABLED', [ValidateSet('VXLAN', 'VXLANGPE')] [string]$Type = 'VXLAN', [ValidateSet('IPv4', 'IPv6', 'ETHERNET', 'NSH')] [string]$Protocol = 'ETHERNET', [ValidateSet('ENABLED', 'DISABLED')] [string]$Innervlantagging = 'DISABLED', [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVxlan: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('port') ) { $payload.Add('port', $port) } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSBoundParameters.ContainsKey('type') ) { $payload.Add('type', $type) } if ( $PSBoundParameters.ContainsKey('protocol') ) { $payload.Add('protocol', $protocol) } if ( $PSBoundParameters.ContainsKey('innervlantagging') ) { $payload.Add('innervlantagging', $innervlantagging) } if ( $PSCmdlet.ShouldProcess("vxlan", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type vxlan -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVxlan -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVxlan: Finished" } } function Invoke-NSDeleteVxlan { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for "VXLAN" resource. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .EXAMPLE PS C:\>Invoke-NSDeleteVxlan -Id <double> An example how to delete vxlan config Object(s). .NOTES File Name : Invoke-NSDeleteVxlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id ) begin { Write-Verbose "Invoke-NSDeleteVxlan: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vxlan -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVxlan: Finished" } } function Invoke-NSUpdateVxlan { <# .SYNOPSIS Update Networking commands. config Object. .DESCRIPTION Configuration for "VXLAN" resource. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Vlan ID of VLANs whose traffic is allowed over this VXLAN. If you do not specify any VLAN IDs, the Citrix ADC allows traffic of all VLANs that are not part of any other VXLANs. Maximum value = 4094 .PARAMETER Port Specifies UDP destination port for VXLAN packets. Maximum value = 65534 .PARAMETER Dynamicrouting Enable dynamic routing on this VXLAN. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on this VXLAN. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .PARAMETER Innervlantagging Specifies whether Citrix ADC should generate VXLAN packets with inner VLAN tag. Possible values = ENABLED, DISABLED .PARAMETER PassThru Return details about the created vxlan item. .EXAMPLE PS C:\>Invoke-NSUpdateVxlan -id <double> An example how to update vxlan config Object(s). .NOTES File Name : Invoke-NSUpdateVxlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [double]$Vlan, [int]$Port, [ValidateSet('ENABLED', 'DISABLED')] [string]$Dynamicrouting, [ValidateSet('ENABLED', 'DISABLED')] [string]$Ipv6dynamicrouting, [ValidateSet('ENABLED', 'DISABLED')] [string]$Innervlantagging, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSUpdateVxlan: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('port') ) { $payload.Add('port', $port) } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSBoundParameters.ContainsKey('innervlantagging') ) { $payload.Add('innervlantagging', $innervlantagging) } if ( $PSCmdlet.ShouldProcess("vxlan", "Update Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vxlan -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVxlan -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUpdateVxlan: Finished" } } function Invoke-NSUnsetVxlan { <# .SYNOPSIS Unset Networking commands. config Object. .DESCRIPTION Configuration for "VXLAN" resource. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Vlan ID of VLANs whose traffic is allowed over this VXLAN. If you do not specify any VLAN IDs, the Citrix ADC allows traffic of all VLANs that are not part of any other VXLANs. Maximum value = 4094 .PARAMETER Port Specifies UDP destination port for VXLAN packets. Maximum value = 65534 .PARAMETER Dynamicrouting Enable dynamic routing on this VXLAN. Possible values = ENABLED, DISABLED .PARAMETER Ipv6dynamicrouting Enable all IPv6 dynamic routing protocols on this VXLAN. Note: For the ENABLED setting to work, you must configure IPv6 dynamic routing protocols from the VTYSH command line. Possible values = ENABLED, DISABLED .PARAMETER Innervlantagging Specifies whether Citrix ADC should generate VXLAN packets with inner VLAN tag. Possible values = ENABLED, DISABLED .EXAMPLE PS C:\>Invoke-NSUnsetVxlan -id <double> An example how to unset vxlan config Object(s). .NOTES File Name : Invoke-NSUnsetVxlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [double]$Id, [Boolean]$vlan, [Boolean]$port, [Boolean]$dynamicrouting, [Boolean]$ipv6dynamicrouting, [Boolean]$innervlantagging ) begin { Write-Verbose "Invoke-NSUnsetVxlan: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSBoundParameters.ContainsKey('port') ) { $payload.Add('port', $port) } if ( $PSBoundParameters.ContainsKey('dynamicrouting') ) { $payload.Add('dynamicrouting', $dynamicrouting) } if ( $PSBoundParameters.ContainsKey('ipv6dynamicrouting') ) { $payload.Add('ipv6dynamicrouting', $ipv6dynamicrouting) } if ( $PSBoundParameters.ContainsKey('innervlantagging') ) { $payload.Add('innervlantagging', $innervlantagging) } if ( $PSCmdlet.ShouldProcess("$id", "Unset Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type vxlan -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSUnsetVxlan: Finished" } } function Invoke-NSGetVxlan { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for "VXLAN" resource. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER GetAll Retrieve all vxlan object(s). .PARAMETER Count If specified, the count of the vxlan object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlan Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlan -GetAll Get all vxlan data. .EXAMPLE PS C:\>Invoke-NSGetVxlan -Count Get the number of vxlan objects. .EXAMPLE PS C:\>Invoke-NSGetVxlan -name <string> Get vxlan object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlan -Filter @{ 'name'='<value>' } Get vxlan data with a filter. .NOTES File Name : Invoke-NSGetVxlan Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetVxlan: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all vxlan objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlan objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlan objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlan configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlan configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlan: Ended" } } function Invoke-NSGetVxlanBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER GetAll Retrieve all vxlan_binding object(s). .PARAMETER Count If specified, the count of the vxlan_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlanBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlanBinding -GetAll Get all vxlan_binding data. .EXAMPLE PS C:\>Invoke-NSGetVxlanBinding -name <string> Get vxlan_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlanBinding -Filter @{ 'name'='<value>' } Get vxlan_binding data with a filter. .NOTES File Name : Invoke-NSGetVxlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVxlanBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vxlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlan_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlan_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlan_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlanBinding: Ended" } } function Invoke-NSGetVxlanIptunnelBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the iptunnel that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER GetAll Retrieve all vxlan_iptunnel_binding object(s). .PARAMETER Count If specified, the count of the vxlan_iptunnel_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlanIptunnelBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlanIptunnelBinding -GetAll Get all vxlan_iptunnel_binding data. .EXAMPLE PS C:\>Invoke-NSGetVxlanIptunnelBinding -Count Get the number of vxlan_iptunnel_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVxlanIptunnelBinding -name <string> Get vxlan_iptunnel_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlanIptunnelBinding -Filter @{ 'name'='<value>' } Get vxlan_iptunnel_binding data with a filter. .NOTES File Name : Invoke-NSGetVxlanIptunnelBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_iptunnel_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVxlanIptunnelBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vxlan_iptunnel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_iptunnel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlan_iptunnel_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_iptunnel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlan_iptunnel_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_iptunnel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlan_iptunnel_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_iptunnel_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlan_iptunnel_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_iptunnel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlanIptunnelBinding: Ended" } } function Invoke-NSAddVxlanNsip6Binding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Ipaddress The IP address assigned to the VXLAN. .PARAMETER Netmask Subnet mask for the network address defined for this VXLAN. .PARAMETER PassThru Return details about the created vxlan_nsip6_binding item. .EXAMPLE PS C:\>Invoke-NSAddVxlanNsip6Binding -id <double> An example how to add vxlan_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSAddVxlanNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [ValidateScript({ $_.Length -gt 1 })] [string]$Netmask, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVxlanNsip6Binding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSCmdlet.ShouldProcess("vxlan_nsip6_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vxlan_nsip6_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVxlanNsip6Binding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVxlanNsip6Binding: Finished" } } function Invoke-NSDeleteVxlanNsip6Binding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip6 that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Ipaddress The IP address assigned to the VXLAN. .PARAMETER Netmask Subnet mask for the network address defined for this VXLAN. .EXAMPLE PS C:\>Invoke-NSDeleteVxlanNsip6Binding -Id <double> An example how to delete vxlan_nsip6_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVxlanNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask ) begin { Write-Verbose "Invoke-NSDeleteVxlanNsip6Binding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vxlan_nsip6_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVxlanNsip6Binding: Finished" } } function Invoke-NSGetVxlanNsip6Binding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip6 that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER GetAll Retrieve all vxlan_nsip6_binding object(s). .PARAMETER Count If specified, the count of the vxlan_nsip6_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsip6Binding Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsip6Binding -GetAll Get all vxlan_nsip6_binding data. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsip6Binding -Count Get the number of vxlan_nsip6_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsip6Binding -name <string> Get vxlan_nsip6_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsip6Binding -Filter @{ 'name'='<value>' } Get vxlan_nsip6_binding data with a filter. .NOTES File Name : Invoke-NSGetVxlanNsip6Binding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_nsip6_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVxlanNsip6Binding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vxlan_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlan_nsip6_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlan_nsip6_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlan_nsip6_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip6_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlan_nsip6_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip6_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlanNsip6Binding: Ended" } } function Invoke-NSAddVxlanNsipBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Ipaddress The IP address assigned to the VXLAN. .PARAMETER Netmask Subnet mask for the network address defined for this VXLAN. .PARAMETER PassThru Return details about the created vxlan_nsip_binding item. .EXAMPLE PS C:\>Invoke-NSAddVxlanNsipBinding -id <double> An example how to add vxlan_nsip_binding config Object(s). .NOTES File Name : Invoke-NSAddVxlanNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVxlanNsipBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('ipaddress') ) { $payload.Add('ipaddress', $ipaddress) } if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) } if ( $PSCmdlet.ShouldProcess("vxlan_nsip_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vxlan_nsip_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVxlanNsipBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVxlanNsipBinding: Finished" } } function Invoke-NSDeleteVxlanNsipBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the nsip that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Ipaddress The IP address assigned to the VXLAN. .PARAMETER Netmask Subnet mask for the network address defined for this VXLAN. .EXAMPLE PS C:\>Invoke-NSDeleteVxlanNsipBinding -Id <double> An example how to delete vxlan_nsip_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVxlanNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Ipaddress, [string]$Netmask ) begin { Write-Verbose "Invoke-NSDeleteVxlanNsipBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Ipaddress') ) { $arguments.Add('ipaddress', $Ipaddress) } if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vxlan_nsip_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVxlanNsipBinding: Finished" } } function Invoke-NSGetVxlanNsipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the nsip that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER GetAll Retrieve all vxlan_nsip_binding object(s). .PARAMETER Count If specified, the count of the vxlan_nsip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsipBinding -GetAll Get all vxlan_nsip_binding data. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsipBinding -Count Get the number of vxlan_nsip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsipBinding -name <string> Get vxlan_nsip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlanNsipBinding -Filter @{ 'name'='<value>' } Get vxlan_nsip_binding data with a filter. .NOTES File Name : Invoke-NSGetVxlanNsipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_nsip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVxlanNsipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vxlan_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlan_nsip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlan_nsip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlan_nsip_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlan_nsip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_nsip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlanNsipBinding: Ended" } } function Invoke-NSAddVxlanSrcipBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the srcip that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Srcip The source IP address to use in outgoing vxlan packets. .PARAMETER PassThru Return details about the created vxlan_srcip_binding item. .EXAMPLE PS C:\>Invoke-NSAddVxlanSrcipBinding -id <double> An example how to add vxlan_srcip_binding config Object(s). .NOTES File Name : Invoke-NSAddVxlanSrcipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_srcip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [ValidateScript({ $_.Length -gt 1 })] [string]$Srcip, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVxlanSrcipBinding: Starting" } process { try { $payload = @{ id = $id } if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) } if ( $PSCmdlet.ShouldProcess("vxlan_srcip_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vxlan_srcip_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVxlanSrcipBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVxlanSrcipBinding: Finished" } } function Invoke-NSDeleteVxlanSrcipBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the srcip that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER Srcip The source IP address to use in outgoing vxlan packets. .EXAMPLE PS C:\>Invoke-NSDeleteVxlanSrcipBinding -Id <double> An example how to delete vxlan_srcip_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVxlanSrcipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_srcip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [double]$Id, [string]$Srcip ) begin { Write-Verbose "Invoke-NSDeleteVxlanSrcipBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Srcip') ) { $arguments.Add('srcip', $Srcip) } if ( $PSCmdlet.ShouldProcess("$id", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vxlan_srcip_binding -NitroPath nitro/v1/config -Resource $id -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVxlanSrcipBinding: Finished" } } function Invoke-NSGetVxlanSrcipBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the srcip that can be bound to vxlan. .PARAMETER Id A positive integer, which is also called VXLAN Network Identifier (VNI), that uniquely identifies a VXLAN. Maximum value = 16777215 .PARAMETER GetAll Retrieve all vxlan_srcip_binding object(s). .PARAMETER Count If specified, the count of the vxlan_srcip_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlanSrcipBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlanSrcipBinding -GetAll Get all vxlan_srcip_binding data. .EXAMPLE PS C:\>Invoke-NSGetVxlanSrcipBinding -Count Get the number of vxlan_srcip_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVxlanSrcipBinding -name <string> Get vxlan_srcip_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlanSrcipBinding -Filter @{ 'name'='<value>' } Get vxlan_srcip_binding data with a filter. .NOTES File Name : Invoke-NSGetVxlanSrcipBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlan_srcip_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [double]$Id, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVxlanSrcipBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vxlan_srcip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_srcip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlan_srcip_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_srcip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlan_srcip_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_srcip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlan_srcip_binding configuration for property 'id'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_srcip_binding -NitroPath nitro/v1/config -Resource $id -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlan_srcip_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlan_srcip_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlanSrcipBinding: Ended" } } function Invoke-NSAddVxlanvlanmap { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Configuration for vxlan vlan mapping resource. .PARAMETER Name Name of the mapping table. .PARAMETER PassThru Return details about the created vxlanvlanmap item. .EXAMPLE PS C:\>Invoke-NSAddVxlanvlanmap -name <string> An example how to add vxlanvlanmap config Object(s). .NOTES File Name : Invoke-NSAddVxlanvlanmap Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlanvlanmap/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVxlanvlanmap: Starting" } process { try { $payload = @{ name = $name } if ( $PSCmdlet.ShouldProcess("vxlanvlanmap", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type vxlanvlanmap -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVxlanvlanmap -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVxlanvlanmap: Finished" } } function Invoke-NSDeleteVxlanvlanmap { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Configuration for vxlan vlan mapping resource. .PARAMETER Name Name of the mapping table. .EXAMPLE PS C:\>Invoke-NSDeleteVxlanvlanmap -Name <string> An example how to delete vxlanvlanmap config Object(s). .NOTES File Name : Invoke-NSDeleteVxlanvlanmap Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlanvlanmap/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name ) begin { Write-Verbose "Invoke-NSDeleteVxlanvlanmap: Starting" } process { try { $arguments = @{ } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vxlanvlanmap -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVxlanvlanmap: Finished" } } function Invoke-NSGetVxlanvlanmap { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Configuration for vxlan vlan mapping resource. .PARAMETER Name Name of the mapping table. .PARAMETER GetAll Retrieve all vxlanvlanmap object(s). .PARAMETER Count If specified, the count of the vxlanvlanmap object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmap Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmap -GetAll Get all vxlanvlanmap data. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmap -Count Get the number of vxlanvlanmap objects. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmap -name <string> Get vxlanvlanmap object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmap -Filter @{ 'name'='<value>' } Get vxlanvlanmap data with a filter. .NOTES File Name : Invoke-NSGetVxlanvlanmap Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlanvlanmap/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll, [Parameter(ParameterSetName = 'GetAll')] [Parameter(ParameterSetName = 'Get')] [Switch]$ViewSummary ) begin { Write-Verbose "Invoke-NSGetVxlanvlanmap: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ } Write-Verbose "Retrieving all vxlanvlanmap objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlanvlanmap objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlanvlanmap objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlanvlanmap configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlanvlanmap configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlanvlanmap: Ended" } } function Invoke-NSGetVxlanvlanmapBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object which returns the resources bound to vxlanvlanmap. .PARAMETER Name Name of the mapping table. .PARAMETER GetAll Retrieve all vxlanvlanmap_binding object(s). .PARAMETER Count If specified, the count of the vxlanvlanmap_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapBinding -GetAll Get all vxlanvlanmap_binding data. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapBinding -name <string> Get vxlanvlanmap_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapBinding -Filter @{ 'name'='<value>' } Get vxlanvlanmap_binding data with a filter. .NOTES File Name : Invoke-NSGetVxlanvlanmapBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlanvlanmap_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVxlanvlanmapBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vxlanvlanmap_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlanvlanmap_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlanvlanmap_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlanvlanmap_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlanvlanmap_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlanvlanmapBinding: Ended" } } function Invoke-NSAddVxlanvlanmapVxlanBinding { <# .SYNOPSIS Add Networking commands. config Object. .DESCRIPTION Binding object showing the vxlan that can be bound to vxlanvlanmap. .PARAMETER Name Name of the mapping table. .PARAMETER Vxlan The VXLAN assigned to the vlan inside the cloud. Maximum value = 16777215 .PARAMETER Vlan The vlan id or the range of vlan ids in the on-premise network. .PARAMETER PassThru Return details about the created vxlanvlanmap_vxlan_binding item. .EXAMPLE PS C:\>Invoke-NSAddVxlanvlanmapVxlanBinding -name <string> An example how to add vxlanvlanmap_vxlan_binding config Object(s). .NOTES File Name : Invoke-NSAddVxlanvlanmapVxlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlanvlanmap_vxlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [double]$Vxlan, [ValidateLength(1, 4094)] [string[]]$Vlan, [Switch]$PassThru ) begin { Write-Verbose "Invoke-NSAddVxlanvlanmapVxlanBinding: Starting" } process { try { $payload = @{ name = $name } if ( $PSBoundParameters.ContainsKey('vxlan') ) { $payload.Add('vxlan', $vxlan) } if ( $PSBoundParameters.ContainsKey('vlan') ) { $payload.Add('vlan', $vlan) } if ( $PSCmdlet.ShouldProcess("vxlanvlanmap_vxlan_binding", "Add Networking commands. config Object") ) { $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type vxlanvlanmap_vxlan_binding -Payload $payload -GetWarning #HTTP Status Code on Success: 201 Created #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error if ( $PSBoundParameters.ContainsKey('PassThru') ) { Write-Output (Invoke-NSGetVxlanvlanmapVxlanBinding -Filter $payload) } else { Write-Output $result } } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSAddVxlanvlanmapVxlanBinding: Finished" } } function Invoke-NSDeleteVxlanvlanmapVxlanBinding { <# .SYNOPSIS Delete Networking commands. config Object. .DESCRIPTION Binding object showing the vxlan that can be bound to vxlanvlanmap. .PARAMETER Name Name of the mapping table. .PARAMETER Vxlan The VXLAN assigned to the vlan inside the cloud. Maximum value = 16777215 .EXAMPLE PS C:\>Invoke-NSDeleteVxlanvlanmapVxlanBinding -Name <string> An example how to delete vxlanvlanmap_vxlan_binding config Object(s). .NOTES File Name : Invoke-NSDeleteVxlanvlanmapVxlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlanvlanmap_vxlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(Mandatory)] [string]$Name, [double]$Vxlan ) begin { Write-Verbose "Invoke-NSDeleteVxlanvlanmapVxlanBinding: Starting" } process { try { $arguments = @{ } if ( $PSBoundParameters.ContainsKey('Vxlan') ) { $arguments.Add('vxlan', $Vxlan) } if ( $PSCmdlet.ShouldProcess("$name", "Delete Networking commands. config Object") ) { $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type vxlanvlanmap_vxlan_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments #HTTP Status Code on Success: 200 OK #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error Write-Output $response } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" throw $_ } } end { Write-Verbose "Invoke-NSDeleteVxlanvlanmapVxlanBinding: Finished" } } function Invoke-NSGetVxlanvlanmapVxlanBinding { <# .SYNOPSIS Get Networking commands. config object(s). .DESCRIPTION Binding object showing the vxlan that can be bound to vxlanvlanmap. .PARAMETER Name Name of the mapping table. .PARAMETER GetAll Retrieve all vxlanvlanmap_vxlan_binding object(s). .PARAMETER Count If specified, the count of the vxlanvlanmap_vxlan_binding object(s) will be returned. .PARAMETER Filter Specify a filter. -Filter @{ 'name'='<value>' } .PARAMETER ViewSummary When specified, only a summary of information is returned. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapVxlanBinding Get data. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapVxlanBinding -GetAll Get all vxlanvlanmap_vxlan_binding data. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapVxlanBinding -Count Get the number of vxlanvlanmap_vxlan_binding objects. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapVxlanBinding -name <string> Get vxlanvlanmap_vxlan_binding object by specifying for example the name. .EXAMPLE PS C:\>Invoke-NSGetVxlanvlanmapVxlanBinding -Filter @{ 'name'='<value>' } Get vxlanvlanmap_vxlan_binding data with a filter. .NOTES File Name : Invoke-NSGetVxlanvlanmapVxlanBinding Version : v2311.2021 Author : John Billekens Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/network/vxlanvlanmap_vxlan_binding/ Requires : PowerShell v5.1 and up NS 13.x and up. NS 12 and lower may work, not guaranteed (best effort). .LINK https://blog.j81.nl #> [CmdletBinding(DefaultParameterSetName = "GetAll")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')] param( [Parameter(DontShow)] [Object]$NSSession = (Get-NSSession), [Parameter(ParameterSetName = 'GetByResource')] [ValidateScript({ $_.Length -gt 1 })] [string]$Name, [Parameter(ParameterSetName = 'Count', Mandatory)] [Switch]$Count, [hashtable]$Filter = @{ }, [Parameter(ParameterSetName = 'GetAll')] [Switch]$GetAll ) begin { Write-Verbose "Invoke-NSGetVxlanvlanmapVxlanBinding: Beginning" } process { try { if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) { $query = @{ bulkbindings = 'yes' } Write-Verbose "Retrieving all vxlanvlanmap_vxlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_vxlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) { if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } } Write-Verbose "Retrieving total count for vxlanvlanmap_vxlan_binding objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_vxlan_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) { Write-Verbose "Retrieving vxlanvlanmap_vxlan_binding objects by arguments" $arguments = @{ } $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_vxlan_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) { Write-Verbose "Retrieving vxlanvlanmap_vxlan_binding configuration for property 'name'" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_vxlan_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning } else { Write-Verbose "Retrieving vxlanvlanmap_vxlan_binding configuration objects" $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type vxlanvlanmap_vxlan_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning } } catch { Write-Verbose "ERROR: $($_.Exception.Message)" $response = $null } Write-Output $response } end { Write-Verbose "Invoke-NSGetVxlanvlanmapVxlanBinding: Ended" } } # SIG # Begin signature block # MIIkmgYJKoZIhvcNAQcCoIIkizCCJIcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB3kKWH1f1AZn6c # Cyt/50or/xSjklglNHmoRhhm3oGOMaCCHl4wggTzMIID26ADAgECAhAsJ03zZBC0 # i/247uUvWN5TMA0GCSqGSIb3DQEBCwUAMHwxCzAJBgNVBAYTAkdCMRswGQYDVQQI # ExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoT # D1NlY3RpZ28gTGltaXRlZDEkMCIGA1UEAxMbU2VjdGlnbyBSU0EgQ29kZSBTaWdu # aW5nIENBMB4XDTIxMDUwNTAwMDAwMFoXDTI0MDUwNDIzNTk1OVowWzELMAkGA1UE # BhMCTkwxEjAQBgNVBAcMCVZlbGRob3ZlbjEbMBkGA1UECgwSSm9oYW5uZXMgQmls # bGVrZW5zMRswGQYDVQQDDBJKb2hhbm5lcyBCaWxsZWtlbnMwggEiMA0GCSqGSIb3 # DQEBAQUAA4IBDwAwggEKAoIBAQCsfgRG81keOHalHfCUgxOa1Qy4VNOnGxB8SL8e # rjP9SfcF13McP7F1HGka5Be495pTZ+duGbaQMNozwg/5Dg9IRJEeBabeSSJJCbZo # SNpmUu7NNRRfidQxlPC81LxTVHxJ7In0MEfCVm7rWcri28MRCAuafqOfSE+hyb1Z # /tKyCyQ5RUq3kjs/CF+VfMHsJn6ZT63YqewRkwHuc7UogTTZKjhPJ9prGLTer8UX # UgvsGRbvhYZXIEuy+bmx/iJ1yRl1kX4nj6gUYzlhemOnlSDD66YOrkLDhXPMXLym # AN7h0/W5Bo//R5itgvdGBkXkWCKRASnq/9PTcoxW6mwtgU8xAgMBAAGjggGQMIIB # jDAfBgNVHSMEGDAWgBQO4TqoUzox1Yq+wbutZxoDha00DjAdBgNVHQ4EFgQUZWMy # gC0i1u2NZ1msk2Mm5nJm5AswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAw # EwYDVR0lBAwwCgYIKwYBBQUHAwMwEQYJYIZIAYb4QgEBBAQDAgQQMEoGA1UdIARD # MEEwNQYMKwYBBAGyMQECAQMCMCUwIwYIKwYBBQUHAgEWF2h0dHBzOi8vc2VjdGln # by5jb20vQ1BTMAgGBmeBDAEEATBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3Js # LnNlY3RpZ28uY29tL1NlY3RpZ29SU0FDb2RlU2lnbmluZ0NBLmNybDBzBggrBgEF # BQcBAQRnMGUwPgYIKwYBBQUHMAKGMmh0dHA6Ly9jcnQuc2VjdGlnby5jb20vU2Vj # dGlnb1JTQUNvZGVTaWduaW5nQ0EuY3J0MCMGCCsGAQUFBzABhhdodHRwOi8vb2Nz # cC5zZWN0aWdvLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEARjv9ieRocb1DXRWm3XtY # jjuSRjlvkoPd9wS6DNfsGlSU42BFd9LCKSyRREZVu8FDq7dN0PhD4bBTT+k6AgrY # KG6f/8yUponOdxskv850SjN2S2FeVuR20pqActMrpd1+GCylG8mj8RGjdrLQ3QuX # qYKS68WJ39WWYdVB/8Ftajir5p6sAfwHErLhbJS6WwmYjGI/9SekossvU8mZjZwo # Gbu+fjZhPc4PhjbEh0ABSsPMfGjQQsg5zLFjg/P+cS6hgYI7qctToo0TexGe32DY # fFWHrHuBErW2qXEJvzSqM5OtLRD06a4lH5ZkhojhMOX9S8xDs/ArDKgX1j1Xm4Tu # DjCCBYEwggRpoAMCAQICEDlyRDr5IrdR19NsEN0xNZUwDQYJKoZIhvcNAQEMBQAw # ezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G # A1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV # BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0xOTAzMTIwMDAwMDBaFw0y # ODEyMzEyMzU5NTlaMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMKTmV3IEplcnNl # eTEUMBIGA1UEBxMLSmVyc2V5IENpdHkxHjAcBgNVBAoTFVRoZSBVU0VSVFJVU1Qg # TmV0d29yazEuMCwGA1UEAxMlVVNFUlRydXN0IFJTQSBDZXJ0aWZpY2F0aW9uIEF1 # dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIASZRc2DsPb # CLPQrFcNdu3NJ9NMrVCDYeKqIE0JLWQJ3M6Jn8w9qez2z8Hc8dOx1ns3KBErR9o5 # xrw6GbRfpr19naNjQrZ28qk7K5H44m/Q7BYgkAk+4uh0yRi0kdRiZNt/owbxiBhq # kCI8vP4T8IcUe/bkH47U5FHGEWdGCFHLhhRUP7wz/n5snP8WnRi9UY41pqdmyHJn # 2yFmsdSbeAPAUDrozPDcvJ5M/q8FljUfV1q3/875PbcstvZU3cjnEjpNrkyKt1ya # tLcgPcp/IjSufjtoZgFE5wFORlObM2D3lL5TN5BzQ/Myw1Pv26r+dE5px2uMYJPe # xMcM3+EyrsyTO1F4lWeL7j1W/gzQaQ8bD/MlJmszbfduR/pzQ+V+DqVmsSl8MoRj # VYnEDcGTVDAZE6zTfTen6106bDVc20HXEtqpSQvf2ICKCZNijrVmzyWIzYS4sT+k # OQ/ZAp7rEkyVfPNrBaleFoPMuGfi6BOdzFuC00yz7Vv/3uVzrCM7LQC/NVV0CUnY # SVgaf5I25lGSDvMmfRxNF7zJ7EMm0L9BX0CpRET0medXh55QH1dUqD79dGMvsVBl # CeZYQi5DGky08CVHWfoEHpPUJkZKUIGy3r54t/xnFeHJV4QeD2PW6WK61l9VLupc # xigIBCU5uA4rqfJMlxwHPw1S9e3vL4IPAgMBAAGjgfIwge8wHwYDVR0jBBgwFoAU # oBEKIz6W8Qfs4q8p74Klf9AwpLQwHQYDVR0OBBYEFFN5v1qqK0rPVIDh2JvAnfKy # A2bLMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MBEGA1UdIAQKMAgw # BgYEVR0gADBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3JsLmNvbW9kb2NhLmNv # bS9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDA0BggrBgEFBQcBAQQoMCYwJAYI # KwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2NhLmNvbTANBgkqhkiG9w0BAQwF # AAOCAQEAGIdR3HQhPZyK4Ce3M9AuzOzw5steEd4ib5t1jp5y/uTW/qofnJYt7wNK # fq70jW9yPEM7wD/ruN9cqqnGrvL82O6je0P2hjZ8FODN9Pc//t64tIrwkZb+/UNk # fv3M0gGhfX34GRnJQisTv1iLuqSiZgR2iJFODIkUzqJNyTKzuugUGrxx8VvwQQuY # AAoiAxDlDLH5zZI3Ge078eQ6tvlFEyZ1r7uq7z97dzvSxAKRPRkA0xdcOds/exgN # Rc2ThZYvXd9ZFk8/Ub3VRRg/7UqO6AZhdCMWtQ1QcydER38QXYkqa4UxFMToqWpM # gLxqeM+4f452cpkMnf7XkQgWoaNflTCCBfUwggPdoAMCAQICEB2iSDBvmyYY0ILg # ln0z02owDQYJKoZIhvcNAQEMBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpO # ZXcgSmVyc2V5MRQwEgYDVQQHEwtKZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVT # RVJUUlVTVCBOZXR3b3JrMS4wLAYDVQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmlj # YXRpb24gQXV0aG9yaXR5MB4XDTE4MTEwMjAwMDAwMFoXDTMwMTIzMTIzNTk1OVow # fDELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G # A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMSQwIgYDVQQD # ExtTZWN0aWdvIFJTQSBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3DQEBAQUA # A4IBDwAwggEKAoIBAQCGIo0yhXoYn0nwli9jCB4t3HyfFM/jJrYlZilAhlRGdDFi # xRDtsocnppnLlTDAVvWkdcapDlBipVGREGrgS2Ku/fD4GKyn/+4uMyD6DBmJqGx7 # rQDDYaHcaWVtH24nlteXUYam9CflfGqLlR5bYNV+1xaSnAAvaPeX7Wpyvjg7Y96P # v25MQV0SIAhZ6DnNj9LWzwa0VwW2TqE+V2sfmLzEYtYbC43HZhtKn52BxHJAteJf # 7wtF/6POF6YtVbC3sLxUap28jVZTxvC6eVBJLPcDuf4vZTXyIuosB69G2flGHNyM # fHEo8/6nxhTdVZFuihEN3wYklX0Pp6F8OtqGNWHTAgMBAAGjggFkMIIBYDAfBgNV # HSMEGDAWgBRTeb9aqitKz1SA4dibwJ3ysgNmyzAdBgNVHQ4EFgQUDuE6qFM6MdWK # vsG7rWcaA4WtNA4wDgYDVR0PAQH/BAQDAgGGMBIGA1UdEwEB/wQIMAYBAf8CAQAw # HQYDVR0lBBYwFAYIKwYBBQUHAwMGCCsGAQUFBwMIMBEGA1UdIAQKMAgwBgYEVR0g # ADBQBgNVHR8ESTBHMEWgQ6BBhj9odHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVNF # UlRydXN0UlNBQ2VydGlmaWNhdGlvbkF1dGhvcml0eS5jcmwwdgYIKwYBBQUHAQEE # ajBoMD8GCCsGAQUFBzAChjNodHRwOi8vY3J0LnVzZXJ0cnVzdC5jb20vVVNFUlRy # dXN0UlNBQWRkVHJ1c3RDQS5jcnQwJQYIKwYBBQUHMAGGGWh0dHA6Ly9vY3NwLnVz # ZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggIBAE1jUO1HNEphpNveaiqMm/EA # AB4dYns61zLC9rPgY7P7YQCImhttEAcET7646ol4IusPRuzzRl5ARokS9At3Wpwq # QTr81vTr5/cVlTPDoYMot94v5JT3hTODLUpASL+awk9KsY8k9LOBN9O3ZLCmI2pZ # aFJCX/8E6+F0ZXkI9amT3mtxQJmWunjxucjiwwgWsatjWsgVgG10Xkp1fqW4w2y1 # z99KeYdcx0BNYzX2MNPPtQoOCwR/oEuuu6Ol0IQAkz5TXTSlADVpbL6fICUQDRn7 # UJBhvjmPeo5N9p8OHv4HURJmgyYZSJXOSsnBf/M6BZv5b9+If8AjntIeQ3pFMcGc # TanwWbJZGehqjSkEAnd8S0vNcL46slVaeD68u28DECV3FTSK+TbMQ5Lkuk/xYpMo # JVcp+1EZx6ElQGqEV8aynbG8HArafGd+fS7pKEwYfsR7MUFxmksp7As9V1DSyt39 # ngVR5UR43QHesXWYDVQk/fBO4+L4g71yuss9Ou7wXheSaG3IYfmm8SoKC6W59J7u # mDIFhZ7r+YMp08Ysfb06dy6LN0KgaoLtO0qqlBCk4Q34F8W2WnkzGJLjtXX4oemO # CiUe5B7xn1qHI/+fpFGe+zmAEc3btcSnqIBv5VPU4OOiwtJbGvoyJi1qV3AcPKRY # LqPzW0sH3DJZ84enGm1YMIIG7DCCBNSgAwIBAgIQMA9vrN1mmHR8qUY2p3gtuTAN # BgkqhkiG9w0BAQwFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJz # ZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNU # IE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBB # dXRob3JpdHkwHhcNMTkwNTAyMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjB9MQswCQYD # VQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdT # YWxmb3JkMRgwFgYDVQQKEw9TZWN0aWdvIExpbWl0ZWQxJTAjBgNVBAMTHFNlY3Rp # Z28gUlNBIFRpbWUgU3RhbXBpbmcgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw # ggIKAoICAQDIGwGv2Sx+iJl9AZg/IJC9nIAhVJO5z6A+U++zWsB21hoEpc5Hg7Xr # xMxJNMvzRWW5+adkFiYJ+9UyUnkuyWPCE5u2hj8BBZJmbyGr1XEQeYf0RirNxFrJ # 29ddSU1yVg/cyeNTmDoqHvzOWEnTv/M5u7mkI0Ks0BXDf56iXNc48RaycNOjxN+z # xXKsLgp3/A2UUrf8H5VzJD0BKLwPDU+zkQGObp0ndVXRFzs0IXuXAZSvf4DP0REK # V4TJf1bgvUacgr6Unb+0ILBgfrhN9Q0/29DqhYyKVnHRLZRMyIw80xSinL0m/9NT # IMdgaZtYClT0Bef9Maz5yIUXx7gpGaQpL0bj3duRX58/Nj4OMGcrRrc1r5a+2kxg # zKi7nw0U1BjEMJh0giHPYla1IXMSHv2qyghYh3ekFesZVf/QOVQtJu5FGjpvzdeE # 8NfwKMVPZIMC1Pvi3vG8Aij0bdonigbSlofe6GsO8Ft96XZpkyAcSpcsdxkrk5WY # nJee647BeFbGRCXfBhKaBi2fA179g6JTZ8qx+o2hZMmIklnLqEbAyfKm/31X2xJ2 # +opBJNQb/HKlFKLUrUMcpEmLQTkUAx4p+hulIq6lw02C0I3aa7fb9xhAV3PwcaP7 # Sn1FNsH3jYL6uckNU4B9+rY5WDLvbxhQiddPnTO9GrWdod6VQXqngwIDAQABo4IB # WjCCAVYwHwYDVR0jBBgwFoAUU3m/WqorSs9UgOHYm8Cd8rIDZsswHQYDVR0OBBYE # FBqh+GEZIA/DQXdFKI7RNV8GEgRVMA4GA1UdDwEB/wQEAwIBhjASBgNVHRMBAf8E # CDAGAQH/AgEAMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBEGA1UdIAQKMAgwBgYEVR0g # ADBQBgNVHR8ESTBHMEWgQ6BBhj9odHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVNF # UlRydXN0UlNBQ2VydGlmaWNhdGlvbkF1dGhvcml0eS5jcmwwdgYIKwYBBQUHAQEE # ajBoMD8GCCsGAQUFBzAChjNodHRwOi8vY3J0LnVzZXJ0cnVzdC5jb20vVVNFUlRy # dXN0UlNBQWRkVHJ1c3RDQS5jcnQwJQYIKwYBBQUHMAGGGWh0dHA6Ly9vY3NwLnVz # ZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggIBAG1UgaUzXRbhtVOBkXXfA3oy # Cy0lhBGysNsqfSoF9bw7J/RaoLlJWZApbGHLtVDb4n35nwDvQMOt0+LkVvlYQc/x # QuUQff+wdB+PxlwJ+TNe6qAcJlhc87QRD9XVw+K81Vh4v0h24URnbY+wQxAPjeT5 # OGK/EwHFhaNMxcyyUzCVpNb0llYIuM1cfwGWvnJSajtCN3wWeDmTk5SbsdyybUFt # Z83Jb5A9f0VywRsj1sJVhGbks8VmBvbz1kteraMrQoohkv6ob1olcGKBc2NeoLvY # 3NdK0z2vgwY4Eh0khy3k/ALWPncEvAQ2ted3y5wujSMYuaPCRx3wXdahc1cFaJqn # yTdlHb7qvNhCg0MFpYumCf/RoZSmTqo9CfUFbLfSZFrYKiLCS53xOV5M3kg9mzSW # mglfjv33sVKRzj+J9hyhtal1H3G/W0NdZT1QgW6r8NDT/LKzH7aZlib0PHmLXGTM # ze4nmuWgwAxyh8FuTVrTHurwROYybxzrF06Uw3hlIDsPQaof6aFBnf6xuKBlKjTg # 3qj5PObBMLvAoGMs/FwWAKjQxH/qEZ0eBsambTJdtDgJK0kHqv3sMNrxpy/Pt/36 # 0KOE2See+wFmd7lWEOEgbsausfm2usg1XTN2jvF8IAwqd661ogKGuinutFoAsYyr # 4/kKyVRd1LlqdJ69SK6YMIIG9TCCBN2gAwIBAgIQOUwl4XygbSeoZeI72R0i1DAN # BgkqhkiG9w0BAQwFADB9MQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBN # YW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRgwFgYDVQQKEw9TZWN0aWdvIExp # bWl0ZWQxJTAjBgNVBAMTHFNlY3RpZ28gUlNBIFRpbWUgU3RhbXBpbmcgQ0EwHhcN # MjMwNTAzMDAwMDAwWhcNMzQwODAyMjM1OTU5WjBqMQswCQYDVQQGEwJHQjETMBEG # A1UECBMKTWFuY2hlc3RlcjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMSwwKgYD # VQQDDCNTZWN0aWdvIFJTQSBUaW1lIFN0YW1waW5nIFNpZ25lciAjNDCCAiIwDQYJ # KoZIhvcNAQEBBQADggIPADCCAgoCggIBAKSTKFJLzyeHdqQpHJk4wOcO1NEc7GjL # AWTkis13sHFlgryf/Iu7u5WY+yURjlqICWYRFFiyuiJb5vYy8V0twHqiDuDgVmTt # oeWBIHIgZEFsx8MI+vN9Xe8hmsJ+1yzDuhGYHvzTIAhCs1+/f4hYMqsws9iMepZK # GRNcrPznq+kcFi6wsDiVSs+FUKtnAyWhuzjpD2+pWpqRKBM1uR/zPeEkyGuxmegN # 77tN5T2MVAOR0Pwtz1UzOHoJHAfRIuBjhqe+/dKDcxIUm5pMCUa9NLzhS1B7cuBb # /Rm7HzxqGXtuuy1EKr48TMysigSTxleGoHM2K4GX+hubfoiH2FJ5if5udzfXu1Cf # +hglTxPyXnypsSBaKaujQod34PRMAkjdWKVTpqOg7RmWZRUpxe0zMCXmloOBmvZg # ZpBYB4DNQnWs+7SR0MXdAUBqtqgQ7vaNereeda/TpUsYoQyfV7BeJUeRdM11EtGc # b+ReDZvsdSbu/tP1ki9ShejaRFEqoswAyodmQ6MbAO+itZadYq0nC/IbSsnDlEI3 # iCCEqIeuw7ojcnv4VO/4ayewhfWnQ4XYKzl021p3AtGk+vXNnD3MH65R0Hts2B0t # EUJTcXTC5TWqLVIS2SXP8NPQkUMS1zJ9mGzjd0HI/x8kVO9urcY+VXvxXIc6ZPFg # SwVP77kv7AkTAgMBAAGjggGCMIIBfjAfBgNVHSMEGDAWgBQaofhhGSAPw0F3RSiO # 0TVfBhIEVTAdBgNVHQ4EFgQUAw8xyJEqk71j89FdTaQ0D9KVARgwDgYDVR0PAQH/ # BAQDAgbAMAwGA1UdEwEB/wQCMAAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwgwSgYD # VR0gBEMwQTA1BgwrBgEEAbIxAQIBAwgwJTAjBggrBgEFBQcCARYXaHR0cHM6Ly9z # ZWN0aWdvLmNvbS9DUFMwCAYGZ4EMAQQCMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6 # Ly9jcmwuc2VjdGlnby5jb20vU2VjdGlnb1JTQVRpbWVTdGFtcGluZ0NBLmNybDB0 # BggrBgEFBQcBAQRoMGYwPwYIKwYBBQUHMAKGM2h0dHA6Ly9jcnQuc2VjdGlnby5j # b20vU2VjdGlnb1JTQVRpbWVTdGFtcGluZ0NBLmNydDAjBggrBgEFBQcwAYYXaHR0 # cDovL29jc3Auc2VjdGlnby5jb20wDQYJKoZIhvcNAQEMBQADggIBAEybZVj64HnP # 7xXDMm3eM5Hrd1ji673LSjx13n6UbcMixwSV32VpYRMM9gye9YkgXsGHxwMkysel # 8Cbf+PgxZQ3g621RV6aMhFIIRhwqwt7y2opF87739i7Efu347Wi/elZI6WHlmjl3 # vL66kWSIdf9dhRY0J9Ipy//tLdr/vpMM7G2iDczD8W69IZEaIwBSrZfUYngqhHmo # 1z2sIY9wwyR5OpfxDaOjW1PYqwC6WPs1gE9fKHFsGV7Cg3KQruDG2PKZ++q0kmV8 # B3w1RB2tWBhrYvvebMQKqWzTIUZw3C+NdUwjwkHQepY7w0vdzZImdHZcN6CaJJ5O # X07Tjw/lE09ZRGVLQ2TPSPhnZ7lNv8wNsTow0KE9SK16ZeTs3+AB8LMqSjmswaT5 # qX010DJAoLEZKhghssh9BXEaSyc2quCYHIN158d+S4RDzUP7kJd2KhKsQMFwW5kK # QPqAbZRhe8huuchnZyRcUI0BIN4H9wHU+C4RzZ2D5fjKJRxEPSflsIZHKgsbhHZ9 # e2hPjbf3E7TtoC3ucw/ZELqdmSx813UfjxDElOZ+JOWVSoiMJ9aFZh35rmR2kehI # /shVCu0pwx/eOKbAFPsyPfipg2I2yMO+AIccq/pKQhyJA9z1XHxw2V14Tu6fXiDm # CWp8KwijSPUV/ARP380hHHrl9Y4a1LlAMYIFkjCCBY4CAQEwgZAwfDELMAkGA1UE # BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2Fs # Zm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMSQwIgYDVQQDExtTZWN0aWdv # IFJTQSBDb2RlIFNpZ25pbmcgQ0ECECwnTfNkELSL/bju5S9Y3lMwDQYJYIZIAWUD # BAIBBQCggYQwGAYKKwYBBAGCNwIBDDEKMAigAoAAoQKAADAZBgkqhkiG9w0BCQMx # DAYKKwYBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkq # hkiG9w0BCQQxIgQgOoaQ4+vcSh9pQqW6yYssgZlx/TKLi/aULteBj/ZQSlAwDQYJ # KoZIhvcNAQEBBQAEggEAJ1vM+Gk1eR3k+b4IEF84XGC6vgATSxkCYNfEybwkM9av # Gn3j8qEuT5If5nePizPATJBH6TXeTOs2kiCgMmiXokdbtK1RqeJ72Qa1sOCTTlMp # FhB/hjPhlx41mg15nZndTE9xYe2apHiQL4wLzvyV7sDehC3u/r6fmwxGzM0ykuEY # 4eu0PmE2GBCc/b9dP9glTfcq4Ygm/KkNkh6id/j+i0tz1yTWUU4p3EDdwiQKRr2B # /9TYgeCKVYC1RenmXwMLtTMzLtQdXL45ESNKKdTOt898AW/0tHEbuFBfzcqDZY9X # z5CHWo2tGYEmwJxr0LILMzvyArkm5XCwQ4owNARKX6GCA0swggNHBgkqhkiG9w0B # CQYxggM4MIIDNAIBATCBkTB9MQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRl # ciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRgwFgYDVQQKEw9TZWN0aWdv # IExpbWl0ZWQxJTAjBgNVBAMTHFNlY3RpZ28gUlNBIFRpbWUgU3RhbXBpbmcgQ0EC # EDlMJeF8oG0nqGXiO9kdItQwDQYJYIZIAWUDBAICBQCgeTAYBgkqhkiG9w0BCQMx # CwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0yMzExMjAyMDQyNTNaMD8GCSqG # SIb3DQEJBDEyBDAzGktLdqjFDvbyuRXbBI4owWGpj0ksaqR8pGslE05b17YAT12+ # va7VDZaTHnozJfAwDQYJKoZIhvcNAQEBBQAEggIAPs+KQoKBCIJPONjlarhdRPcd # M1INELpUOj4EsDHevd/FJ9JYynvqXgXyfTrwx2k2lSpO3xAi7Xq1BbzKocHh9YlG # 6nTPHv/2MgtajQeEblukAhWzai/afayLX+Q13pKtSQDqbe6W9jEhF/f24fKeDQnW # 4AZRSalEXLnfUGisk4ImK3WoCpX+EUaNzoJ3rlpljm/wy7cLvBVWB6IKDvYTgFQL # 9qyrXfxQsYyvPIRaB5NgDUpNTCF/CA9Xj6PWHYxyzQk6LiYfQNV2M9vQwFmxNnLf # 4ZOq9ROk2DAiTsIqUVQTtdvwyk5Mivhco3ISBf+kBrcN8nEVFdR3S1344mg/RCvr # b4NdSu2FXhDlisdS5sgpB7kIoP+CNavs0EdZybFlsAR972OcO05+rIu6BYVbhI/u # 8Ms+pqA9onxyLBNzZSQ5X1z+PU6PV5gX5Yon51GIayQSiQVveBBMEX1b/y6cyZoz # RIwveBjqjGexb0B35bh2wazjbgbaLn1HO7SNayfi81FXsyv9V4wgf3zxdMGwpnYb # +mJWa1S3uWznsII2c5Wg5q3wxd/ov4qLIRv8Fl7DKYf0JgH4r7pNylaEvypnACrF # kz5F1BhLvKsQYCzJOHINYJTSs3uUlYJEqj01+S0KbILJurEOITlIhf460I4xNcDo # qhTZy1FJuC3npTc6luk= # SIG # End signature block |