Public/adc-functions-conf-vpn.ps1

function Invoke-ADCAddVpnalwaysonprofile {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for AlwyasON profile resource.
    .PARAMETER Name
        name of AlwaysON profile.
    .PARAMETER Networkaccessonvpnfailure
        Option to block network traffic when tunnel is not established(and the config requires that tunnel be established). When set to onlyToGateway, the network traffic to and from the client (except Gateway IP) is blocked. When set to fullAccess, the network traffic is not blocked.
        Possible values = onlyToGateway, fullAccess
    .PARAMETER Clientcontrol
        Allow/Deny user to log off and connect to another Gateway.
        Possible values = ALLOW, DENY
    .PARAMETER Locationbasedvpn
        Option to decide if tunnel should be established when in enterprise network. When locationBasedVPN is remote, client tries to detect if it is located in enterprise network or not and establishes the tunnel if not in enterprise network. Dns suffixes configured using -add dns suffix- are used to decide if the client is in the enterprise network or not. If the resolution of the DNS suffix results in private IP, client is said to be in enterprise network. When set to EveryWhere, the client skips the check to detect if it is on the enterprise network and tries to establish the tunnel.
        Possible values = Remote, Everywhere
    .PARAMETER PassThru
        Return details about the created vpnalwaysonprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnalwaysonprofile -name <string>
        An example how to add vpnalwaysonprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnalwaysonprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnalwaysonprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateSet('onlyToGateway', 'fullAccess')]
        [string]$Networkaccessonvpnfailure = 'fullAccess',

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Clientcontrol = 'DENY',

        [ValidateSet('Remote', 'Everywhere')]
        [string]$Locationbasedvpn = 'Remote',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnalwaysonprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('networkaccessonvpnfailure') ) { $payload.Add('networkaccessonvpnfailure', $networkaccessonvpnfailure) }
            if ( $PSBoundParameters.ContainsKey('clientcontrol') ) { $payload.Add('clientcontrol', $clientcontrol) }
            if ( $PSBoundParameters.ContainsKey('locationbasedvpn') ) { $payload.Add('locationbasedvpn', $locationbasedvpn) }
            if ( $PSCmdlet.ShouldProcess("vpnalwaysonprofile", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnalwaysonprofile -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-ADCGetVpnalwaysonprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnalwaysonprofile: Finished"
    }
}

function Invoke-ADCDeleteVpnalwaysonprofile {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for AlwyasON profile resource.
    .PARAMETER Name
        name of AlwaysON profile.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnalwaysonprofile -Name <string>
        An example how to delete vpnalwaysonprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnalwaysonprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnalwaysonprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnalwaysonprofile: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnalwaysonprofile -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-ADCDeleteVpnalwaysonprofile: Finished"
    }
}

function Invoke-ADCUpdateVpnalwaysonprofile {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for AlwyasON profile resource.
    .PARAMETER Name
        name of AlwaysON profile.
    .PARAMETER Networkaccessonvpnfailure
        Option to block network traffic when tunnel is not established(and the config requires that tunnel be established). When set to onlyToGateway, the network traffic to and from the client (except Gateway IP) is blocked. When set to fullAccess, the network traffic is not blocked.
        Possible values = onlyToGateway, fullAccess
    .PARAMETER Clientcontrol
        Allow/Deny user to log off and connect to another Gateway.
        Possible values = ALLOW, DENY
    .PARAMETER Locationbasedvpn
        Option to decide if tunnel should be established when in enterprise network. When locationBasedVPN is remote, client tries to detect if it is located in enterprise network or not and establishes the tunnel if not in enterprise network. Dns suffixes configured using -add dns suffix- are used to decide if the client is in the enterprise network or not. If the resolution of the DNS suffix results in private IP, client is said to be in enterprise network. When set to EveryWhere, the client skips the check to detect if it is on the enterprise network and tries to establish the tunnel.
        Possible values = Remote, Everywhere
    .PARAMETER PassThru
        Return details about the created vpnalwaysonprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnalwaysonprofile -name <string>
        An example how to update vpnalwaysonprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnalwaysonprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnalwaysonprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateSet('onlyToGateway', 'fullAccess')]
        [string]$Networkaccessonvpnfailure,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Clientcontrol,

        [ValidateSet('Remote', 'Everywhere')]
        [string]$Locationbasedvpn,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnalwaysonprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('networkaccessonvpnfailure') ) { $payload.Add('networkaccessonvpnfailure', $networkaccessonvpnfailure) }
            if ( $PSBoundParameters.ContainsKey('clientcontrol') ) { $payload.Add('clientcontrol', $clientcontrol) }
            if ( $PSBoundParameters.ContainsKey('locationbasedvpn') ) { $payload.Add('locationbasedvpn', $locationbasedvpn) }
            if ( $PSCmdlet.ShouldProcess("vpnalwaysonprofile", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnalwaysonprofile -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-ADCGetVpnalwaysonprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnalwaysonprofile: Finished"
    }
}

function Invoke-ADCUnsetVpnalwaysonprofile {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for AlwyasON profile resource.
    .PARAMETER Name
        name of AlwaysON profile.
    .PARAMETER Networkaccessonvpnfailure
        Option to block network traffic when tunnel is not established(and the config requires that tunnel be established). When set to onlyToGateway, the network traffic to and from the client (except Gateway IP) is blocked. When set to fullAccess, the network traffic is not blocked.
        Possible values = onlyToGateway, fullAccess
    .PARAMETER Clientcontrol
        Allow/Deny user to log off and connect to another Gateway.
        Possible values = ALLOW, DENY
    .PARAMETER Locationbasedvpn
        Option to decide if tunnel should be established when in enterprise network. When locationBasedVPN is remote, client tries to detect if it is located in enterprise network or not and establishes the tunnel if not in enterprise network. Dns suffixes configured using -add dns suffix- are used to decide if the client is in the enterprise network or not. If the resolution of the DNS suffix results in private IP, client is said to be in enterprise network. When set to EveryWhere, the client skips the check to detect if it is on the enterprise network and tries to establish the tunnel.
        Possible values = Remote, Everywhere
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnalwaysonprofile -name <string>
        An example how to unset vpnalwaysonprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnalwaysonprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnalwaysonprofile
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$networkaccessonvpnfailure,

        [Boolean]$clientcontrol,

        [Boolean]$locationbasedvpn 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnalwaysonprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('networkaccessonvpnfailure') ) { $payload.Add('networkaccessonvpnfailure', $networkaccessonvpnfailure) }
            if ( $PSBoundParameters.ContainsKey('clientcontrol') ) { $payload.Add('clientcontrol', $clientcontrol) }
            if ( $PSBoundParameters.ContainsKey('locationbasedvpn') ) { $payload.Add('locationbasedvpn', $locationbasedvpn) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnalwaysonprofile -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-ADCUnsetVpnalwaysonprofile: Finished"
    }
}

function Invoke-ADCGetVpnalwaysonprofile {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for AlwyasON profile resource.
    .PARAMETER Name
        name of AlwaysON profile.
    .PARAMETER GetAll
        Retrieve all vpnalwaysonprofile object(s).
    .PARAMETER Count
        If specified, the count of the vpnalwaysonprofile 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-ADCGetVpnalwaysonprofile
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnalwaysonprofile -GetAll
        Get all vpnalwaysonprofile data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnalwaysonprofile -Count
        Get the number of vpnalwaysonprofile objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnalwaysonprofile -name <string>
        Get vpnalwaysonprofile object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnalwaysonprofile -Filter @{ 'name'='<value>' }
        Get vpnalwaysonprofile data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnalwaysonprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnalwaysonprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnalwaysonprofile: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnalwaysonprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnalwaysonprofile -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 vpnalwaysonprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnalwaysonprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnalwaysonprofile objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnalwaysonprofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnalwaysonprofile configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnalwaysonprofile -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnalwaysonprofile configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnalwaysonprofile -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-ADCGetVpnalwaysonprofile: Ended"
    }
}

function Invoke-ADCAddVpnclientlessaccesspolicy {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Clientless VPN rewrite policy resource.
    .PARAMETER Name
        Name of the new clientless access policy.
    .PARAMETER Rule
        Expression, or name of a named expression, specifying the traffic that matches the policy.
        The following requirements apply only to the Citrix ADC CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Profilename
        Name of the profile to invoke for the clientless access.
    .PARAMETER PassThru
        Return details about the created vpnclientlessaccesspolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnclientlessaccesspolicy -name <string> -rule <string> -profilename <string>
        An example how to add vpnclientlessaccesspolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnclientlessaccesspolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccesspolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [string]$Rule,

        [Parameter(Mandatory)]
        [string]$Profilename,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnclientlessaccesspolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                rule           = $rule
                profilename    = $profilename
            }

            if ( $PSCmdlet.ShouldProcess("vpnclientlessaccesspolicy", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnclientlessaccesspolicy -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-ADCGetVpnclientlessaccesspolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnclientlessaccesspolicy: Finished"
    }
}

function Invoke-ADCDeleteVpnclientlessaccesspolicy {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Clientless VPN rewrite policy resource.
    .PARAMETER Name
        Name of the new clientless access policy.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnclientlessaccesspolicy -Name <string>
        An example how to delete vpnclientlessaccesspolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnclientlessaccesspolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccesspolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnclientlessaccesspolicy: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnclientlessaccesspolicy -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-ADCDeleteVpnclientlessaccesspolicy: Finished"
    }
}

function Invoke-ADCUpdateVpnclientlessaccesspolicy {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Clientless VPN rewrite policy resource.
    .PARAMETER Name
        Name of the new clientless access policy.
    .PARAMETER Rule
        Expression, or name of a named expression, specifying the traffic that matches the policy.
        The following requirements apply only to the Citrix ADC CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Profilename
        Name of the profile to invoke for the clientless access.
    .PARAMETER PassThru
        Return details about the created vpnclientlessaccesspolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnclientlessaccesspolicy -name <string>
        An example how to update vpnclientlessaccesspolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnclientlessaccesspolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccesspolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Rule,

        [string]$Profilename,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnclientlessaccesspolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('rule') ) { $payload.Add('rule', $rule) }
            if ( $PSBoundParameters.ContainsKey('profilename') ) { $payload.Add('profilename', $profilename) }
            if ( $PSCmdlet.ShouldProcess("vpnclientlessaccesspolicy", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnclientlessaccesspolicy -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-ADCGetVpnclientlessaccesspolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnclientlessaccesspolicy: Finished"
    }
}

function Invoke-ADCGetVpnclientlessaccesspolicy {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for Clientless VPN rewrite policy resource.
    .PARAMETER Name
        Name of the new clientless access policy.
    .PARAMETER GetAll
        Retrieve all vpnclientlessaccesspolicy object(s).
    .PARAMETER Count
        If specified, the count of the vpnclientlessaccesspolicy 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-ADCGetVpnclientlessaccesspolicy
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicy -GetAll
        Get all vpnclientlessaccesspolicy data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicy -Count
        Get the number of vpnclientlessaccesspolicy objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicy -name <string>
        Get vpnclientlessaccesspolicy object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicy -Filter @{ 'name'='<value>' }
        Get vpnclientlessaccesspolicy data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnclientlessaccesspolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccesspolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnclientlessaccesspolicy: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnclientlessaccesspolicy objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy -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 vpnclientlessaccesspolicy objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy -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-ADCGetVpnclientlessaccesspolicy: Ended"
    }
}

function Invoke-ADCGetVpnclientlessaccesspolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to vpnclientlessaccesspolicy.
    .PARAMETER Name
        Name of the clientless access policy to display.
    .PARAMETER GetAll
        Retrieve all vpnclientlessaccesspolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnclientlessaccesspolicy_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-ADCGetVpnclientlessaccesspolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicybinding -GetAll
        Get all vpnclientlessaccesspolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicybinding -name <string>
        Get vpnclientlessaccesspolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicybinding -Filter @{ 'name'='<value>' }
        Get vpnclientlessaccesspolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnclientlessaccesspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccesspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnclientlessaccesspolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnclientlessaccesspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_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 vpnclientlessaccesspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_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-ADCGetVpnclientlessaccesspolicybinding: Ended"
    }
}

function Invoke-ADCGetVpnclientlessaccesspolicyvpnglobalbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnglobal that can be bound to vpnclientlessaccesspolicy.
    .PARAMETER Name
        Name of the clientless access policy to display.
    .PARAMETER GetAll
        Retrieve all vpnclientlessaccesspolicy_vpnglobal_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnclientlessaccesspolicy_vpnglobal_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-ADCGetVpnclientlessaccesspolicyvpnglobalbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicyvpnglobalbinding -GetAll
        Get all vpnclientlessaccesspolicy_vpnglobal_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicyvpnglobalbinding -Count
        Get the number of vpnclientlessaccesspolicy_vpnglobal_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicyvpnglobalbinding -name <string>
        Get vpnclientlessaccesspolicy_vpnglobal_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicyvpnglobalbinding -Filter @{ 'name'='<value>' }
        Get vpnclientlessaccesspolicy_vpnglobal_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnclientlessaccesspolicyvpnglobalbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccesspolicy_vpnglobal_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnclientlessaccesspolicyvpnglobalbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnclientlessaccesspolicy_vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnglobal_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 vpnclientlessaccesspolicy_vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_vpnglobal_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnglobal_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_vpnglobal_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnglobal_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_vpnglobal_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnglobal_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-ADCGetVpnclientlessaccesspolicyvpnglobalbinding: Ended"
    }
}

function Invoke-ADCGetVpnclientlessaccesspolicyvpnvserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnvserver that can be bound to vpnclientlessaccesspolicy.
    .PARAMETER Name
        Name of the clientless access policy to display.
    .PARAMETER GetAll
        Retrieve all vpnclientlessaccesspolicy_vpnvserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnclientlessaccesspolicy_vpnvserver_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-ADCGetVpnclientlessaccesspolicyvpnvserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicyvpnvserverbinding -GetAll
        Get all vpnclientlessaccesspolicy_vpnvserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicyvpnvserverbinding -Count
        Get the number of vpnclientlessaccesspolicy_vpnvserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicyvpnvserverbinding -name <string>
        Get vpnclientlessaccesspolicy_vpnvserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccesspolicyvpnvserverbinding -Filter @{ 'name'='<value>' }
        Get vpnclientlessaccesspolicy_vpnvserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnclientlessaccesspolicyvpnvserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccesspolicy_vpnvserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnclientlessaccesspolicyvpnvserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnclientlessaccesspolicy_vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnvserver_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 vpnclientlessaccesspolicy_vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_vpnvserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnvserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_vpnvserver_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnvserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnclientlessaccesspolicy_vpnvserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccesspolicy_vpnvserver_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-ADCGetVpnclientlessaccesspolicyvpnvserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnclientlessaccessprofile {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Clientless VPN rewrite profile resource.
    .PARAMETER Profilename
        Name for the Citrix Gateway clientless access profile. Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .PARAMETER PassThru
        Return details about the created vpnclientlessaccessprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnclientlessaccessprofile -profilename <string>
        An example how to add vpnclientlessaccessprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnclientlessaccessprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccessprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Profilename,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnclientlessaccessprofile: Starting"
    }
    process {
        try {
            $payload = @{ profilename = $profilename }

            if ( $PSCmdlet.ShouldProcess("vpnclientlessaccessprofile", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnclientlessaccessprofile -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-ADCGetVpnclientlessaccessprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnclientlessaccessprofile: Finished"
    }
}

function Invoke-ADCDeleteVpnclientlessaccessprofile {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Clientless VPN rewrite profile resource.
    .PARAMETER Profilename
        Name for the Citrix Gateway clientless access profile. Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnclientlessaccessprofile -Profilename <string>
        An example how to delete vpnclientlessaccessprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnclientlessaccessprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccessprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Profilename 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnclientlessaccessprofile: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$profilename", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnclientlessaccessprofile -NitroPath nitro/v1/config -Resource $profilename -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-ADCDeleteVpnclientlessaccessprofile: Finished"
    }
}

function Invoke-ADCUpdateVpnclientlessaccessprofile {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Clientless VPN rewrite profile resource.
    .PARAMETER Profilename
        Name for the Citrix Gateway clientless access profile. Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .PARAMETER Urlrewritepolicylabel
        Name of the configured URL rewrite policy label. If you do not specify a policy label name, then URLs are not rewritten.
    .PARAMETER Javascriptrewritepolicylabel
        Name of the configured JavaScript rewrite policy label. If you do not specify a policy label name, then JAVA scripts are not rewritten.
    .PARAMETER Reqhdrrewritepolicylabel
        Name of the configured Request rewrite policy label. If you do not specify a policy label name, then requests are not rewritten.
    .PARAMETER Reshdrrewritepolicylabel
        Name of the configured Response rewrite policy label.
    .PARAMETER Regexforfindingurlinjavascript
        Name of the pattern set that contains the regular expressions, which match the URL in Java script.
    .PARAMETER Regexforfindingurlincss
        Name of the pattern set that contains the regular expressions, which match the URL in the CSS.
    .PARAMETER Regexforfindingurlinxcomponent
        Name of the pattern set that contains the regular expressions, which match the URL in X Component.
    .PARAMETER Regexforfindingurlinxml
        Name of the pattern set that contains the regular expressions, which match the URL in XML.
    .PARAMETER Regexforfindingcustomurls
        Name of the pattern set that contains the regular expressions, which match the URLs in the custom content type other than HTML, CSS, XML, XCOMP, and JavaScript. The custom content type should be included in the patset ns_cvpn_custom_content_types.
    .PARAMETER Clientconsumedcookies
        Specify the name of the pattern set containing the names of the cookies, which are allowed between the client and the server. If a pattern set is not specified, Citrix Gateway does not allow any cookies between the client and the server. A cookie that is not specified in the pattern set is handled by Citrix Gateway on behalf of the client.
    .PARAMETER Requirepersistentcookie
        Specify whether a persistent session cookie is set and accepted for clientless access. If this parameter is set to ON, COM objects, such as MSOffice, which are invoked by the browser can access the files using clientless access. Use caution because the persistent cookie is stored on the disk.
        Possible values = ON, OFF
    .PARAMETER PassThru
        Return details about the created vpnclientlessaccessprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnclientlessaccessprofile -profilename <string>
        An example how to update vpnclientlessaccessprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnclientlessaccessprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccessprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Profilename,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Urlrewritepolicylabel,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Javascriptrewritepolicylabel,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Reqhdrrewritepolicylabel,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Reshdrrewritepolicylabel,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Regexforfindingurlinjavascript,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Regexforfindingurlincss,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Regexforfindingurlinxcomponent,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Regexforfindingurlinxml,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Regexforfindingcustomurls,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Clientconsumedcookies,

        [ValidateSet('ON', 'OFF')]
        [string]$Requirepersistentcookie,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnclientlessaccessprofile: Starting"
    }
    process {
        try {
            $payload = @{ profilename = $profilename }
            if ( $PSBoundParameters.ContainsKey('urlrewritepolicylabel') ) { $payload.Add('urlrewritepolicylabel', $urlrewritepolicylabel) }
            if ( $PSBoundParameters.ContainsKey('javascriptrewritepolicylabel') ) { $payload.Add('javascriptrewritepolicylabel', $javascriptrewritepolicylabel) }
            if ( $PSBoundParameters.ContainsKey('reqhdrrewritepolicylabel') ) { $payload.Add('reqhdrrewritepolicylabel', $reqhdrrewritepolicylabel) }
            if ( $PSBoundParameters.ContainsKey('reshdrrewritepolicylabel') ) { $payload.Add('reshdrrewritepolicylabel', $reshdrrewritepolicylabel) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingurlinjavascript') ) { $payload.Add('regexforfindingurlinjavascript', $regexforfindingurlinjavascript) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingurlincss') ) { $payload.Add('regexforfindingurlincss', $regexforfindingurlincss) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingurlinxcomponent') ) { $payload.Add('regexforfindingurlinxcomponent', $regexforfindingurlinxcomponent) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingurlinxml') ) { $payload.Add('regexforfindingurlinxml', $regexforfindingurlinxml) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingcustomurls') ) { $payload.Add('regexforfindingcustomurls', $regexforfindingcustomurls) }
            if ( $PSBoundParameters.ContainsKey('clientconsumedcookies') ) { $payload.Add('clientconsumedcookies', $clientconsumedcookies) }
            if ( $PSBoundParameters.ContainsKey('requirepersistentcookie') ) { $payload.Add('requirepersistentcookie', $requirepersistentcookie) }
            if ( $PSCmdlet.ShouldProcess("vpnclientlessaccessprofile", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnclientlessaccessprofile -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-ADCGetVpnclientlessaccessprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnclientlessaccessprofile: Finished"
    }
}

function Invoke-ADCUnsetVpnclientlessaccessprofile {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Clientless VPN rewrite profile resource.
    .PARAMETER Profilename
        Name for the Citrix Gateway clientless access profile. Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .PARAMETER Urlrewritepolicylabel
        Name of the configured URL rewrite policy label. If you do not specify a policy label name, then URLs are not rewritten.
    .PARAMETER Javascriptrewritepolicylabel
        Name of the configured JavaScript rewrite policy label. If you do not specify a policy label name, then JAVA scripts are not rewritten.
    .PARAMETER Reqhdrrewritepolicylabel
        Name of the configured Request rewrite policy label. If you do not specify a policy label name, then requests are not rewritten.
    .PARAMETER Reshdrrewritepolicylabel
        Name of the configured Response rewrite policy label.
    .PARAMETER Regexforfindingurlinjavascript
        Name of the pattern set that contains the regular expressions, which match the URL in Java script.
    .PARAMETER Regexforfindingurlincss
        Name of the pattern set that contains the regular expressions, which match the URL in the CSS.
    .PARAMETER Regexforfindingurlinxcomponent
        Name of the pattern set that contains the regular expressions, which match the URL in X Component.
    .PARAMETER Regexforfindingurlinxml
        Name of the pattern set that contains the regular expressions, which match the URL in XML.
    .PARAMETER Regexforfindingcustomurls
        Name of the pattern set that contains the regular expressions, which match the URLs in the custom content type other than HTML, CSS, XML, XCOMP, and JavaScript. The custom content type should be included in the patset ns_cvpn_custom_content_types.
    .PARAMETER Clientconsumedcookies
        Specify the name of the pattern set containing the names of the cookies, which are allowed between the client and the server. If a pattern set is not specified, Citrix Gateway does not allow any cookies between the client and the server. A cookie that is not specified in the pattern set is handled by Citrix Gateway on behalf of the client.
    .PARAMETER Requirepersistentcookie
        Specify whether a persistent session cookie is set and accepted for clientless access. If this parameter is set to ON, COM objects, such as MSOffice, which are invoked by the browser can access the files using clientless access. Use caution because the persistent cookie is stored on the disk.
        Possible values = ON, OFF
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnclientlessaccessprofile -profilename <string>
        An example how to unset vpnclientlessaccessprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnclientlessaccessprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccessprofile
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Profilename,

        [Boolean]$urlrewritepolicylabel,

        [Boolean]$javascriptrewritepolicylabel,

        [Boolean]$reqhdrrewritepolicylabel,

        [Boolean]$reshdrrewritepolicylabel,

        [Boolean]$regexforfindingurlinjavascript,

        [Boolean]$regexforfindingurlincss,

        [Boolean]$regexforfindingurlinxcomponent,

        [Boolean]$regexforfindingurlinxml,

        [Boolean]$regexforfindingcustomurls,

        [Boolean]$clientconsumedcookies,

        [Boolean]$requirepersistentcookie 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnclientlessaccessprofile: Starting"
    }
    process {
        try {
            $payload = @{ profilename = $profilename }
            if ( $PSBoundParameters.ContainsKey('urlrewritepolicylabel') ) { $payload.Add('urlrewritepolicylabel', $urlrewritepolicylabel) }
            if ( $PSBoundParameters.ContainsKey('javascriptrewritepolicylabel') ) { $payload.Add('javascriptrewritepolicylabel', $javascriptrewritepolicylabel) }
            if ( $PSBoundParameters.ContainsKey('reqhdrrewritepolicylabel') ) { $payload.Add('reqhdrrewritepolicylabel', $reqhdrrewritepolicylabel) }
            if ( $PSBoundParameters.ContainsKey('reshdrrewritepolicylabel') ) { $payload.Add('reshdrrewritepolicylabel', $reshdrrewritepolicylabel) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingurlinjavascript') ) { $payload.Add('regexforfindingurlinjavascript', $regexforfindingurlinjavascript) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingurlincss') ) { $payload.Add('regexforfindingurlincss', $regexforfindingurlincss) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingurlinxcomponent') ) { $payload.Add('regexforfindingurlinxcomponent', $regexforfindingurlinxcomponent) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingurlinxml') ) { $payload.Add('regexforfindingurlinxml', $regexforfindingurlinxml) }
            if ( $PSBoundParameters.ContainsKey('regexforfindingcustomurls') ) { $payload.Add('regexforfindingcustomurls', $regexforfindingcustomurls) }
            if ( $PSBoundParameters.ContainsKey('clientconsumedcookies') ) { $payload.Add('clientconsumedcookies', $clientconsumedcookies) }
            if ( $PSBoundParameters.ContainsKey('requirepersistentcookie') ) { $payload.Add('requirepersistentcookie', $requirepersistentcookie) }
            if ( $PSCmdlet.ShouldProcess("$profilename", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnclientlessaccessprofile -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-ADCUnsetVpnclientlessaccessprofile: Finished"
    }
}

function Invoke-ADCGetVpnclientlessaccessprofile {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for Clientless VPN rewrite profile resource.
    .PARAMETER Profilename
        Name for the Citrix Gateway clientless access profile. Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .PARAMETER GetAll
        Retrieve all vpnclientlessaccessprofile object(s).
    .PARAMETER Count
        If specified, the count of the vpnclientlessaccessprofile 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-ADCGetVpnclientlessaccessprofile
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccessprofile -GetAll
        Get all vpnclientlessaccessprofile data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccessprofile -Count
        Get the number of vpnclientlessaccessprofile objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccessprofile -name <string>
        Get vpnclientlessaccessprofile object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnclientlessaccessprofile -Filter @{ 'name'='<value>' }
        Get vpnclientlessaccessprofile data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnclientlessaccessprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnclientlessaccessprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Profilename,

        [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-ADCGetVpnclientlessaccessprofile: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnclientlessaccessprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccessprofile -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 vpnclientlessaccessprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccessprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnclientlessaccessprofile objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccessprofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnclientlessaccessprofile configuration for property 'profilename'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccessprofile -NitroPath nitro/v1/config -Resource $profilename -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnclientlessaccessprofile configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnclientlessaccessprofile -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-ADCGetVpnclientlessaccessprofile: Ended"
    }
}

function Invoke-ADCAddVpnepaprofile {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Epa profile resource.
    .PARAMETER Name
        name of device profile.
    .PARAMETER Filename
        filename of the deviceprofile data xml.
    .PARAMETER Data
        deviceprofile data xml.
    .PARAMETER PassThru
        Return details about the created vpnepaprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnepaprofile -name <string>
        An example how to add vpnepaprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnepaprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnepaprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Filename,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Data,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnepaprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('filename') ) { $payload.Add('filename', $filename) }
            if ( $PSBoundParameters.ContainsKey('data') ) { $payload.Add('data', $data) }
            if ( $PSCmdlet.ShouldProcess("vpnepaprofile", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnepaprofile -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-ADCGetVpnepaprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnepaprofile: Finished"
    }
}

function Invoke-ADCDeleteVpnepaprofile {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Epa profile resource.
    .PARAMETER Name
        name of device profile.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnepaprofile -Name <string>
        An example how to delete vpnepaprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnepaprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnepaprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnepaprofile: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnepaprofile -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-ADCDeleteVpnepaprofile: Finished"
    }
}

function Invoke-ADCGetVpnepaprofile {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for Epa profile resource.
    .PARAMETER Name
        name of device profile.
    .PARAMETER GetAll
        Retrieve all vpnepaprofile object(s).
    .PARAMETER Count
        If specified, the count of the vpnepaprofile 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-ADCGetVpnepaprofile
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnepaprofile -GetAll
        Get all vpnepaprofile data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnepaprofile -Count
        Get the number of vpnepaprofile objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnepaprofile -name <string>
        Get vpnepaprofile object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnepaprofile -Filter @{ 'name'='<value>' }
        Get vpnepaprofile data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnepaprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnepaprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnepaprofile: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnepaprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnepaprofile -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 vpnepaprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnepaprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnepaprofile objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnepaprofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnepaprofile configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnepaprofile -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnepaprofile configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnepaprofile -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-ADCGetVpnepaprofile: Ended"
    }
}

function Invoke-ADCAddVpneula {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for EULA for vservers resource.
    .PARAMETER Name
        Name for the eula.
    .PARAMETER PassThru
        Return details about the created vpneula item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpneula -name <string>
        An example how to add vpneula configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpneula
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpneula/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpneula: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }

            if ( $PSCmdlet.ShouldProcess("vpneula", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpneula -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-ADCGetVpneula -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpneula: Finished"
    }
}

function Invoke-ADCDeleteVpneula {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for EULA for vservers resource.
    .PARAMETER Name
        Name for the eula.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpneula -Name <string>
        An example how to delete vpneula configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpneula
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpneula/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpneula: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpneula -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-ADCDeleteVpneula: Finished"
    }
}

function Invoke-ADCGetVpneula {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for EULA for vservers resource.
    .PARAMETER Name
        Name for the eula.
    .PARAMETER GetAll
        Retrieve all vpneula object(s).
    .PARAMETER Count
        If specified, the count of the vpneula 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-ADCGetVpneula
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpneula -GetAll
        Get all vpneula data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpneula -Count
        Get the number of vpneula objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpneula -name <string>
        Get vpneula object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpneula -Filter @{ 'name'='<value>' }
        Get vpneula data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpneula
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpneula/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpneula: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpneula objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpneula -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 vpneula objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpneula -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpneula objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpneula -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpneula configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpneula -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpneula configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpneula -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-ADCGetVpneula: Ended"
    }
}

function Invoke-ADCAddVpnformssoaction {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Form sso action resource.
    .PARAMETER Name
        Name for the form based single sign-on profile.
    .PARAMETER Actionurl
        Root-relative URL to which the completed form is submitted.
    .PARAMETER Userfield
        Name of the form field in which the user types in the user ID.
    .PARAMETER Passwdfield
        Name of the form field in which the user types in the password.
    .PARAMETER Ssosuccessrule
        Expression that defines the criteria for SSO success. Expression such as checking for cookie in the response is a common example.
    .PARAMETER Namevaluepair
        Other name-value pair attributes to send to the server, in addition to sending the user name and password. Value names are separated by an ampersand (;), such as in name1=value1;name2=value2.
    .PARAMETER Responsesize
        Maximum number of bytes to allow in the response size. Specifies the number of bytes in the response to be parsed for extracting the forms.
    .PARAMETER Nvtype
        How to process the name-value pair. Available settings function as follows:
        * STATIC - The administrator-configured values are used.
        * DYNAMIC - The response is parsed, the form is extracted, and then submitted.
        Possible values = STATIC, DYNAMIC
    .PARAMETER Submitmethod
        HTTP method (GET or POST) used by the single sign-on form to send the logon credentials to the logon server.
        Possible values = GET, POST
    .PARAMETER PassThru
        Return details about the created vpnformssoaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnformssoaction -name <string> -actionurl <string> -userfield <string> -passwdfield <string> -ssosuccessrule <string>
        An example how to add vpnformssoaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnformssoaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnformssoaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Actionurl,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Userfield,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Passwdfield,

        [Parameter(Mandatory)]
        [string]$Ssosuccessrule,

        [string]$Namevaluepair,

        [double]$Responsesize = '8096',

        [ValidateSet('STATIC', 'DYNAMIC')]
        [string]$Nvtype = 'DYNAMIC',

        [ValidateSet('GET', 'POST')]
        [string]$Submitmethod = 'GET',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnformssoaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                actionurl      = $actionurl
                userfield      = $userfield
                passwdfield    = $passwdfield
                ssosuccessrule = $ssosuccessrule
            }
            if ( $PSBoundParameters.ContainsKey('namevaluepair') ) { $payload.Add('namevaluepair', $namevaluepair) }
            if ( $PSBoundParameters.ContainsKey('responsesize') ) { $payload.Add('responsesize', $responsesize) }
            if ( $PSBoundParameters.ContainsKey('nvtype') ) { $payload.Add('nvtype', $nvtype) }
            if ( $PSBoundParameters.ContainsKey('submitmethod') ) { $payload.Add('submitmethod', $submitmethod) }
            if ( $PSCmdlet.ShouldProcess("vpnformssoaction", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnformssoaction -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-ADCGetVpnformssoaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnformssoaction: Finished"
    }
}

function Invoke-ADCDeleteVpnformssoaction {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Form sso action resource.
    .PARAMETER Name
        Name for the form based single sign-on profile.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnformssoaction -Name <string>
        An example how to delete vpnformssoaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnformssoaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnformssoaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnformssoaction: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnformssoaction -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-ADCDeleteVpnformssoaction: Finished"
    }
}

function Invoke-ADCUpdateVpnformssoaction {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Form sso action resource.
    .PARAMETER Name
        Name for the form based single sign-on profile.
    .PARAMETER Actionurl
        Root-relative URL to which the completed form is submitted.
    .PARAMETER Userfield
        Name of the form field in which the user types in the user ID.
    .PARAMETER Passwdfield
        Name of the form field in which the user types in the password.
    .PARAMETER Ssosuccessrule
        Expression that defines the criteria for SSO success. Expression such as checking for cookie in the response is a common example.
    .PARAMETER Responsesize
        Maximum number of bytes to allow in the response size. Specifies the number of bytes in the response to be parsed for extracting the forms.
    .PARAMETER Namevaluepair
        Other name-value pair attributes to send to the server, in addition to sending the user name and password. Value names are separated by an ampersand (;), such as in name1=value1;name2=value2.
    .PARAMETER Nvtype
        How to process the name-value pair. Available settings function as follows:
        * STATIC - The administrator-configured values are used.
        * DYNAMIC - The response is parsed, the form is extracted, and then submitted.
        Possible values = STATIC, DYNAMIC
    .PARAMETER Submitmethod
        HTTP method (GET or POST) used by the single sign-on form to send the logon credentials to the logon server.
        Possible values = GET, POST
    .PARAMETER PassThru
        Return details about the created vpnformssoaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnformssoaction -name <string>
        An example how to update vpnformssoaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnformssoaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnformssoaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Actionurl,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Userfield,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Passwdfield,

        [string]$Ssosuccessrule,

        [double]$Responsesize,

        [string]$Namevaluepair,

        [ValidateSet('STATIC', 'DYNAMIC')]
        [string]$Nvtype,

        [ValidateSet('GET', 'POST')]
        [string]$Submitmethod,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnformssoaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('actionurl') ) { $payload.Add('actionurl', $actionurl) }
            if ( $PSBoundParameters.ContainsKey('userfield') ) { $payload.Add('userfield', $userfield) }
            if ( $PSBoundParameters.ContainsKey('passwdfield') ) { $payload.Add('passwdfield', $passwdfield) }
            if ( $PSBoundParameters.ContainsKey('ssosuccessrule') ) { $payload.Add('ssosuccessrule', $ssosuccessrule) }
            if ( $PSBoundParameters.ContainsKey('responsesize') ) { $payload.Add('responsesize', $responsesize) }
            if ( $PSBoundParameters.ContainsKey('namevaluepair') ) { $payload.Add('namevaluepair', $namevaluepair) }
            if ( $PSBoundParameters.ContainsKey('nvtype') ) { $payload.Add('nvtype', $nvtype) }
            if ( $PSBoundParameters.ContainsKey('submitmethod') ) { $payload.Add('submitmethod', $submitmethod) }
            if ( $PSCmdlet.ShouldProcess("vpnformssoaction", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnformssoaction -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-ADCGetVpnformssoaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnformssoaction: Finished"
    }
}

function Invoke-ADCUnsetVpnformssoaction {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Form sso action resource.
    .PARAMETER Name
        Name for the form based single sign-on profile.
    .PARAMETER Responsesize
        Maximum number of bytes to allow in the response size. Specifies the number of bytes in the response to be parsed for extracting the forms.
    .PARAMETER Namevaluepair
        Other name-value pair attributes to send to the server, in addition to sending the user name and password. Value names are separated by an ampersand (;), such as in name1=value1;name2=value2.
    .PARAMETER Nvtype
        How to process the name-value pair. Available settings function as follows:
        * STATIC - The administrator-configured values are used.
        * DYNAMIC - The response is parsed, the form is extracted, and then submitted.
        Possible values = STATIC, DYNAMIC
    .PARAMETER Submitmethod
        HTTP method (GET or POST) used by the single sign-on form to send the logon credentials to the logon server.
        Possible values = GET, POST
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnformssoaction -name <string>
        An example how to unset vpnformssoaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnformssoaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnformssoaction
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$responsesize,

        [Boolean]$namevaluepair,

        [Boolean]$nvtype,

        [Boolean]$submitmethod 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnformssoaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('responsesize') ) { $payload.Add('responsesize', $responsesize) }
            if ( $PSBoundParameters.ContainsKey('namevaluepair') ) { $payload.Add('namevaluepair', $namevaluepair) }
            if ( $PSBoundParameters.ContainsKey('nvtype') ) { $payload.Add('nvtype', $nvtype) }
            if ( $PSBoundParameters.ContainsKey('submitmethod') ) { $payload.Add('submitmethod', $submitmethod) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnformssoaction -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-ADCUnsetVpnformssoaction: Finished"
    }
}

function Invoke-ADCGetVpnformssoaction {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for Form sso action resource.
    .PARAMETER Name
        Name for the form based single sign-on profile.
    .PARAMETER GetAll
        Retrieve all vpnformssoaction object(s).
    .PARAMETER Count
        If specified, the count of the vpnformssoaction 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-ADCGetVpnformssoaction
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnformssoaction -GetAll
        Get all vpnformssoaction data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnformssoaction -Count
        Get the number of vpnformssoaction objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnformssoaction -name <string>
        Get vpnformssoaction object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnformssoaction -Filter @{ 'name'='<value>' }
        Get vpnformssoaction data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnformssoaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnformssoaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnformssoaction: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnformssoaction objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnformssoaction -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 vpnformssoaction objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnformssoaction -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnformssoaction objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnformssoaction -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnformssoaction configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnformssoaction -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnformssoaction configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnformssoaction -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-ADCGetVpnformssoaction: Ended"
    }
}

function Invoke-ADCAddVpnglobalappcontrollerbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the appcontroller that can be bound to vpnglobal.
    .PARAMETER Appcontroller
        Configured App Controller server.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_appcontroller_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalappcontrollerbinding
        An example how to add vpnglobal_appcontroller_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalappcontrollerbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_appcontroller_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Appcontroller,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalappcontrollerbinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('appcontroller') ) { $payload.Add('appcontroller', $appcontroller) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_appcontroller_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_appcontroller_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-ADCGetVpnglobalappcontrollerbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalappcontrollerbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalappcontrollerbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the appcontroller that can be bound to vpnglobal.
    .PARAMETER Appcontroller
        Configured App Controller server.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalappcontrollerbinding
        An example how to delete vpnglobal_appcontroller_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalappcontrollerbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_appcontroller_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Appcontroller 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalappcontrollerbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Appcontroller') ) { $arguments.Add('appcontroller', $Appcontroller) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_appcontroller_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_appcontroller_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-ADCDeleteVpnglobalappcontrollerbinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalappcontrollerbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the appcontroller that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_appcontroller_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_appcontroller_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-ADCGetVpnglobalappcontrollerbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalappcontrollerbinding -GetAll
        Get all vpnglobal_appcontroller_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalappcontrollerbinding -Count
        Get the number of vpnglobal_appcontroller_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalappcontrollerbinding -name <string>
        Get vpnglobal_appcontroller_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalappcontrollerbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_appcontroller_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalappcontrollerbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_appcontroller_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalappcontrollerbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_appcontroller_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_appcontroller_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 vpnglobal_appcontroller_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_appcontroller_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_appcontroller_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_appcontroller_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_appcontroller_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_appcontroller_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_appcontroller_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-ADCGetVpnglobalappcontrollerbinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauditnslogpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_auditnslogpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauditnslogpolicybinding
        An example how to add vpnglobal_auditnslogpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauditnslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauditnslogpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_auditnslogpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_auditnslogpolicy_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-ADCGetVpnglobalauditnslogpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauditnslogpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauditnslogpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauditnslogpolicybinding
        An example how to delete vpnglobal_auditnslogpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauditnslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauditnslogpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_auditnslogpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_auditnslogpolicy_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-ADCDeleteVpnglobalauditnslogpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauditnslogpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_auditnslogpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_auditnslogpolicy_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-ADCGetVpnglobalauditnslogpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauditnslogpolicybinding -GetAll
        Get all vpnglobal_auditnslogpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauditnslogpolicybinding -Count
        Get the number of vpnglobal_auditnslogpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauditnslogpolicybinding -name <string>
        Get vpnglobal_auditnslogpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauditnslogpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_auditnslogpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauditnslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauditnslogpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_auditnslogpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_auditnslogpolicy_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 vpnglobal_auditnslogpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_auditnslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_auditnslogpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_auditnslogpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_auditnslogpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_auditnslogpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_auditnslogpolicy_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-ADCGetVpnglobalauditnslogpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauditsyslogpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_auditsyslogpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauditsyslogpolicybinding
        An example how to add vpnglobal_auditsyslogpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauditsyslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauditsyslogpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_auditsyslogpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_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-ADCGetVpnglobalauditsyslogpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauditsyslogpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauditsyslogpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauditsyslogpolicybinding
        An example how to delete vpnglobal_auditsyslogpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauditsyslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauditsyslogpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_auditsyslogpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_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-ADCDeleteVpnglobalauditsyslogpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauditsyslogpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_auditsyslogpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_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-ADCGetVpnglobalauditsyslogpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauditsyslogpolicybinding -GetAll
        Get all vpnglobal_auditsyslogpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauditsyslogpolicybinding -Count
        Get the number of vpnglobal_auditsyslogpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauditsyslogpolicybinding -name <string>
        Get vpnglobal_auditsyslogpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauditsyslogpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_auditsyslogpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauditsyslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauditsyslogpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_auditsyslogpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_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 vpnglobal_auditsyslogpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_auditsyslogpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_auditsyslogpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_auditsyslogpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_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-ADCGetVpnglobalauditsyslogpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauthenticationcertpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationcertpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_authenticationcertpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauthenticationcertpolicybinding
        An example how to add vpnglobal_authenticationcertpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauthenticationcertpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationcertpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationcertpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationcertpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_authenticationcertpolicy_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-ADCGetVpnglobalauthenticationcertpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationcertpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauthenticationcertpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationcertpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauthenticationcertpolicybinding
        An example how to delete vpnglobal_authenticationcertpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauthenticationcertpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationcertpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauthenticationcertpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationcertpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_authenticationcertpolicy_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-ADCDeleteVpnglobalauthenticationcertpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauthenticationcertpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationcertpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_authenticationcertpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_authenticationcertpolicy_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-ADCGetVpnglobalauthenticationcertpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationcertpolicybinding -GetAll
        Get all vpnglobal_authenticationcertpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationcertpolicybinding -Count
        Get the number of vpnglobal_authenticationcertpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationcertpolicybinding -name <string>
        Get vpnglobal_authenticationcertpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationcertpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_authenticationcertpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauthenticationcertpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationcertpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauthenticationcertpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_authenticationcertpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationcertpolicy_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 vpnglobal_authenticationcertpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationcertpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationcertpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationcertpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationcertpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_authenticationcertpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationcertpolicy_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-ADCGetVpnglobalauthenticationcertpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauthenticationldappolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationldappolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_authenticationldappolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauthenticationldappolicybinding
        An example how to add vpnglobal_authenticationldappolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauthenticationldappolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationldappolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationldappolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationldappolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_authenticationldappolicy_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-ADCGetVpnglobalauthenticationldappolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationldappolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauthenticationldappolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationldappolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauthenticationldappolicybinding
        An example how to delete vpnglobal_authenticationldappolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauthenticationldappolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationldappolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauthenticationldappolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationldappolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_authenticationldappolicy_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-ADCDeleteVpnglobalauthenticationldappolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauthenticationldappolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationldappolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_authenticationldappolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_authenticationldappolicy_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-ADCGetVpnglobalauthenticationldappolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationldappolicybinding -GetAll
        Get all vpnglobal_authenticationldappolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationldappolicybinding -Count
        Get the number of vpnglobal_authenticationldappolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationldappolicybinding -name <string>
        Get vpnglobal_authenticationldappolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationldappolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_authenticationldappolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauthenticationldappolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationldappolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauthenticationldappolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_authenticationldappolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationldappolicy_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 vpnglobal_authenticationldappolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationldappolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationldappolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationldappolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationldappolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_authenticationldappolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationldappolicy_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-ADCGetVpnglobalauthenticationldappolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauthenticationlocalpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationlocalpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_authenticationlocalpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauthenticationlocalpolicybinding
        An example how to add vpnglobal_authenticationlocalpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauthenticationlocalpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationlocalpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationlocalpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationlocalpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_authenticationlocalpolicy_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-ADCGetVpnglobalauthenticationlocalpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationlocalpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauthenticationlocalpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationlocalpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauthenticationlocalpolicybinding
        An example how to delete vpnglobal_authenticationlocalpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauthenticationlocalpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationlocalpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauthenticationlocalpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationlocalpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_authenticationlocalpolicy_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-ADCDeleteVpnglobalauthenticationlocalpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauthenticationlocalpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationlocalpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_authenticationlocalpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_authenticationlocalpolicy_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-ADCGetVpnglobalauthenticationlocalpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationlocalpolicybinding -GetAll
        Get all vpnglobal_authenticationlocalpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationlocalpolicybinding -Count
        Get the number of vpnglobal_authenticationlocalpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationlocalpolicybinding -name <string>
        Get vpnglobal_authenticationlocalpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationlocalpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_authenticationlocalpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauthenticationlocalpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationlocalpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauthenticationlocalpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_authenticationlocalpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationlocalpolicy_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 vpnglobal_authenticationlocalpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationlocalpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationlocalpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationlocalpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationlocalpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_authenticationlocalpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationlocalpolicy_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-ADCGetVpnglobalauthenticationlocalpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauthenticationnegotiatepolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationnegotiatepolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_authenticationnegotiatepolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauthenticationnegotiatepolicybinding
        An example how to add vpnglobal_authenticationnegotiatepolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauthenticationnegotiatepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationnegotiatepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationnegotiatepolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationnegotiatepolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_authenticationnegotiatepolicy_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-ADCGetVpnglobalauthenticationnegotiatepolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationnegotiatepolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauthenticationnegotiatepolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationnegotiatepolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauthenticationnegotiatepolicybinding
        An example how to delete vpnglobal_authenticationnegotiatepolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauthenticationnegotiatepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationnegotiatepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauthenticationnegotiatepolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationnegotiatepolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_authenticationnegotiatepolicy_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-ADCDeleteVpnglobalauthenticationnegotiatepolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauthenticationnegotiatepolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationnegotiatepolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_authenticationnegotiatepolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_authenticationnegotiatepolicy_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-ADCGetVpnglobalauthenticationnegotiatepolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationnegotiatepolicybinding -GetAll
        Get all vpnglobal_authenticationnegotiatepolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationnegotiatepolicybinding -Count
        Get the number of vpnglobal_authenticationnegotiatepolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationnegotiatepolicybinding -name <string>
        Get vpnglobal_authenticationnegotiatepolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationnegotiatepolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_authenticationnegotiatepolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauthenticationnegotiatepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationnegotiatepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauthenticationnegotiatepolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_authenticationnegotiatepolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationnegotiatepolicy_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 vpnglobal_authenticationnegotiatepolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationnegotiatepolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationnegotiatepolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationnegotiatepolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationnegotiatepolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_authenticationnegotiatepolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationnegotiatepolicy_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-ADCGetVpnglobalauthenticationnegotiatepolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_authenticationpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauthenticationpolicybinding
        An example how to add vpnglobal_authenticationpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_authenticationpolicy_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-ADCGetVpnglobalauthenticationpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauthenticationpolicybinding
        An example how to delete vpnglobal_authenticationpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauthenticationpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_authenticationpolicy_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-ADCDeleteVpnglobalauthenticationpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_authenticationpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_authenticationpolicy_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-ADCGetVpnglobalauthenticationpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationpolicybinding -GetAll
        Get all vpnglobal_authenticationpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationpolicybinding -Count
        Get the number of vpnglobal_authenticationpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationpolicybinding -name <string>
        Get vpnglobal_authenticationpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_authenticationpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauthenticationpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_authenticationpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationpolicy_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 vpnglobal_authenticationpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_authenticationpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationpolicy_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-ADCGetVpnglobalauthenticationpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauthenticationradiuspolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationradiuspolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_authenticationradiuspolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauthenticationradiuspolicybinding
        An example how to add vpnglobal_authenticationradiuspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauthenticationradiuspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationradiuspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationradiuspolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationradiuspolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_authenticationradiuspolicy_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-ADCGetVpnglobalauthenticationradiuspolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationradiuspolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauthenticationradiuspolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationradiuspolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauthenticationradiuspolicybinding
        An example how to delete vpnglobal_authenticationradiuspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauthenticationradiuspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationradiuspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauthenticationradiuspolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationradiuspolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_authenticationradiuspolicy_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-ADCDeleteVpnglobalauthenticationradiuspolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauthenticationradiuspolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationradiuspolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_authenticationradiuspolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_authenticationradiuspolicy_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-ADCGetVpnglobalauthenticationradiuspolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationradiuspolicybinding -GetAll
        Get all vpnglobal_authenticationradiuspolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationradiuspolicybinding -Count
        Get the number of vpnglobal_authenticationradiuspolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationradiuspolicybinding -name <string>
        Get vpnglobal_authenticationradiuspolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationradiuspolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_authenticationradiuspolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauthenticationradiuspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationradiuspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauthenticationradiuspolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_authenticationradiuspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationradiuspolicy_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 vpnglobal_authenticationradiuspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationradiuspolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationradiuspolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationradiuspolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationradiuspolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_authenticationradiuspolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationradiuspolicy_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-ADCGetVpnglobalauthenticationradiuspolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauthenticationsamlpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationsamlpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_authenticationsamlpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauthenticationsamlpolicybinding
        An example how to add vpnglobal_authenticationsamlpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauthenticationsamlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationsamlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationsamlpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationsamlpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_authenticationsamlpolicy_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-ADCGetVpnglobalauthenticationsamlpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationsamlpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauthenticationsamlpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationsamlpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauthenticationsamlpolicybinding
        An example how to delete vpnglobal_authenticationsamlpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauthenticationsamlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationsamlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauthenticationsamlpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationsamlpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_authenticationsamlpolicy_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-ADCDeleteVpnglobalauthenticationsamlpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauthenticationsamlpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationsamlpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_authenticationsamlpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_authenticationsamlpolicy_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-ADCGetVpnglobalauthenticationsamlpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationsamlpolicybinding -GetAll
        Get all vpnglobal_authenticationsamlpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationsamlpolicybinding -Count
        Get the number of vpnglobal_authenticationsamlpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationsamlpolicybinding -name <string>
        Get vpnglobal_authenticationsamlpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationsamlpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_authenticationsamlpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauthenticationsamlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationsamlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauthenticationsamlpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_authenticationsamlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationsamlpolicy_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 vpnglobal_authenticationsamlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationsamlpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationsamlpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationsamlpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationsamlpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_authenticationsamlpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationsamlpolicy_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-ADCGetVpnglobalauthenticationsamlpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalauthenticationtacacspolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationtacacspolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_authenticationtacacspolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalauthenticationtacacspolicybinding
        An example how to add vpnglobal_authenticationtacacspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalauthenticationtacacspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationtacacspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationtacacspolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationtacacspolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_authenticationtacacspolicy_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-ADCGetVpnglobalauthenticationtacacspolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalauthenticationtacacspolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalauthenticationtacacspolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationtacacspolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalauthenticationtacacspolicybinding
        An example how to delete vpnglobal_authenticationtacacspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalauthenticationtacacspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationtacacspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalauthenticationtacacspolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_authenticationtacacspolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_authenticationtacacspolicy_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-ADCDeleteVpnglobalauthenticationtacacspolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalauthenticationtacacspolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationtacacspolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_authenticationtacacspolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_authenticationtacacspolicy_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-ADCGetVpnglobalauthenticationtacacspolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationtacacspolicybinding -GetAll
        Get all vpnglobal_authenticationtacacspolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationtacacspolicybinding -Count
        Get the number of vpnglobal_authenticationtacacspolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationtacacspolicybinding -name <string>
        Get vpnglobal_authenticationtacacspolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalauthenticationtacacspolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_authenticationtacacspolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalauthenticationtacacspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_authenticationtacacspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalauthenticationtacacspolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_authenticationtacacspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationtacacspolicy_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 vpnglobal_authenticationtacacspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationtacacspolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationtacacspolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationtacacspolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_authenticationtacacspolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_authenticationtacacspolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_authenticationtacacspolicy_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-ADCGetVpnglobalauthenticationtacacspolicybinding: Ended"
    }
}

function Invoke-ADCGetVpnglobalbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_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-ADCGetVpnglobalbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalbinding -GetAll
        Get all vpnglobal_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalbinding -name <string>
        Get vpnglobal_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_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 vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_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-ADCGetVpnglobalbinding: Ended"
    }
}

function Invoke-ADCAddVpnglobaldomainbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the domain that can be bound to vpnglobal.
    .PARAMETER Intranetdomain
        The conflicting intranet domain name.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_domain_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobaldomainbinding
        An example how to add vpnglobal_domain_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobaldomainbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_domain_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Intranetdomain,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobaldomainbinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('intranetdomain') ) { $payload.Add('intranetdomain', $intranetdomain) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_domain_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_domain_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-ADCGetVpnglobaldomainbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobaldomainbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobaldomainbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the domain that can be bound to vpnglobal.
    .PARAMETER Intranetdomain
        The conflicting intranet domain name.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobaldomainbinding
        An example how to delete vpnglobal_domain_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobaldomainbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_domain_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Intranetdomain 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobaldomainbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Intranetdomain') ) { $arguments.Add('intranetdomain', $Intranetdomain) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_domain_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_domain_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-ADCDeleteVpnglobaldomainbinding: Finished"
    }
}

function Invoke-ADCGetVpnglobaldomainbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the domain that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_domain_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_domain_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-ADCGetVpnglobaldomainbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobaldomainbinding -GetAll
        Get all vpnglobal_domain_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobaldomainbinding -Count
        Get the number of vpnglobal_domain_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobaldomainbinding -name <string>
        Get vpnglobal_domain_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobaldomainbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_domain_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobaldomainbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_domain_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobaldomainbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_domain_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_domain_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 vpnglobal_domain_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_domain_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_domain_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_domain_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_domain_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_domain_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_domain_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-ADCGetVpnglobaldomainbinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalintranetip6binding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the intranetip6 that can be bound to vpnglobal.
    .PARAMETER Intranetip6
        The intranet ip address or range.
    .PARAMETER Numaddr
        The intranet ip address or range's netmask.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_intranetip6_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalintranetip6binding
        An example how to add vpnglobal_intranetip6_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalintranetip6binding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_intranetip6_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Intranetip6,

        [double]$Numaddr,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalintranetip6binding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('intranetip6') ) { $payload.Add('intranetip6', $intranetip6) }
            if ( $PSBoundParameters.ContainsKey('numaddr') ) { $payload.Add('numaddr', $numaddr) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_intranetip6_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_intranetip6_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-ADCGetVpnglobalintranetip6binding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalintranetip6binding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalintranetip6binding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the intranetip6 that can be bound to vpnglobal.
    .PARAMETER Intranetip6
        The intranet ip address or range.
    .PARAMETER Numaddr
        The intranet ip address or range's netmask.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalintranetip6binding
        An example how to delete vpnglobal_intranetip6_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalintranetip6binding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_intranetip6_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Intranetip6,

        [double]$Numaddr 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalintranetip6binding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Intranetip6') ) { $arguments.Add('intranetip6', $Intranetip6) }
            if ( $PSBoundParameters.ContainsKey('Numaddr') ) { $arguments.Add('numaddr', $Numaddr) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_intranetip6_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_intranetip6_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-ADCDeleteVpnglobalintranetip6binding: Finished"
    }
}

function Invoke-ADCGetVpnglobalintranetip6binding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the intranetip6 that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_intranetip6_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_intranetip6_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-ADCGetVpnglobalintranetip6binding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalintranetip6binding -GetAll
        Get all vpnglobal_intranetip6_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalintranetip6binding -Count
        Get the number of vpnglobal_intranetip6_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalintranetip6binding -name <string>
        Get vpnglobal_intranetip6_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalintranetip6binding -Filter @{ 'name'='<value>' }
        Get vpnglobal_intranetip6_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalintranetip6binding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_intranetip6_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalintranetip6binding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_intranetip6_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_intranetip6_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 vpnglobal_intranetip6_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_intranetip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_intranetip6_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_intranetip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_intranetip6_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_intranetip6_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_intranetip6_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-ADCGetVpnglobalintranetip6binding: Ended"
    }
}

function Invoke-ADCAddVpnglobalintranetipbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the intranetip that can be bound to vpnglobal.
    .PARAMETER Intranetip
        The intranet ip address or range.
    .PARAMETER Netmask
        The intranet ip address or range's netmask.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_intranetip_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalintranetipbinding
        An example how to add vpnglobal_intranetip_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalintranetipbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_intranetip_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Intranetip,

        [string]$Netmask,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalintranetipbinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('intranetip') ) { $payload.Add('intranetip', $intranetip) }
            if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_intranetip_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_intranetip_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-ADCGetVpnglobalintranetipbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalintranetipbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalintranetipbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the intranetip that can be bound to vpnglobal.
    .PARAMETER Intranetip
        The intranet ip address or range.
    .PARAMETER Netmask
        The intranet ip address or range's netmask.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalintranetipbinding
        An example how to delete vpnglobal_intranetip_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalintranetipbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_intranetip_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Intranetip,

        [string]$Netmask 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalintranetipbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Intranetip') ) { $arguments.Add('intranetip', $Intranetip) }
            if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_intranetip_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_intranetip_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-ADCDeleteVpnglobalintranetipbinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalintranetipbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the intranetip that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_intranetip_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_intranetip_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-ADCGetVpnglobalintranetipbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalintranetipbinding -GetAll
        Get all vpnglobal_intranetip_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalintranetipbinding -Count
        Get the number of vpnglobal_intranetip_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalintranetipbinding -name <string>
        Get vpnglobal_intranetip_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalintranetipbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_intranetip_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalintranetipbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_intranetip_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalintranetipbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_intranetip_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_intranetip_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 vpnglobal_intranetip_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_intranetip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_intranetip_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_intranetip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_intranetip_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_intranetip_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_intranetip_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-ADCGetVpnglobalintranetipbinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalsharefileserverbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the sharefileserver that can be bound to vpnglobal.
    .PARAMETER Sharefile
        Configured Sharefile server, in the format IP:PORT / FQDN:PORT.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_sharefileserver_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalsharefileserverbinding
        An example how to add vpnglobal_sharefileserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalsharefileserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_sharefileserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Sharefile,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalsharefileserverbinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('sharefile') ) { $payload.Add('sharefile', $sharefile) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_sharefileserver_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_sharefileserver_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-ADCGetVpnglobalsharefileserverbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalsharefileserverbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalsharefileserverbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the sharefileserver that can be bound to vpnglobal.
    .PARAMETER Sharefile
        Configured Sharefile server, in the format IP:PORT / FQDN:PORT.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalsharefileserverbinding
        An example how to delete vpnglobal_sharefileserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalsharefileserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_sharefileserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Sharefile 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalsharefileserverbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Sharefile') ) { $arguments.Add('sharefile', $Sharefile) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_sharefileserver_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_sharefileserver_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-ADCDeleteVpnglobalsharefileserverbinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalsharefileserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the sharefileserver that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_sharefileserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_sharefileserver_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-ADCGetVpnglobalsharefileserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalsharefileserverbinding -GetAll
        Get all vpnglobal_sharefileserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalsharefileserverbinding -Count
        Get the number of vpnglobal_sharefileserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalsharefileserverbinding -name <string>
        Get vpnglobal_sharefileserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalsharefileserverbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_sharefileserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalsharefileserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_sharefileserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalsharefileserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_sharefileserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_sharefileserver_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 vpnglobal_sharefileserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_sharefileserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_sharefileserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_sharefileserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_sharefileserver_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_sharefileserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_sharefileserver_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-ADCGetVpnglobalsharefileserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalsslcertkeybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the sslcertkey that can be bound to vpnglobal.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER Certkeyname
        SSL certkey to use in signing tokens.
    .PARAMETER Userdataencryptionkey
        Certificate to be used for encrypting user data like KB Question and Answers, Alternate Email Address, etc.
    .PARAMETER Cacert
        The name of the CA certificate binding.
    .PARAMETER Crlcheck
        The state of the CRL check parameter (Mandatory/Optional).
        Possible values = Mandatory, Optional
    .PARAMETER Ocspcheck
        The state of the OCSP check parameter (Mandatory/Optional).
        Possible values = Mandatory, Optional
    .PARAMETER PassThru
        Return details about the created vpnglobal_sslcertkey_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalsslcertkeybinding
        An example how to add vpnglobal_sslcertkey_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalsslcertkeybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_sslcertkey_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Gotopriorityexpression,

        [string]$Certkeyname,

        [string]$Userdataencryptionkey,

        [string]$Cacert,

        [ValidateSet('Mandatory', 'Optional')]
        [string]$Crlcheck,

        [ValidateSet('Mandatory', 'Optional')]
        [string]$Ocspcheck,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalsslcertkeybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('certkeyname') ) { $payload.Add('certkeyname', $certkeyname) }
            if ( $PSBoundParameters.ContainsKey('userdataencryptionkey') ) { $payload.Add('userdataencryptionkey', $userdataencryptionkey) }
            if ( $PSBoundParameters.ContainsKey('cacert') ) { $payload.Add('cacert', $cacert) }
            if ( $PSBoundParameters.ContainsKey('crlcheck') ) { $payload.Add('crlcheck', $crlcheck) }
            if ( $PSBoundParameters.ContainsKey('ocspcheck') ) { $payload.Add('ocspcheck', $ocspcheck) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_sslcertkey_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_sslcertkey_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-ADCGetVpnglobalsslcertkeybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalsslcertkeybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalsslcertkeybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the sslcertkey that can be bound to vpnglobal.
    .PARAMETER Certkeyname
        SSL certkey to use in signing tokens.
    .PARAMETER Userdataencryptionkey
        Certificate to be used for encrypting user data like KB Question and Answers, Alternate Email Address, etc.
    .PARAMETER Cacert
        The name of the CA certificate binding.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalsslcertkeybinding
        An example how to delete vpnglobal_sslcertkey_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalsslcertkeybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_sslcertkey_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Certkeyname,

        [string]$Userdataencryptionkey,

        [string]$Cacert 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalsslcertkeybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Certkeyname') ) { $arguments.Add('certkeyname', $Certkeyname) }
            if ( $PSBoundParameters.ContainsKey('Userdataencryptionkey') ) { $arguments.Add('userdataencryptionkey', $Userdataencryptionkey) }
            if ( $PSBoundParameters.ContainsKey('Cacert') ) { $arguments.Add('cacert', $Cacert) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_sslcertkey_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_sslcertkey_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-ADCDeleteVpnglobalsslcertkeybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalsslcertkeybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the sslcertkey that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_sslcertkey_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_sslcertkey_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-ADCGetVpnglobalsslcertkeybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalsslcertkeybinding -GetAll
        Get all vpnglobal_sslcertkey_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalsslcertkeybinding -Count
        Get the number of vpnglobal_sslcertkey_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalsslcertkeybinding -name <string>
        Get vpnglobal_sslcertkey_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalsslcertkeybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_sslcertkey_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalsslcertkeybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_sslcertkey_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalsslcertkeybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_sslcertkey_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_sslcertkey_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 vpnglobal_sslcertkey_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_sslcertkey_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_sslcertkey_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_sslcertkey_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_sslcertkey_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_sslcertkey_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_sslcertkey_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-ADCGetVpnglobalsslcertkeybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalstaserverbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the staserver that can be bound to vpnglobal.
    .PARAMETER Staserver
        Configured Secure Ticketing Authority (STA) server.
    .PARAMETER Staaddresstype
        Type of the STA server address(ipv4/v6).
        Possible values = IPV4, IPV6
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_staserver_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalstaserverbinding
        An example how to add vpnglobal_staserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalstaserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_staserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Staserver,

        [ValidateSet('IPV4', 'IPV6')]
        [string]$Staaddresstype,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalstaserverbinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('staserver') ) { $payload.Add('staserver', $staserver) }
            if ( $PSBoundParameters.ContainsKey('staaddresstype') ) { $payload.Add('staaddresstype', $staaddresstype) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_staserver_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_staserver_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-ADCGetVpnglobalstaserverbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalstaserverbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalstaserverbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the staserver that can be bound to vpnglobal.
    .PARAMETER Staserver
        Configured Secure Ticketing Authority (STA) server.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalstaserverbinding
        An example how to delete vpnglobal_staserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalstaserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_staserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Staserver 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalstaserverbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Staserver') ) { $arguments.Add('staserver', $Staserver) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_staserver_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_staserver_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-ADCDeleteVpnglobalstaserverbinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalstaserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the staserver that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_staserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_staserver_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-ADCGetVpnglobalstaserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalstaserverbinding -GetAll
        Get all vpnglobal_staserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalstaserverbinding -Count
        Get the number of vpnglobal_staserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalstaserverbinding -name <string>
        Get vpnglobal_staserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalstaserverbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_staserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalstaserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_staserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalstaserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_staserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_staserver_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 vpnglobal_staserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_staserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_staserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_staserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_staserver_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_staserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_staserver_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-ADCGetVpnglobalstaserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpnclientlessaccesspolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnclientlessaccesspolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpnclientlessaccesspolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpnclientlessaccesspolicybinding
        An example how to add vpnglobal_vpnclientlessaccesspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpnclientlessaccesspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnclientlessaccesspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnclientlessaccesspolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnclientlessaccesspolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpnclientlessaccesspolicy_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-ADCGetVpnglobalvpnclientlessaccesspolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnclientlessaccesspolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpnclientlessaccesspolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnclientlessaccesspolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpnclientlessaccesspolicybinding
        An example how to delete vpnglobal_vpnclientlessaccesspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpnclientlessaccesspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnclientlessaccesspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpnclientlessaccesspolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnclientlessaccesspolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpnclientlessaccesspolicy_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-ADCDeleteVpnglobalvpnclientlessaccesspolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpnclientlessaccesspolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnclientlessaccesspolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpnclientlessaccesspolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpnclientlessaccesspolicy_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-ADCGetVpnglobalvpnclientlessaccesspolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnclientlessaccesspolicybinding -GetAll
        Get all vpnglobal_vpnclientlessaccesspolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnclientlessaccesspolicybinding -Count
        Get the number of vpnglobal_vpnclientlessaccesspolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnclientlessaccesspolicybinding -name <string>
        Get vpnglobal_vpnclientlessaccesspolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnclientlessaccesspolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpnclientlessaccesspolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpnclientlessaccesspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnclientlessaccesspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpnclientlessaccesspolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpnclientlessaccesspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnclientlessaccesspolicy_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 vpnglobal_vpnclientlessaccesspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnclientlessaccesspolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpnclientlessaccesspolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnclientlessaccesspolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpnclientlessaccesspolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpnclientlessaccesspolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnclientlessaccesspolicy_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-ADCGetVpnglobalvpnclientlessaccesspolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpneulabinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpneula that can be bound to vpnglobal.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER Eula
        Name of the EULA bound to vpnglobal.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpneula_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpneulabinding
        An example how to add vpnglobal_vpneula_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpneulabinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpneula_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Gotopriorityexpression,

        [string]$Eula,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpneulabinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('eula') ) { $payload.Add('eula', $eula) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpneula_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpneula_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-ADCGetVpnglobalvpneulabinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpneulabinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpneulabinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpneula that can be bound to vpnglobal.
    .PARAMETER Eula
        Name of the EULA bound to vpnglobal.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpneulabinding
        An example how to delete vpnglobal_vpneula_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpneulabinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpneula_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Eula 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpneulabinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Eula') ) { $arguments.Add('eula', $Eula) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpneula_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpneula_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-ADCDeleteVpnglobalvpneulabinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpneulabinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpneula that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpneula_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpneula_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-ADCGetVpnglobalvpneulabinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpneulabinding -GetAll
        Get all vpnglobal_vpneula_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpneulabinding -Count
        Get the number of vpnglobal_vpneula_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpneulabinding -name <string>
        Get vpnglobal_vpneula_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpneulabinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpneula_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpneulabinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpneula_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpneulabinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpneula_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpneula_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 vpnglobal_vpneula_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpneula_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpneula_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpneula_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpneula_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpneula_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpneula_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-ADCGetVpnglobalvpneulabinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpnintranetapplicationbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnintranetapplication that can be bound to vpnglobal.
    .PARAMETER Intranetapplication
        The intranet vpn application.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpnintranetapplication_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpnintranetapplicationbinding
        An example how to add vpnglobal_vpnintranetapplication_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpnintranetapplicationbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnintranetapplication_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Intranetapplication,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnintranetapplicationbinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('intranetapplication') ) { $payload.Add('intranetapplication', $intranetapplication) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnintranetapplication_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpnintranetapplication_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-ADCGetVpnglobalvpnintranetapplicationbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnintranetapplicationbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpnintranetapplicationbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnintranetapplication that can be bound to vpnglobal.
    .PARAMETER Intranetapplication
        The intranet vpn application.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpnintranetapplicationbinding
        An example how to delete vpnglobal_vpnintranetapplication_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpnintranetapplicationbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnintranetapplication_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Intranetapplication 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpnintranetapplicationbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Intranetapplication') ) { $arguments.Add('intranetapplication', $Intranetapplication) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnintranetapplication_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpnintranetapplication_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-ADCDeleteVpnglobalvpnintranetapplicationbinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpnintranetapplicationbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnintranetapplication that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpnintranetapplication_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpnintranetapplication_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-ADCGetVpnglobalvpnintranetapplicationbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnintranetapplicationbinding -GetAll
        Get all vpnglobal_vpnintranetapplication_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnintranetapplicationbinding -Count
        Get the number of vpnglobal_vpnintranetapplication_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnintranetapplicationbinding -name <string>
        Get vpnglobal_vpnintranetapplication_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnintranetapplicationbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpnintranetapplication_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpnintranetapplicationbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnintranetapplication_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpnintranetapplicationbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpnintranetapplication_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnintranetapplication_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 vpnglobal_vpnintranetapplication_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnintranetapplication_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpnintranetapplication_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnintranetapplication_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpnintranetapplication_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpnintranetapplication_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnintranetapplication_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-ADCGetVpnglobalvpnintranetapplicationbinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpnnexthopserverbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnnexthopserver that can be bound to vpnglobal.
    .PARAMETER Nexthopserver
        The name of the next hop server bound to vpn global.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpnnexthopserver_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpnnexthopserverbinding
        An example how to add vpnglobal_vpnnexthopserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpnnexthopserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnnexthopserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Nexthopserver,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnnexthopserverbinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('nexthopserver') ) { $payload.Add('nexthopserver', $nexthopserver) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnnexthopserver_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpnnexthopserver_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-ADCGetVpnglobalvpnnexthopserverbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnnexthopserverbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpnnexthopserverbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnnexthopserver that can be bound to vpnglobal.
    .PARAMETER Nexthopserver
        The name of the next hop server bound to vpn global.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpnnexthopserverbinding
        An example how to delete vpnglobal_vpnnexthopserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpnnexthopserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnnexthopserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Nexthopserver 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpnnexthopserverbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Nexthopserver') ) { $arguments.Add('nexthopserver', $Nexthopserver) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnnexthopserver_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpnnexthopserver_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-ADCDeleteVpnglobalvpnnexthopserverbinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpnnexthopserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnnexthopserver that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpnnexthopserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpnnexthopserver_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-ADCGetVpnglobalvpnnexthopserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnnexthopserverbinding -GetAll
        Get all vpnglobal_vpnnexthopserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnnexthopserverbinding -Count
        Get the number of vpnglobal_vpnnexthopserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnnexthopserverbinding -name <string>
        Get vpnglobal_vpnnexthopserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnnexthopserverbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpnnexthopserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpnnexthopserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnnexthopserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpnnexthopserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpnnexthopserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnnexthopserver_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 vpnglobal_vpnnexthopserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnnexthopserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpnnexthopserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnnexthopserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpnnexthopserver_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpnnexthopserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnnexthopserver_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-ADCGetVpnglobalvpnnexthopserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpnportalthemebinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnportaltheme that can be bound to vpnglobal.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER Portaltheme
        Name of the portal theme bound to vpnglobal.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpnportaltheme_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpnportalthemebinding
        An example how to add vpnglobal_vpnportaltheme_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpnportalthemebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnportaltheme_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Gotopriorityexpression,

        [string]$Portaltheme,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnportalthemebinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('portaltheme') ) { $payload.Add('portaltheme', $portaltheme) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnportaltheme_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpnportaltheme_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-ADCGetVpnglobalvpnportalthemebinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnportalthemebinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpnportalthemebinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnportaltheme that can be bound to vpnglobal.
    .PARAMETER Portaltheme
        Name of the portal theme bound to vpnglobal.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpnportalthemebinding
        An example how to delete vpnglobal_vpnportaltheme_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpnportalthemebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnportaltheme_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Portaltheme 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpnportalthemebinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Portaltheme') ) { $arguments.Add('portaltheme', $Portaltheme) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnportaltheme_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpnportaltheme_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-ADCDeleteVpnglobalvpnportalthemebinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpnportalthemebinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnportaltheme that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpnportaltheme_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpnportaltheme_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-ADCGetVpnglobalvpnportalthemebinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnportalthemebinding -GetAll
        Get all vpnglobal_vpnportaltheme_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnportalthemebinding -Count
        Get the number of vpnglobal_vpnportaltheme_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnportalthemebinding -name <string>
        Get vpnglobal_vpnportaltheme_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnportalthemebinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpnportaltheme_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpnportalthemebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnportaltheme_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpnportalthemebinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpnportaltheme_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnportaltheme_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 vpnglobal_vpnportaltheme_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnportaltheme_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpnportaltheme_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnportaltheme_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpnportaltheme_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpnportaltheme_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnportaltheme_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-ADCGetVpnglobalvpnportalthemebinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpnsessionpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnsessionpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpnsessionpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpnsessionpolicybinding
        An example how to add vpnglobal_vpnsessionpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpnsessionpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnsessionpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnsessionpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnsessionpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpnsessionpolicy_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-ADCGetVpnglobalvpnsessionpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnsessionpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpnsessionpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnsessionpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpnsessionpolicybinding
        An example how to delete vpnglobal_vpnsessionpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpnsessionpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnsessionpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpnsessionpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnsessionpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpnsessionpolicy_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-ADCDeleteVpnglobalvpnsessionpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpnsessionpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnsessionpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpnsessionpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpnsessionpolicy_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-ADCGetVpnglobalvpnsessionpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnsessionpolicybinding -GetAll
        Get all vpnglobal_vpnsessionpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnsessionpolicybinding -Count
        Get the number of vpnglobal_vpnsessionpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnsessionpolicybinding -name <string>
        Get vpnglobal_vpnsessionpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnsessionpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpnsessionpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpnsessionpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnsessionpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpnsessionpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpnsessionpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnsessionpolicy_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 vpnglobal_vpnsessionpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnsessionpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpnsessionpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnsessionpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpnsessionpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpnsessionpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnsessionpolicy_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-ADCGetVpnglobalvpnsessionpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpntrafficpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpntrafficpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpntrafficpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpntrafficpolicybinding
        An example how to add vpnglobal_vpntrafficpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpntrafficpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpntrafficpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpntrafficpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpntrafficpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpntrafficpolicy_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-ADCGetVpnglobalvpntrafficpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpntrafficpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpntrafficpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpntrafficpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpntrafficpolicybinding
        An example how to delete vpnglobal_vpntrafficpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpntrafficpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpntrafficpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpntrafficpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpntrafficpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpntrafficpolicy_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-ADCDeleteVpnglobalvpntrafficpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpntrafficpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpntrafficpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpntrafficpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpntrafficpolicy_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-ADCGetVpnglobalvpntrafficpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpntrafficpolicybinding -GetAll
        Get all vpnglobal_vpntrafficpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpntrafficpolicybinding -Count
        Get the number of vpnglobal_vpntrafficpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpntrafficpolicybinding -name <string>
        Get vpnglobal_vpntrafficpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpntrafficpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpntrafficpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpntrafficpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpntrafficpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpntrafficpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpntrafficpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpntrafficpolicy_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 vpnglobal_vpntrafficpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpntrafficpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpntrafficpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpntrafficpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpntrafficpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpntrafficpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpntrafficpolicy_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-ADCGetVpnglobalvpntrafficpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpnurlpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnurlpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the priority number, the higher the policy's priority. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpnurlpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpnurlpolicybinding
        An example how to add vpnglobal_vpnurlpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpnurlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnurlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnurlpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('policyname') ) { $payload.Add('policyname', $policyname) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnurlpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpnurlpolicy_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-ADCGetVpnglobalvpnurlpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnurlpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpnurlpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnurlpolicy that can be bound to vpnglobal.
    .PARAMETER Policyname
        The name of the policy.
    .PARAMETER Secondary
        Bind the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only to a primary authentication server but also to a secondary authentication server. User groups are aggregated across both authentication servers. The user name must be exactly the same on both authentication servers, but the authentication servers can require different passwords.
    .PARAMETER Groupextraction
        Bind the Authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called it primary and/or secondary authentication has succeeded.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpnurlpolicybinding
        An example how to delete vpnglobal_vpnurlpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpnurlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnurlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Policyname,

        [boolean]$Secondary,

        [boolean]$Groupextraction 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpnurlpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnurlpolicy_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpnurlpolicy_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-ADCDeleteVpnglobalvpnurlpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpnurlpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnurlpolicy that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpnurlpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpnurlpolicy_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-ADCGetVpnglobalvpnurlpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnurlpolicybinding -GetAll
        Get all vpnglobal_vpnurlpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnurlpolicybinding -Count
        Get the number of vpnglobal_vpnurlpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnurlpolicybinding -name <string>
        Get vpnglobal_vpnurlpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnurlpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpnurlpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpnurlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnurlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpnurlpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpnurlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnurlpolicy_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 vpnglobal_vpnurlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnurlpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpnurlpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnurlpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpnurlpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpnurlpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnurlpolicy_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-ADCGetVpnglobalvpnurlpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnglobalvpnurlbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnurl that can be bound to vpnglobal.
    .PARAMETER Urlname
        The intranet url.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. An expression or other value specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER PassThru
        Return details about the created vpnglobal_vpnurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnglobalvpnurlbinding
        An example how to add vpnglobal_vpnurl_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnglobalvpnurlbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnurl_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Urlname,

        [string]$Gotopriorityexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnurlbinding: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('urlname') ) { $payload.Add('urlname', $urlname) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnurl_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnglobal_vpnurl_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-ADCGetVpnglobalvpnurlbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnglobalvpnurlbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnglobalvpnurlbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnurl that can be bound to vpnglobal.
    .PARAMETER Urlname
        The intranet url.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnglobalvpnurlbinding
        An example how to delete vpnglobal_vpnurl_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnglobalvpnurlbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnurl_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [string]$Urlname 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnglobalvpnurlbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Urlname') ) { $arguments.Add('urlname', $Urlname) }
            if ( $PSCmdlet.ShouldProcess("vpnglobal_vpnurl_binding", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnglobal_vpnurl_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-ADCDeleteVpnglobalvpnurlbinding: Finished"
    }
}

function Invoke-ADCGetVpnglobalvpnurlbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnurl that can be bound to vpnglobal.
    .PARAMETER GetAll
        Retrieve all vpnglobal_vpnurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnglobal_vpnurl_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-ADCGetVpnglobalvpnurlbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnurlbinding -GetAll
        Get all vpnglobal_vpnurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnurlbinding -Count
        Get the number of vpnglobal_vpnurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnurlbinding -name <string>
        Get vpnglobal_vpnurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnglobalvpnurlbinding -Filter @{ 'name'='<value>' }
        Get vpnglobal_vpnurl_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnglobalvpnurlbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnglobal_vpnurl_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnglobalvpnurlbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnglobal_vpnurl_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnurl_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 vpnglobal_vpnurl_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnglobal_vpnurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnglobal_vpnurl_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnglobal_vpnurl_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnglobal_vpnurl_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-ADCGetVpnglobalvpnurlbinding: Ended"
    }
}

function Invoke-ADCKillVpnicaconnection {
    <#
    .SYNOPSIS
        Kill SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for active ica connections resource.
    .PARAMETER Username
        User name for which to display connections.
    .PARAMETER Transproto
        Transport type for the existing Existing ICA conenction.
        Possible values = TCP, UDP
    .PARAMETER All
        Terminate all active icaconnections.
    .EXAMPLE
        PS C:\>Invoke-ADCKillVpnicaconnection
        An example how to kill vpnicaconnection configuration Object(s).
    .NOTES
        File Name : Invoke-ADCKillVpnicaconnection
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnicaconnection/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Username,

        [ValidateSet('TCP', 'UDP')]
        [string]$Transproto,

        [boolean]$All 

    )
    begin {
        Write-Verbose "Invoke-ADCKillVpnicaconnection: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('username') ) { $payload.Add('username', $username) }
            if ( $PSBoundParameters.ContainsKey('transproto') ) { $payload.Add('transproto', $transproto) }
            if ( $PSBoundParameters.ContainsKey('all') ) { $payload.Add('all', $all) }
            if ( $PSCmdlet.ShouldProcess($Name, "Kill SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnicaconnection -Action kill -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-ADCKillVpnicaconnection: Finished"
    }
}

function Invoke-ADCGetVpnicaconnection {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for active ica connections resource.
    .PARAMETER Username
        User name for which to display connections.
    .PARAMETER Transproto
        Transport type for the existing Existing ICA conenction.
        Possible values = TCP, UDP
    .PARAMETER Nodeid
        Unique number that identifies the cluster node.
    .PARAMETER GetAll
        Retrieve all vpnicaconnection object(s).
    .PARAMETER Count
        If specified, the count of the vpnicaconnection 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-ADCGetVpnicaconnection
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnicaconnection -GetAll
        Get all vpnicaconnection data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnicaconnection -Count
        Get the number of vpnicaconnection objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnicaconnection -name <string>
        Get vpnicaconnection object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnicaconnection -Filter @{ 'name'='<value>' }
        Get vpnicaconnection data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnicaconnection
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnicaconnection/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Username,

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateSet('TCP', 'UDP')]
        [string]$Transproto,

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateRange(0, 31)]
        [double]$Nodeid,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnicaconnection: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnicaconnection objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnicaconnection -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 vpnicaconnection objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnicaconnection -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnicaconnection objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('username') ) { $arguments.Add('username', $username) } 
                if ( $PSBoundParameters.ContainsKey('transproto') ) { $arguments.Add('transproto', $transproto) } 
                if ( $PSBoundParameters.ContainsKey('nodeid') ) { $arguments.Add('nodeid', $nodeid) }
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnicaconnection -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnicaconnection configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnicaconnection configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnicaconnection -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-ADCGetVpnicaconnection: Ended"
    }
}

function Invoke-ADCGetVpnicadtlsconnection {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for active ica connections resource.
    .PARAMETER Username
        User name for which to display connections.
    .PARAMETER Nodeid
        Unique number that identifies the cluster node.
    .PARAMETER GetAll
        Retrieve all vpnicadtlsconnection object(s).
    .PARAMETER Count
        If specified, the count of the vpnicadtlsconnection 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-ADCGetVpnicadtlsconnection
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnicadtlsconnection -GetAll
        Get all vpnicadtlsconnection data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnicadtlsconnection -Count
        Get the number of vpnicadtlsconnection objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnicadtlsconnection -name <string>
        Get vpnicadtlsconnection object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnicadtlsconnection -Filter @{ 'name'='<value>' }
        Get vpnicadtlsconnection data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnicadtlsconnection
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnicadtlsconnection/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Username,

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateRange(0, 31)]
        [double]$Nodeid,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnicadtlsconnection: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnicadtlsconnection objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnicadtlsconnection -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 vpnicadtlsconnection objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnicadtlsconnection -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnicadtlsconnection objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('username') ) { $arguments.Add('username', $username) } 
                if ( $PSBoundParameters.ContainsKey('nodeid') ) { $arguments.Add('nodeid', $nodeid) }
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnicadtlsconnection -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnicadtlsconnection configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnicadtlsconnection configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnicadtlsconnection -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-ADCGetVpnicadtlsconnection: Ended"
    }
}

function Invoke-ADCAddVpnintranetapplication {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for SSLVPN intranet application resource.
    .PARAMETER Intranetapplication
        Name of the intranet application.
    .PARAMETER Protocol
        Protocol used by the intranet application. If protocol is set to BOTH, TCP and UDP traffic is allowed.
        Possible values = TCP, UDP, ANY
    .PARAMETER Destip
        Destination IP address, IP range, or host name of the intranet application. This address is the server IP address.
    .PARAMETER Netmask
        Destination subnet mask for the intranet application.
    .PARAMETER Iprange
        If you have multiple servers in your network, such as web, email, and file shares, configure an intranet application that includes the IP range for all the network applications. This allows users to access all the intranet applications contained in the IP address range.
    .PARAMETER Hostname
        Name of the host for which to configure interception. The names are resolved during interception when users log on with the Citrix Gateway Plug-in.
    .PARAMETER Clientapplication
        Names of the client applications, such as PuTTY and Xshell.
    .PARAMETER Spoofiip
        IP address that the intranet application will use to route the connection through the virtual adapter.
        Possible values = ON, OFF
    .PARAMETER Destport
        Destination TCP or UDP port number for the intranet application. Use a hyphen to specify a range of port numbers, for example 90-95.
    .PARAMETER Interception
        Interception mode for the intranet application or resource. Correct value depends on the type of client software used to make connections. If the interception mode is set to TRANSPARENT, users connect with the Citrix Gateway Plug-in for Windows. With the PROXY setting, users connect with the Citrix Gateway Plug-in for Java.
        Possible values = PROXY, TRANSPARENT
    .PARAMETER Srcip
        Source IP address. Required if interception mode is set to PROXY. Default is the loopback address, 127.0.0.1.
    .PARAMETER Srcport
        Source port for the application for which the Citrix Gateway virtual server proxies the traffic. If users are connecting from a device that uses the Citrix Gateway Plug-in for Java, applications must be configured manually by using the source IP address and TCP port values specified in the intranet application profile. If a port value is not set, the destination port value is used.
    .PARAMETER PassThru
        Return details about the created vpnintranetapplication item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnintranetapplication -intranetapplication <string>
        An example how to add vpnintranetapplication configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnintranetapplication
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnintranetapplication/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 31)]
        [string]$Intranetapplication,

        [ValidateSet('TCP', 'UDP', 'ANY')]
        [string]$Protocol,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Destip,

        [string]$Netmask,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Iprange,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Hostname,

        [ValidateScript({ $_.Length -gt 1 })]
        [string[]]$Clientapplication,

        [ValidateSet('ON', 'OFF')]
        [string]$Spoofiip = 'ON',

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Destport,

        [ValidateSet('PROXY', 'TRANSPARENT')]
        [string]$Interception,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Srcip,

        [int]$Srcport,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnintranetapplication: Starting"
    }
    process {
        try {
            $payload = @{ intranetapplication = $intranetapplication }
            if ( $PSBoundParameters.ContainsKey('protocol') ) { $payload.Add('protocol', $protocol) }
            if ( $PSBoundParameters.ContainsKey('destip') ) { $payload.Add('destip', $destip) }
            if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) }
            if ( $PSBoundParameters.ContainsKey('iprange') ) { $payload.Add('iprange', $iprange) }
            if ( $PSBoundParameters.ContainsKey('hostname') ) { $payload.Add('hostname', $hostname) }
            if ( $PSBoundParameters.ContainsKey('clientapplication') ) { $payload.Add('clientapplication', $clientapplication) }
            if ( $PSBoundParameters.ContainsKey('spoofiip') ) { $payload.Add('spoofiip', $spoofiip) }
            if ( $PSBoundParameters.ContainsKey('destport') ) { $payload.Add('destport', $destport) }
            if ( $PSBoundParameters.ContainsKey('interception') ) { $payload.Add('interception', $interception) }
            if ( $PSBoundParameters.ContainsKey('srcip') ) { $payload.Add('srcip', $srcip) }
            if ( $PSBoundParameters.ContainsKey('srcport') ) { $payload.Add('srcport', $srcport) }
            if ( $PSCmdlet.ShouldProcess("vpnintranetapplication", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnintranetapplication -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-ADCGetVpnintranetapplication -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnintranetapplication: Finished"
    }
}

function Invoke-ADCDeleteVpnintranetapplication {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for SSLVPN intranet application resource.
    .PARAMETER Intranetapplication
        Name of the intranet application.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnintranetapplication -Intranetapplication <string>
        An example how to delete vpnintranetapplication configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnintranetapplication
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnintranetapplication/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Intranetapplication 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnintranetapplication: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$intranetapplication", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnintranetapplication -NitroPath nitro/v1/config -Resource $intranetapplication -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-ADCDeleteVpnintranetapplication: Finished"
    }
}

function Invoke-ADCGetVpnintranetapplication {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for SSLVPN intranet application resource.
    .PARAMETER Intranetapplication
        Name of the intranet application.
    .PARAMETER GetAll
        Retrieve all vpnintranetapplication object(s).
    .PARAMETER Count
        If specified, the count of the vpnintranetapplication 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-ADCGetVpnintranetapplication
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnintranetapplication -GetAll
        Get all vpnintranetapplication data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnintranetapplication -Count
        Get the number of vpnintranetapplication objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnintranetapplication -name <string>
        Get vpnintranetapplication object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnintranetapplication -Filter @{ 'name'='<value>' }
        Get vpnintranetapplication data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnintranetapplication
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnintranetapplication/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateLength(1, 31)]
        [string]$Intranetapplication,

        [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-ADCGetVpnintranetapplication: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnintranetapplication objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnintranetapplication -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 vpnintranetapplication objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnintranetapplication -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnintranetapplication objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnintranetapplication -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnintranetapplication configuration for property 'intranetapplication'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnintranetapplication -NitroPath nitro/v1/config -Resource $intranetapplication -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnintranetapplication configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnintranetapplication -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-ADCGetVpnintranetapplication: Ended"
    }
}

function Invoke-ADCAddVpnnexthopserver {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Next Hop Server resource.
    .PARAMETER Name
        Name for the Citrix Gateway appliance in the first DMZ.
    .PARAMETER Nexthopip
        IP address of the Citrix Gateway proxy in the second DMZ.
    .PARAMETER Nexthopfqdn
        FQDN of the Citrix Gateway proxy in the second DMZ.
    .PARAMETER Resaddresstype
        Address Type (IPV4/IPv6) of DNS name of nextHopServer FQDN.
        Possible values = IPV4, IPV6
    .PARAMETER Nexthopport
        Port number of the Citrix Gateway proxy in the second DMZ.
    .PARAMETER Secure
        Use of a secure port, such as 443, for the double-hop configuration.
        Possible values = ON, OFF
    .PARAMETER PassThru
        Return details about the created vpnnexthopserver item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnnexthopserver -name <string> -nexthopport <int>
        An example how to add vpnnexthopserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnnexthopserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnnexthopserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 32)]
        [string]$Name,

        [string]$Nexthopip,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Nexthopfqdn,

        [ValidateScript({ $_.Length -gt 1 })]
        [ValidateSet('IPV4', 'IPV6')]
        [string]$Resaddresstype,

        [Parameter(Mandatory)]
        [ValidateRange(1, 65535)]
        [int]$Nexthopport,

        [ValidateSet('ON', 'OFF')]
        [string]$Secure = 'OFF',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnnexthopserver: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                nexthopport    = $nexthopport
            }
            if ( $PSBoundParameters.ContainsKey('nexthopip') ) { $payload.Add('nexthopip', $nexthopip) }
            if ( $PSBoundParameters.ContainsKey('nexthopfqdn') ) { $payload.Add('nexthopfqdn', $nexthopfqdn) }
            if ( $PSBoundParameters.ContainsKey('resaddresstype') ) { $payload.Add('resaddresstype', $resaddresstype) }
            if ( $PSBoundParameters.ContainsKey('secure') ) { $payload.Add('secure', $secure) }
            if ( $PSCmdlet.ShouldProcess("vpnnexthopserver", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnnexthopserver -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-ADCGetVpnnexthopserver -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnnexthopserver: Finished"
    }
}

function Invoke-ADCDeleteVpnnexthopserver {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for Next Hop Server resource.
    .PARAMETER Name
        Name for the Citrix Gateway appliance in the first DMZ.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnnexthopserver -Name <string>
        An example how to delete vpnnexthopserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnnexthopserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnnexthopserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnnexthopserver: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnnexthopserver -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-ADCDeleteVpnnexthopserver: Finished"
    }
}

function Invoke-ADCGetVpnnexthopserver {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for Next Hop Server resource.
    .PARAMETER Name
        Name for the Citrix Gateway appliance in the first DMZ.
    .PARAMETER GetAll
        Retrieve all vpnnexthopserver object(s).
    .PARAMETER Count
        If specified, the count of the vpnnexthopserver 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-ADCGetVpnnexthopserver
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnnexthopserver -GetAll
        Get all vpnnexthopserver data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnnexthopserver -Count
        Get the number of vpnnexthopserver objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnnexthopserver -name <string>
        Get vpnnexthopserver object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnnexthopserver -Filter @{ 'name'='<value>' }
        Get vpnnexthopserver data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnnexthopserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnnexthopserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateLength(1, 32)]
        [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-ADCGetVpnnexthopserver: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnnexthopserver objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnnexthopserver -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 vpnnexthopserver objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnnexthopserver -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnnexthopserver objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnnexthopserver -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnnexthopserver configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnnexthopserver -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnnexthopserver configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnnexthopserver -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-ADCGetVpnnexthopserver: Ended"
    }
}

function Invoke-ADCUpdateVpnparameter {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN parameter resource.
    .PARAMETER Httpport
        Destination port numbers other than port 80, added as a comma-separated list. Traffic to these ports is processed as HTTP traffic, which allows functionality, such as HTTP authorization and single sign-on to a web application to work.
    .PARAMETER Winsip
        WINS server IP address to add to Citrix Gateway for name resolution.
    .PARAMETER Dnsvservername
        Name of the DNS virtual server for the user session.
    .PARAMETER Splitdns
        Route the DNS requests to the local DNS server configured on the user device, or Citrix Gateway (remote), or both.
        Possible values = LOCAL, REMOTE, BOTH
    .PARAMETER Icauseraccounting
        The name of the radiusPolicy to use for RADIUS user accounting info on the session.
    .PARAMETER Sesstimeout
        Number of minutes after which the session times out.
    .PARAMETER Clientsecurity
        Specify the client security check for the user device to permit a Citrix Gateway session. The web address or IP address is not included in the expression for the client security check.
    .PARAMETER Clientsecuritygroup
        The client security group that will be assigned on failure of the client security check. Users can in general be organized into Groups. In this case, the Client Security Group may have a more restrictive security policy.
    .PARAMETER Clientsecuritymessage
        The client security message that will be displayed on failure of the client security check.
    .PARAMETER Clientsecuritylog
        Specifies whether or not to display all failed Client Security scans to the end user.
        Possible values = ON, OFF
    .PARAMETER Smartgroup
        This is the default group that is chosen when the authentication succeeds in addition to extracted groups.
    .PARAMETER Splittunnel
        Send, through the tunnel, traffic only for intranet applications that are defined in Citrix Gateway. Route all other traffic directly to the Internet. The OFF setting routes all traffic through Citrix Gateway. With the REVERSE setting, intranet applications define the network traffic that is not intercepted. All network traffic directed to internal IP addresses bypasses the VPN tunnel, while other traffic goes through Citrix Gateway. Reverse split tunneling can be used to log all non-local LAN traffic. For example, if users have a home network and are logged on through the Citrix Gateway Plug-in, network traffic destined to a printer or another device within the home network is not intercepted.
        Possible values = ON, OFF, REVERSE
    .PARAMETER Locallanaccess
        Set local LAN access. If split tunneling is OFF, and you set local LAN access to ON, the local client can route traffic to its local interface. When the local area network switch is specified, this combination of switches is useful. The client can allow local LAN access to devices that commonly have non-routable addresses, such as local printers or local file servers.
        Possible values = ON, OFF
    .PARAMETER Rfc1918
        As defined in the local area network, allow only the following local area network addresses to bypass the VPN tunnel when the local LAN access feature is enabled:
        * 10.*.*.*,
        * 172.16.*.*,
        * 192.168.*.*.
        Possible values = ON, OFF
    .PARAMETER Spoofiip
        Indicate whether or not the application requires IP spoofing, which routes the connection to the intranet application through the virtual adapter.
        Possible values = ON, OFF
    .PARAMETER Killconnections
        Specify whether the Citrix Gateway Plug-in should disconnect all preexisting connections, such as the connections existing before the user logged on to Citrix Gateway, and prevent new incoming connections on the Citrix Gateway Plug-in for Windows and MAC when the user is connected to Citrix Gateway and split tunneling is disabled.
        Possible values = ON, OFF
    .PARAMETER Transparentinterception
        Allow access to network resources by using a single IP address and subnet mask or a range of IP addresses. The OFF setting sets the mode to proxy, in which you configure destination and source IP addresses and port numbers. If you are using the Citrix Gateway Plug-in for Windows, set this parameter to ON, in which the mode is set to transparent. If you are using the Citrix Gateway Plug-in for Java, set this parameter to OFF.
        Possible values = ON, OFF
    .PARAMETER Windowsclienttype
        The Windows client type. Choose between two types of Windows Client\
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed\
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Defaultauthorizationaction
        Specify the network resources that users have access to when they log on to the internal network. The default setting for authorization is to deny access to all network resources. Citrix recommends using the default global setting and then creating authorization policies to define the network resources users can access. If you set the default authorization policy to DENY, you must explicitly authorize access to any network resource, which improves security.
        Possible values = ALLOW, DENY
    .PARAMETER Authorizationgroup
        Comma-separated list of groups in which the user is placed when none of the groups that the user is a part of is configured on Citrix Gateway. The authorization policy can be bound to these groups to control access to the resources.
    .PARAMETER Clientidletimeout
        Time, in minutes, after which to time out the user session if Citrix Gateway does not detect mouse or keyboard activity.
    .PARAMETER Proxy
        Set options to apply proxy for accessing the internal resources. Available settings function as follows:
        * BROWSER - Proxy settings are configured only in Internet Explorer and Firefox browsers.
        * NS - Proxy settings are configured on the Citrix ADC.
        * OFF - Proxy settings are not configured.
        Possible values = BROWSER, NS, OFF
    .PARAMETER Allprotocolproxy
        IP address of the proxy server to use for all protocols supported by Citrix Gateway.
    .PARAMETER Httpproxy
        IP address of the proxy server to be used for HTTP access for all subsequent connections to the internal network.
    .PARAMETER Ftpproxy
        IP address of the proxy server to be used for FTP access for all subsequent connections to the internal network.
    .PARAMETER Socksproxy
        IP address of the proxy server to be used for SOCKS access for all subsequent connections to the internal network.
    .PARAMETER Gopherproxy
        IP address of the proxy server to be used for GOPHER access for all subsequent connections to the internal network.
    .PARAMETER Sslproxy
        IP address of the proxy server to be used for SSL access for all subsequent connections to the internal network.
    .PARAMETER Proxyexception
        Proxy exception string that will be configured in the browser for bypassing the previously configured proxies. Allowed only if proxy type is Browser.
    .PARAMETER Proxylocalbypass
        Bypass proxy server for local addresses option in Internet Explorer and Firefox proxy server settings.
        Possible values = ENABLED, DISABLED
    .PARAMETER Clientcleanupprompt
        Prompt for client-side cache clean-up when a client-initiated session closes.
        Possible values = ON, OFF
    .PARAMETER Forcecleanup
        Force cache clean-up when the user closes a session. You can specify all, none, or any combination of the client-side items.
        Possible values = none, all, cookie, addressbar, plugin, filesystemapplication, application, applicationdata, clientcertificate, autocomplete, cache
    .PARAMETER Clientoptions
        Display only the configured menu options when you select the "Configure Citrix Gateway" option in the Citrix Gateway Plug-in's system tray icon for Windows.
        Possible values = none, all, services, filetransfer, configuration
    .PARAMETER Clientconfiguration
        Allow users to change client Debug logging level in Configuration tab of the Citrix Gateway Plug-in for Windows.
        Possible values = none, trace
    .PARAMETER Sso
        Set single sign-on (SSO) for the session. When the user accesses a server, the user's logon credentials are passed to the server for authentication.
        NOTE : This configuration does not honor the following authentication types for security reason. BASIC, DIGEST, and NTLM (without Negotiate NTLM2 Key or Negotiate Sign Flag). Use VPN TrafficAction to configure SSO for these authentication types.
        Possible values = ON, OFF
    .PARAMETER Ssocredential
        Specify whether to use the primary or secondary authentication credentials for single sign-on to the server.
        Possible values = PRIMARY, SECONDARY
    .PARAMETER Windowsautologon
        Enable or disable the Windows Auto Logon for the session. If a VPN session is established after this setting is enabled, the user is automatically logged on by using Windows credentials after the system is restarted.
        Possible values = ON, OFF
    .PARAMETER Usemip
        Enable or disable the use of a unique IP address alias, or a mapped IP address, as the client IP address for each client session. Allow Citrix Gateway to use the mapped IP address as an intranet IP address when all other IP addresses are not available.
        When IP pooling is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        Possible values = NS, OFF
    .PARAMETER Useiip
        Define IP address pool options. Available settings function as follows:
        * SPILLOVER - When an address pool is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        * NOSPILLOVER - When intranet IP addresses are enabled and the mapped IP address is not used, the Transfer Login page appears for users who have used all available intranet IP addresses.
        * OFF - Address pool is not configured.
        Possible values = NOSPILLOVER, SPILLOVER, OFF
    .PARAMETER Clientdebug
        Set the trace level on Citrix Gateway. Technical support technicians use these debug logs for in-depth debugging and troubleshooting purposes. Available settings function as follows:
        * DEBUG - Detailed debug messages are collected and written into the specified file.
        * STATS - Application audit level error messages and debug statistic counters are written into the specified file.
        * EVENTS - Application audit-level error messages are written into the specified file.
        * OFF - Only critical events are logged into the Windows Application Log.
        Possible values = debug, stats, events, OFF
    .PARAMETER Loginscript
        Path to the logon script that is run when a session is established. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Logoutscript
        Path to the logout script. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Homepage
        Web address of the home page that appears when users log on. Otherwise, users receive the default home page for Citrix Gateway, which is the Access Interface.
    .PARAMETER Icaproxy
        Enable ICA proxy to configure secure Internet access to servers running Citrix XenApp or XenDesktop by using Citrix Receiver instead of the Citrix Gateway Plug-in.
        Possible values = ON, OFF
    .PARAMETER Wihome
        Web address of the Web Interface server, such as http://<ipAddress>/Citrix/XenApp, or Receiver for Web, which enumerates the virtualized resources, such as XenApp, XenDesktop, and cloud applications. This web address is used as the home page in ICA proxy mode.
        If Client Choices is ON, you must configure this setting. Because the user can choose between FullClient and ICAProxy, the user may see a different home page. An Internet web site may appear if the user gets the FullClient option, or a Web Interface site if the user gets the ICAProxy option. If the setting is not configured, the XenApp option does not appear as a client choice.
    .PARAMETER Wihomeaddresstype
        Type of the wihome address(IPV4/V6).
        Possible values = IPV4, IPV6
    .PARAMETER Citrixreceiverhome
        Web address for the Citrix Receiver home page. Configure Citrix Gateway so that when users log on to the appliance, the Citrix Gateway Plug-in opens a web browser that allows single sign-on to the Citrix Receiver home page.
    .PARAMETER Wiportalmode
        Layout on the Access Interface. The COMPACT value indicates the use of small icons.
        Possible values = NORMAL, COMPACT
    .PARAMETER Clientchoices
        Provide users with multiple logon options. With client choices, users have the option of logging on by using the Citrix Gateway Plug-in for Windows, Citrix Gateway Plug-in for Java, the Web Interface, or clientless access from one location. Depending on how Citrix Gateway is configured, users are presented with up to three icons for logon choices. The most common are the Citrix Gateway Plug-in for Windows, Web Interface, and clientless access.
        Possible values = ON, OFF
    .PARAMETER Epaclienttype
        Choose between two types of End point Windows Client
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Iipdnssuffix
        An intranet IP DNS suffix. When a user logs on to Citrix Gateway and is assigned an IP address, a DNS record for the user name and IP address combination is added to the Citrix Gateway DNS cache. You can configure a DNS suffix to append to the user name when the DNS record is added to the cache. You can reach to the host from where the user is logged on by using the user's name, which can be easier to remember than an IP address. When the user logs off from Citrix Gateway, the record is removed from the DNS cache.
    .PARAMETER Forcedtimeout
        Force a disconnection from the Citrix Gateway Plug-in with Citrix Gateway after a specified number of minutes. If the session closes, the user must log on again.
    .PARAMETER Forcedtimeoutwarning
        Number of minutes to warn a user before the user session is disconnected.
    .PARAMETER Ntdomain
        Single sign-on domain to use for single sign-on to applications in the internal network. This setting can be overwritten by the domain that users specify at the time of logon or by the domain that the authentication server returns.
    .PARAMETER Clientlessvpnmode
        Enable clientless access for web, XenApp or XenDesktop, and FileShare resources without installing the Citrix Gateway Plug-in. Available settings function as follows:
        * ON - Allow only clientless access.
        * OFF - Allow clientless access after users log on with the Citrix Gateway Plug-in.
        * DISABLED - Do not allow clientless access.
        Possible values = ON, OFF, DISABLED
    .PARAMETER Clientlessmodeurlencoding
        When clientless access is enabled, you can choose to encode the addresses of internal web applications or to leave the address as clear text. Available settings function as follows:
        * OPAQUE - Use standard encoding mechanisms to make the domain and protocol part of the resource unclear to users.
        * TRANSPARENT - Do not encode the web address and make it visible to users.
        * ENCRYPT - Allow the domain and protocol to be encrypted using a session key. When the web address is encrypted, the URL is different for each user session for the same web resource. If users bookmark the encoded web address, save it in the web browser and then log off, they cannot connect to the web address when they log on and use the bookmark. If users save the encrypted bookmark in the Access Interface during their session, the bookmark works each time the user logs on.
        Possible values = TRANSPARENT, OPAQUE, ENCRYPT
    .PARAMETER Clientlesspersistentcookie
        State of persistent cookies in clientless access mode. Persistent cookies are required for accessing certain features of SharePoint, such as opening and editing Microsoft Word, Excel, and PowerPoint documents hosted on the SharePoint server. A persistent cookie remains on the user device and is sent with each HTTP request. Citrix Gateway encrypts the persistent cookie before sending it to the plug-in on the user device, and refreshes the cookie periodically as long as the session exists. The cookie becomes stale if the session ends. Available settings function as follows:
        * ALLOW - Enable persistent cookies. Users can open and edit Microsoft documents stored in SharePoint.
        * DENY - Disable persistent cookies. Users cannot open and edit Microsoft documents stored in SharePoint.
        * PROMPT - Prompt users to allow or deny persistent cookies during the session. Persistent cookies are not required for clientless access if users do not connect to SharePoint.
        Possible values = ALLOW, DENY, PROMPT
    .PARAMETER Emailhome
        Web address for the web-based email, such as Outlook Web Access.
    .PARAMETER Allowedlogingroups
        Specify groups that have permission to log on to Citrix Gateway. Users who do not belong to this group or groups are denied access even if they have valid credentials.
    .PARAMETER Encryptcsecexp
        Enable encryption of client security expressions.
        Possible values = ENABLED, DISABLED
    .PARAMETER Apptokentimeout
        The timeout value in seconds for tokens to access XenMobile applications.
    .PARAMETER Mdxtokentimeout
        Validity of MDX Token in minutes. This token is used for mdx services to access backend and valid HEAD and GET request.
    .PARAMETER Uitheme
        Set VPN UI Theme to Green-Bubble, Caxton or Custom; default is Caxton.
        Possible values = DEFAULT, GREENBUBBLE, CUSTOM
    .PARAMETER Securebrowse
        Allow users to connect through Citrix Gateway to network resources from iOS and Android mobile devices with Citrix Receiver. Users do not need to establish a full VPN tunnel to access resources in the secure network.
        Possible values = ENABLED, DISABLED
    .PARAMETER Storefronturl
        Web address for StoreFront to be used in this session for enumeration of resources from XenApp or XenDesktop.
    .PARAMETER Kcdaccount
        The KCD account details to be used in SSO.
    .PARAMETER Clientversions
        checkversion api.
    .PARAMETER Rdpclientprofilename
        Name of the RDP profile associated with the vserver.
    .PARAMETER Windowspluginupgrade
        Option to set plugin upgrade behaviour for Win.
        Possible values = Always, Essential, Never
    .PARAMETER Macpluginupgrade
        Option to set plugin upgrade behaviour for Mac.
        Possible values = Always, Essential, Never
    .PARAMETER Linuxpluginupgrade
        Option to set plugin upgrade behaviour for Linux.
        Possible values = Always, Essential, Never
    .PARAMETER Iconwithreceiver
        Option to decide whether to show plugin icon along with receiver icon.
        Possible values = ON, OFF
    .PARAMETER Userdomains
        List of user domains specified as comma seperated value.
    .PARAMETER Icasessiontimeout
        Enable or disable ica session timeout. If enabled and in case AAA session gets terminated, ICA connections associated with that will also get terminated.
        Possible values = ON, OFF
    .PARAMETER Alwaysonprofilename
        Name of the AlwaysON profile. The builtin profile named none can be used to explicitly disable AlwaysON.
    .PARAMETER Autoproxyurl
        URL to auto proxy config file.
    .PARAMETER Advancedclientlessvpnmode
        Option to enable/disable Advanced ClientlessVpnMode. Additionaly, it can be set to STRICT to block Classic ClientlessVpnMode while in AdvancedClientlessMode.
        Possible values = ENABLED, DISABLED, STRICT
    .PARAMETER Pcoipprofilename
        Name of the PCOIP profile.
    .PARAMETER Backendserversni
        enables sni extension for backend server handshakes.
        Possible values = ENABLED, DISABLED
    .PARAMETER Backendcertvalidation
        enables backend server certificate validation.
        Possible values = ENABLED, DISABLED
    .PARAMETER Fqdnspoofedip
        Spoofed IP address range that can be used by client for FQDN based split tunneling.
    .PARAMETER Netmask
        The netmask for the spoofed ip address.
    .PARAMETER Samesite
        SameSite attribute value for Cookies generated in VPN context. This attribute value will be appended only for the cookies which are specified in the builtin patset ns_cookies_samesite.
        Possible values = None, LAX, STRICT
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnparameter
        An example how to update vpnparameter configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnparameter
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnparameter/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [int[]]$Httpport,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Winsip,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Dnsvservername,

        [ValidateSet('LOCAL', 'REMOTE', 'BOTH')]
        [string]$Splitdns,

        [string]$Icauseraccounting,

        [ValidateRange(1, 65535)]
        [double]$Sesstimeout,

        [string]$Clientsecurity,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Clientsecuritygroup,

        [ValidateLength(1, 127)]
        [string]$Clientsecuritymessage,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientsecuritylog,

        [ValidateLength(1, 64)]
        [string]$Smartgroup,

        [ValidateSet('ON', 'OFF', 'REVERSE')]
        [string]$Splittunnel,

        [ValidateSet('ON', 'OFF')]
        [string]$Locallanaccess,

        [ValidateSet('ON', 'OFF')]
        [string]$Rfc1918,

        [ValidateSet('ON', 'OFF')]
        [string]$Spoofiip,

        [ValidateSet('ON', 'OFF')]
        [string]$Killconnections,

        [ValidateSet('ON', 'OFF')]
        [string]$Transparentinterception,

        [ValidateSet('AGENT', 'PLUGIN')]
        [string]$Windowsclienttype,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Defaultauthorizationaction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Authorizationgroup,

        [ValidateRange(1, 9999)]
        [double]$Clientidletimeout,

        [ValidateSet('BROWSER', 'NS', 'OFF')]
        [string]$Proxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Allprotocolproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Httpproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Ftpproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Socksproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Gopherproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Sslproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Proxyexception,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Proxylocalbypass,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientcleanupprompt,

        [ValidateSet('none', 'all', 'cookie', 'addressbar', 'plugin', 'filesystemapplication', 'application', 'applicationdata', 'clientcertificate', 'autocomplete', 'cache')]
        [string[]]$Forcecleanup,

        [ValidateSet('none', 'all', 'services', 'filetransfer', 'configuration')]
        [string[]]$Clientoptions,

        [ValidateSet('none', 'trace')]
        [string[]]$Clientconfiguration,

        [ValidateSet('ON', 'OFF')]
        [string]$Sso,

        [ValidateSet('PRIMARY', 'SECONDARY')]
        [string]$Ssocredential,

        [ValidateSet('ON', 'OFF')]
        [string]$Windowsautologon,

        [ValidateSet('NS', 'OFF')]
        [string]$Usemip,

        [ValidateSet('NOSPILLOVER', 'SPILLOVER', 'OFF')]
        [string]$Useiip,

        [ValidateSet('debug', 'stats', 'events', 'OFF')]
        [string]$Clientdebug,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Loginscript,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Logoutscript,

        [string]$Homepage,

        [ValidateSet('ON', 'OFF')]
        [string]$Icaproxy,

        [string]$Wihome,

        [ValidateSet('IPV4', 'IPV6')]
        [string]$Wihomeaddresstype,

        [string]$Citrixreceiverhome,

        [ValidateSet('NORMAL', 'COMPACT')]
        [string]$Wiportalmode,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientchoices,

        [ValidateSet('AGENT', 'PLUGIN')]
        [string]$Epaclienttype,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Iipdnssuffix,

        [ValidateRange(1, 65535)]
        [double]$Forcedtimeout,

        [ValidateRange(1, 255)]
        [double]$Forcedtimeoutwarning,

        [ValidateLength(1, 32)]
        [string]$Ntdomain,

        [ValidateSet('ON', 'OFF', 'DISABLED')]
        [string]$Clientlessvpnmode,

        [ValidateSet('TRANSPARENT', 'OPAQUE', 'ENCRYPT')]
        [string]$Clientlessmodeurlencoding,

        [ValidateSet('ALLOW', 'DENY', 'PROMPT')]
        [string]$Clientlesspersistentcookie,

        [string]$Emailhome,

        [ValidateLength(1, 511)]
        [string]$Allowedlogingroups,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Encryptcsecexp,

        [ValidateRange(1, 255)]
        [double]$Apptokentimeout,

        [ValidateRange(1, 1440)]
        [double]$Mdxtokentimeout,

        [ValidateSet('DEFAULT', 'GREENBUBBLE', 'CUSTOM')]
        [string]$Uitheme,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Securebrowse,

        [ValidateLength(1, 255)]
        [string]$Storefronturl,

        [string]$Kcdaccount,

        [ValidateLength(1, 100)]
        [string]$Clientversions,

        [ValidateLength(1, 127)]
        [string]$Rdpclientprofilename,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Windowspluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Macpluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Linuxpluginupgrade,

        [ValidateSet('ON', 'OFF')]
        [string]$Iconwithreceiver,

        [string]$Userdomains,

        [ValidateSet('ON', 'OFF')]
        [string]$Icasessiontimeout,

        [ValidateLength(1, 127)]
        [string]$Alwaysonprofilename,

        [string]$Autoproxyurl,

        [ValidateSet('ENABLED', 'DISABLED', 'STRICT')]
        [string]$Advancedclientlessvpnmode,

        [ValidateLength(1, 127)]
        [string]$Pcoipprofilename,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Backendserversni,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Backendcertvalidation,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Fqdnspoofedip,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Netmask,

        [ValidateSet('None', 'LAX', 'STRICT')]
        [string]$Samesite 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnparameter: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('httpport') ) { $payload.Add('httpport', $httpport) }
            if ( $PSBoundParameters.ContainsKey('winsip') ) { $payload.Add('winsip', $winsip) }
            if ( $PSBoundParameters.ContainsKey('dnsvservername') ) { $payload.Add('dnsvservername', $dnsvservername) }
            if ( $PSBoundParameters.ContainsKey('splitdns') ) { $payload.Add('splitdns', $splitdns) }
            if ( $PSBoundParameters.ContainsKey('icauseraccounting') ) { $payload.Add('icauseraccounting', $icauseraccounting) }
            if ( $PSBoundParameters.ContainsKey('sesstimeout') ) { $payload.Add('sesstimeout', $sesstimeout) }
            if ( $PSBoundParameters.ContainsKey('clientsecurity') ) { $payload.Add('clientsecurity', $clientsecurity) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritygroup') ) { $payload.Add('clientsecuritygroup', $clientsecuritygroup) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritymessage') ) { $payload.Add('clientsecuritymessage', $clientsecuritymessage) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritylog') ) { $payload.Add('clientsecuritylog', $clientsecuritylog) }
            if ( $PSBoundParameters.ContainsKey('smartgroup') ) { $payload.Add('smartgroup', $smartgroup) }
            if ( $PSBoundParameters.ContainsKey('splittunnel') ) { $payload.Add('splittunnel', $splittunnel) }
            if ( $PSBoundParameters.ContainsKey('locallanaccess') ) { $payload.Add('locallanaccess', $locallanaccess) }
            if ( $PSBoundParameters.ContainsKey('rfc1918') ) { $payload.Add('rfc1918', $rfc1918) }
            if ( $PSBoundParameters.ContainsKey('spoofiip') ) { $payload.Add('spoofiip', $spoofiip) }
            if ( $PSBoundParameters.ContainsKey('killconnections') ) { $payload.Add('killconnections', $killconnections) }
            if ( $PSBoundParameters.ContainsKey('transparentinterception') ) { $payload.Add('transparentinterception', $transparentinterception) }
            if ( $PSBoundParameters.ContainsKey('windowsclienttype') ) { $payload.Add('windowsclienttype', $windowsclienttype) }
            if ( $PSBoundParameters.ContainsKey('defaultauthorizationaction') ) { $payload.Add('defaultauthorizationaction', $defaultauthorizationaction) }
            if ( $PSBoundParameters.ContainsKey('authorizationgroup') ) { $payload.Add('authorizationgroup', $authorizationgroup) }
            if ( $PSBoundParameters.ContainsKey('clientidletimeout') ) { $payload.Add('clientidletimeout', $clientidletimeout) }
            if ( $PSBoundParameters.ContainsKey('proxy') ) { $payload.Add('proxy', $proxy) }
            if ( $PSBoundParameters.ContainsKey('allprotocolproxy') ) { $payload.Add('allprotocolproxy', $allprotocolproxy) }
            if ( $PSBoundParameters.ContainsKey('httpproxy') ) { $payload.Add('httpproxy', $httpproxy) }
            if ( $PSBoundParameters.ContainsKey('ftpproxy') ) { $payload.Add('ftpproxy', $ftpproxy) }
            if ( $PSBoundParameters.ContainsKey('socksproxy') ) { $payload.Add('socksproxy', $socksproxy) }
            if ( $PSBoundParameters.ContainsKey('gopherproxy') ) { $payload.Add('gopherproxy', $gopherproxy) }
            if ( $PSBoundParameters.ContainsKey('sslproxy') ) { $payload.Add('sslproxy', $sslproxy) }
            if ( $PSBoundParameters.ContainsKey('proxyexception') ) { $payload.Add('proxyexception', $proxyexception) }
            if ( $PSBoundParameters.ContainsKey('proxylocalbypass') ) { $payload.Add('proxylocalbypass', $proxylocalbypass) }
            if ( $PSBoundParameters.ContainsKey('clientcleanupprompt') ) { $payload.Add('clientcleanupprompt', $clientcleanupprompt) }
            if ( $PSBoundParameters.ContainsKey('forcecleanup') ) { $payload.Add('forcecleanup', $forcecleanup) }
            if ( $PSBoundParameters.ContainsKey('clientoptions') ) { $payload.Add('clientoptions', $clientoptions) }
            if ( $PSBoundParameters.ContainsKey('clientconfiguration') ) { $payload.Add('clientconfiguration', $clientconfiguration) }
            if ( $PSBoundParameters.ContainsKey('sso') ) { $payload.Add('sso', $sso) }
            if ( $PSBoundParameters.ContainsKey('ssocredential') ) { $payload.Add('ssocredential', $ssocredential) }
            if ( $PSBoundParameters.ContainsKey('windowsautologon') ) { $payload.Add('windowsautologon', $windowsautologon) }
            if ( $PSBoundParameters.ContainsKey('usemip') ) { $payload.Add('usemip', $usemip) }
            if ( $PSBoundParameters.ContainsKey('useiip') ) { $payload.Add('useiip', $useiip) }
            if ( $PSBoundParameters.ContainsKey('clientdebug') ) { $payload.Add('clientdebug', $clientdebug) }
            if ( $PSBoundParameters.ContainsKey('loginscript') ) { $payload.Add('loginscript', $loginscript) }
            if ( $PSBoundParameters.ContainsKey('logoutscript') ) { $payload.Add('logoutscript', $logoutscript) }
            if ( $PSBoundParameters.ContainsKey('homepage') ) { $payload.Add('homepage', $homepage) }
            if ( $PSBoundParameters.ContainsKey('icaproxy') ) { $payload.Add('icaproxy', $icaproxy) }
            if ( $PSBoundParameters.ContainsKey('wihome') ) { $payload.Add('wihome', $wihome) }
            if ( $PSBoundParameters.ContainsKey('wihomeaddresstype') ) { $payload.Add('wihomeaddresstype', $wihomeaddresstype) }
            if ( $PSBoundParameters.ContainsKey('citrixreceiverhome') ) { $payload.Add('citrixreceiverhome', $citrixreceiverhome) }
            if ( $PSBoundParameters.ContainsKey('wiportalmode') ) { $payload.Add('wiportalmode', $wiportalmode) }
            if ( $PSBoundParameters.ContainsKey('clientchoices') ) { $payload.Add('clientchoices', $clientchoices) }
            if ( $PSBoundParameters.ContainsKey('epaclienttype') ) { $payload.Add('epaclienttype', $epaclienttype) }
            if ( $PSBoundParameters.ContainsKey('iipdnssuffix') ) { $payload.Add('iipdnssuffix', $iipdnssuffix) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeout') ) { $payload.Add('forcedtimeout', $forcedtimeout) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeoutwarning') ) { $payload.Add('forcedtimeoutwarning', $forcedtimeoutwarning) }
            if ( $PSBoundParameters.ContainsKey('ntdomain') ) { $payload.Add('ntdomain', $ntdomain) }
            if ( $PSBoundParameters.ContainsKey('clientlessvpnmode') ) { $payload.Add('clientlessvpnmode', $clientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('clientlessmodeurlencoding') ) { $payload.Add('clientlessmodeurlencoding', $clientlessmodeurlencoding) }
            if ( $PSBoundParameters.ContainsKey('clientlesspersistentcookie') ) { $payload.Add('clientlesspersistentcookie', $clientlesspersistentcookie) }
            if ( $PSBoundParameters.ContainsKey('emailhome') ) { $payload.Add('emailhome', $emailhome) }
            if ( $PSBoundParameters.ContainsKey('allowedlogingroups') ) { $payload.Add('allowedlogingroups', $allowedlogingroups) }
            if ( $PSBoundParameters.ContainsKey('encryptcsecexp') ) { $payload.Add('encryptcsecexp', $encryptcsecexp) }
            if ( $PSBoundParameters.ContainsKey('apptokentimeout') ) { $payload.Add('apptokentimeout', $apptokentimeout) }
            if ( $PSBoundParameters.ContainsKey('mdxtokentimeout') ) { $payload.Add('mdxtokentimeout', $mdxtokentimeout) }
            if ( $PSBoundParameters.ContainsKey('uitheme') ) { $payload.Add('uitheme', $uitheme) }
            if ( $PSBoundParameters.ContainsKey('securebrowse') ) { $payload.Add('securebrowse', $securebrowse) }
            if ( $PSBoundParameters.ContainsKey('storefronturl') ) { $payload.Add('storefronturl', $storefronturl) }
            if ( $PSBoundParameters.ContainsKey('kcdaccount') ) { $payload.Add('kcdaccount', $kcdaccount) }
            if ( $PSBoundParameters.ContainsKey('clientversions') ) { $payload.Add('clientversions', $clientversions) }
            if ( $PSBoundParameters.ContainsKey('rdpclientprofilename') ) { $payload.Add('rdpclientprofilename', $rdpclientprofilename) }
            if ( $PSBoundParameters.ContainsKey('windowspluginupgrade') ) { $payload.Add('windowspluginupgrade', $windowspluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('macpluginupgrade') ) { $payload.Add('macpluginupgrade', $macpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('linuxpluginupgrade') ) { $payload.Add('linuxpluginupgrade', $linuxpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('iconwithreceiver') ) { $payload.Add('iconwithreceiver', $iconwithreceiver) }
            if ( $PSBoundParameters.ContainsKey('userdomains') ) { $payload.Add('userdomains', $userdomains) }
            if ( $PSBoundParameters.ContainsKey('icasessiontimeout') ) { $payload.Add('icasessiontimeout', $icasessiontimeout) }
            if ( $PSBoundParameters.ContainsKey('alwaysonprofilename') ) { $payload.Add('alwaysonprofilename', $alwaysonprofilename) }
            if ( $PSBoundParameters.ContainsKey('autoproxyurl') ) { $payload.Add('autoproxyurl', $autoproxyurl) }
            if ( $PSBoundParameters.ContainsKey('advancedclientlessvpnmode') ) { $payload.Add('advancedclientlessvpnmode', $advancedclientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('pcoipprofilename') ) { $payload.Add('pcoipprofilename', $pcoipprofilename) }
            if ( $PSBoundParameters.ContainsKey('backendserversni') ) { $payload.Add('backendserversni', $backendserversni) }
            if ( $PSBoundParameters.ContainsKey('backendcertvalidation') ) { $payload.Add('backendcertvalidation', $backendcertvalidation) }
            if ( $PSBoundParameters.ContainsKey('fqdnspoofedip') ) { $payload.Add('fqdnspoofedip', $fqdnspoofedip) }
            if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) }
            if ( $PSBoundParameters.ContainsKey('samesite') ) { $payload.Add('samesite', $samesite) }
            if ( $PSCmdlet.ShouldProcess("vpnparameter", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnparameter -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-ADCUpdateVpnparameter: Finished"
    }
}

function Invoke-ADCUnsetVpnparameter {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN parameter resource.
    .PARAMETER Httpport
        Destination port numbers other than port 80, added as a comma-separated list. Traffic to these ports is processed as HTTP traffic, which allows functionality, such as HTTP authorization and single sign-on to a web application to work.
    .PARAMETER Winsip
        WINS server IP address to add to Citrix Gateway for name resolution.
    .PARAMETER Dnsvservername
        Name of the DNS virtual server for the user session.
    .PARAMETER Splitdns
        Route the DNS requests to the local DNS server configured on the user device, or Citrix Gateway (remote), or both.
        Possible values = LOCAL, REMOTE, BOTH
    .PARAMETER Icauseraccounting
        The name of the radiusPolicy to use for RADIUS user accounting info on the session.
    .PARAMETER Sesstimeout
        Number of minutes after which the session times out.
    .PARAMETER Clientsecurity
        Specify the client security check for the user device to permit a Citrix Gateway session. The web address or IP address is not included in the expression for the client security check.
    .PARAMETER Clientsecuritygroup
        The client security group that will be assigned on failure of the client security check. Users can in general be organized into Groups. In this case, the Client Security Group may have a more restrictive security policy.
    .PARAMETER Smartgroup
        This is the default group that is chosen when the authentication succeeds in addition to extracted groups.
    .PARAMETER Clientsecuritymessage
        The client security message that will be displayed on failure of the client security check.
    .PARAMETER Clientsecuritylog
        Specifies whether or not to display all failed Client Security scans to the end user.
        Possible values = ON, OFF
    .PARAMETER Authorizationgroup
        Comma-separated list of groups in which the user is placed when none of the groups that the user is a part of is configured on Citrix Gateway. The authorization policy can be bound to these groups to control access to the resources.
    .PARAMETER Clientidletimeout
        Time, in minutes, after which to time out the user session if Citrix Gateway does not detect mouse or keyboard activity.
    .PARAMETER Allprotocolproxy
        IP address of the proxy server to use for all protocols supported by Citrix Gateway.
    .PARAMETER Httpproxy
        IP address of the proxy server to be used for HTTP access for all subsequent connections to the internal network.
    .PARAMETER Ftpproxy
        IP address of the proxy server to be used for FTP access for all subsequent connections to the internal network.
    .PARAMETER Socksproxy
        IP address of the proxy server to be used for SOCKS access for all subsequent connections to the internal network.
    .PARAMETER Gopherproxy
        IP address of the proxy server to be used for GOPHER access for all subsequent connections to the internal network.
    .PARAMETER Sslproxy
        IP address of the proxy server to be used for SSL access for all subsequent connections to the internal network.
    .PARAMETER Proxyexception
        Proxy exception string that will be configured in the browser for bypassing the previously configured proxies. Allowed only if proxy type is Browser.
    .PARAMETER Forcecleanup
        Force cache clean-up when the user closes a session. You can specify all, none, or any combination of the client-side items.
        Possible values = none, all, cookie, addressbar, plugin, filesystemapplication, application, applicationdata, clientcertificate, autocomplete, cache
    .PARAMETER Clientoptions
        Display only the configured menu options when you select the "Configure Citrix Gateway" option in the Citrix Gateway Plug-in's system tray icon for Windows.
        Possible values = none, all, services, filetransfer, configuration
    .PARAMETER Clientconfiguration
        Allow users to change client Debug logging level in Configuration tab of the Citrix Gateway Plug-in for Windows.
        Possible values = none, trace
    .PARAMETER Loginscript
        Path to the logon script that is run when a session is established. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Logoutscript
        Path to the logout script. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Homepage
        Web address of the home page that appears when users log on. Otherwise, users receive the default home page for Citrix Gateway, which is the Access Interface.
    .PARAMETER Proxy
        Set options to apply proxy for accessing the internal resources. Available settings function as follows:
        * BROWSER - Proxy settings are configured only in Internet Explorer and Firefox browsers.
        * NS - Proxy settings are configured on the Citrix ADC.
        * OFF - Proxy settings are not configured.
        Possible values = BROWSER, NS, OFF
    .PARAMETER Wihome
        Web address of the Web Interface server, such as http://<ipAddress>/Citrix/XenApp, or Receiver for Web, which enumerates the virtualized resources, such as XenApp, XenDesktop, and cloud applications. This web address is used as the home page in ICA proxy mode.
        If Client Choices is ON, you must configure this setting. Because the user can choose between FullClient and ICAProxy, the user may see a different home page. An Internet web site may appear if the user gets the FullClient option, or a Web Interface site if the user gets the ICAProxy option. If the setting is not configured, the XenApp option does not appear as a client choice.
    .PARAMETER Citrixreceiverhome
        Web address for the Citrix Receiver home page. Configure Citrix Gateway so that when users log on to the appliance, the Citrix Gateway Plug-in opens a web browser that allows single sign-on to the Citrix Receiver home page.
    .PARAMETER Wiportalmode
        Layout on the Access Interface. The COMPACT value indicates the use of small icons.
        Possible values = NORMAL, COMPACT
    .PARAMETER Iipdnssuffix
        An intranet IP DNS suffix. When a user logs on to Citrix Gateway and is assigned an IP address, a DNS record for the user name and IP address combination is added to the Citrix Gateway DNS cache. You can configure a DNS suffix to append to the user name when the DNS record is added to the cache. You can reach to the host from where the user is logged on by using the user's name, which can be easier to remember than an IP address. When the user logs off from Citrix Gateway, the record is removed from the DNS cache.
    .PARAMETER Forcedtimeout
        Force a disconnection from the Citrix Gateway Plug-in with Citrix Gateway after a specified number of minutes. If the session closes, the user must log on again.
    .PARAMETER Forcedtimeoutwarning
        Number of minutes to warn a user before the user session is disconnected.
    .PARAMETER Defaultauthorizationaction
        Specify the network resources that users have access to when they log on to the internal network. The default setting for authorization is to deny access to all network resources. Citrix recommends using the default global setting and then creating authorization policies to define the network resources users can access. If you set the default authorization policy to DENY, you must explicitly authorize access to any network resource, which improves security.
        Possible values = ALLOW, DENY
    .PARAMETER Ntdomain
        Single sign-on domain to use for single sign-on to applications in the internal network. This setting can be overwritten by the domain that users specify at the time of logon or by the domain that the authentication server returns.
    .PARAMETER Clientlessvpnmode
        Enable clientless access for web, XenApp or XenDesktop, and FileShare resources without installing the Citrix Gateway Plug-in. Available settings function as follows:
        * ON - Allow only clientless access.
        * OFF - Allow clientless access after users log on with the Citrix Gateway Plug-in.
        * DISABLED - Do not allow clientless access.
        Possible values = ON, OFF, DISABLED
    .PARAMETER Emailhome
        Web address for the web-based email, such as Outlook Web Access.
    .PARAMETER Clientlessmodeurlencoding
        When clientless access is enabled, you can choose to encode the addresses of internal web applications or to leave the address as clear text. Available settings function as follows:
        * OPAQUE - Use standard encoding mechanisms to make the domain and protocol part of the resource unclear to users.
        * TRANSPARENT - Do not encode the web address and make it visible to users.
        * ENCRYPT - Allow the domain and protocol to be encrypted using a session key. When the web address is encrypted, the URL is different for each user session for the same web resource. If users bookmark the encoded web address, save it in the web browser and then log off, they cannot connect to the web address when they log on and use the bookmark. If users save the encrypted bookmark in the Access Interface during their session, the bookmark works each time the user logs on.
        Possible values = TRANSPARENT, OPAQUE, ENCRYPT
    .PARAMETER Clientlesspersistentcookie
        State of persistent cookies in clientless access mode. Persistent cookies are required for accessing certain features of SharePoint, such as opening and editing Microsoft Word, Excel, and PowerPoint documents hosted on the SharePoint server. A persistent cookie remains on the user device and is sent with each HTTP request. Citrix Gateway encrypts the persistent cookie before sending it to the plug-in on the user device, and refreshes the cookie periodically as long as the session exists. The cookie becomes stale if the session ends. Available settings function as follows:
        * ALLOW - Enable persistent cookies. Users can open and edit Microsoft documents stored in SharePoint.
        * DENY - Disable persistent cookies. Users cannot open and edit Microsoft documents stored in SharePoint.
        * PROMPT - Prompt users to allow or deny persistent cookies during the session. Persistent cookies are not required for clientless access if users do not connect to SharePoint.
        Possible values = ALLOW, DENY, PROMPT
    .PARAMETER Allowedlogingroups
        Specify groups that have permission to log on to Citrix Gateway. Users who do not belong to this group or groups are denied access even if they have valid credentials.
    .PARAMETER Apptokentimeout
        The timeout value in seconds for tokens to access XenMobile applications.
    .PARAMETER Mdxtokentimeout
        Validity of MDX Token in minutes. This token is used for mdx services to access backend and valid HEAD and GET request.
    .PARAMETER Storefronturl
        Web address for StoreFront to be used in this session for enumeration of resources from XenApp or XenDesktop.
    .PARAMETER Uitheme
        Set VPN UI Theme to Green-Bubble, Caxton or Custom; default is Caxton.
        Possible values = DEFAULT, GREENBUBBLE, CUSTOM
    .PARAMETER Kcdaccount
        The KCD account details to be used in SSO.
    .PARAMETER Rdpclientprofilename
        Name of the RDP profile associated with the vserver.
    .PARAMETER Windowspluginupgrade
        Option to set plugin upgrade behaviour for Win.
        Possible values = Always, Essential, Never
    .PARAMETER Macpluginupgrade
        Option to set plugin upgrade behaviour for Mac.
        Possible values = Always, Essential, Never
    .PARAMETER Linuxpluginupgrade
        Option to set plugin upgrade behaviour for Linux.
        Possible values = Always, Essential, Never
    .PARAMETER Iconwithreceiver
        Option to decide whether to show plugin icon along with receiver icon.
        Possible values = ON, OFF
    .PARAMETER Userdomains
        List of user domains specified as comma seperated value.
    .PARAMETER Alwaysonprofilename
        Name of the AlwaysON profile. The builtin profile named none can be used to explicitly disable AlwaysON.
    .PARAMETER Autoproxyurl
        URL to auto proxy config file.
    .PARAMETER Pcoipprofilename
        Name of the PCOIP profile.
    .PARAMETER Advancedclientlessvpnmode
        Option to enable/disable Advanced ClientlessVpnMode. Additionaly, it can be set to STRICT to block Classic ClientlessVpnMode while in AdvancedClientlessMode.
        Possible values = ENABLED, DISABLED, STRICT
    .PARAMETER Fqdnspoofedip
        Spoofed IP address range that can be used by client for FQDN based split tunneling.
    .PARAMETER Splittunnel
        Send, through the tunnel, traffic only for intranet applications that are defined in Citrix Gateway. Route all other traffic directly to the Internet. The OFF setting routes all traffic through Citrix Gateway. With the REVERSE setting, intranet applications define the network traffic that is not intercepted. All network traffic directed to internal IP addresses bypasses the VPN tunnel, while other traffic goes through Citrix Gateway. Reverse split tunneling can be used to log all non-local LAN traffic. For example, if users have a home network and are logged on through the Citrix Gateway Plug-in, network traffic destined to a printer or another device within the home network is not intercepted.
        Possible values = ON, OFF, REVERSE
    .PARAMETER Locallanaccess
        Set local LAN access. If split tunneling is OFF, and you set local LAN access to ON, the local client can route traffic to its local interface. When the local area network switch is specified, this combination of switches is useful. The client can allow local LAN access to devices that commonly have non-routable addresses, such as local printers or local file servers.
        Possible values = ON, OFF
    .PARAMETER Rfc1918
        As defined in the local area network, allow only the following local area network addresses to bypass the VPN tunnel when the local LAN access feature is enabled:
        * 10.*.*.*,
        * 172.16.*.*,
        * 192.168.*.*.
        Possible values = ON, OFF
    .PARAMETER Spoofiip
        Indicate whether or not the application requires IP spoofing, which routes the connection to the intranet application through the virtual adapter.
        Possible values = ON, OFF
    .PARAMETER Killconnections
        Specify whether the Citrix Gateway Plug-in should disconnect all preexisting connections, such as the connections existing before the user logged on to Citrix Gateway, and prevent new incoming connections on the Citrix Gateway Plug-in for Windows and MAC when the user is connected to Citrix Gateway and split tunneling is disabled.
        Possible values = ON, OFF
    .PARAMETER Transparentinterception
        Allow access to network resources by using a single IP address and subnet mask or a range of IP addresses. The OFF setting sets the mode to proxy, in which you configure destination and source IP addresses and port numbers. If you are using the Citrix Gateway Plug-in for Windows, set this parameter to ON, in which the mode is set to transparent. If you are using the Citrix Gateway Plug-in for Java, set this parameter to OFF.
        Possible values = ON, OFF
    .PARAMETER Windowsclienttype
        The Windows client type. Choose between two types of Windows Client\
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed\
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Proxylocalbypass
        Bypass proxy server for local addresses option in Internet Explorer and Firefox proxy server settings.
        Possible values = ENABLED, DISABLED
    .PARAMETER Clientcleanupprompt
        Prompt for client-side cache clean-up when a client-initiated session closes.
        Possible values = ON, OFF
    .PARAMETER Sso
        Set single sign-on (SSO) for the session. When the user accesses a server, the user's logon credentials are passed to the server for authentication.
        NOTE : This configuration does not honor the following authentication types for security reason. BASIC, DIGEST, and NTLM (without Negotiate NTLM2 Key or Negotiate Sign Flag). Use VPN TrafficAction to configure SSO for these authentication types.
        Possible values = ON, OFF
    .PARAMETER Ssocredential
        Specify whether to use the primary or secondary authentication credentials for single sign-on to the server.
        Possible values = PRIMARY, SECONDARY
    .PARAMETER Windowsautologon
        Enable or disable the Windows Auto Logon for the session. If a VPN session is established after this setting is enabled, the user is automatically logged on by using Windows credentials after the system is restarted.
        Possible values = ON, OFF
    .PARAMETER Usemip
        Enable or disable the use of a unique IP address alias, or a mapped IP address, as the client IP address for each client session. Allow Citrix Gateway to use the mapped IP address as an intranet IP address when all other IP addresses are not available.
        When IP pooling is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        Possible values = NS, OFF
    .PARAMETER Useiip
        Define IP address pool options. Available settings function as follows:
        * SPILLOVER - When an address pool is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        * NOSPILLOVER - When intranet IP addresses are enabled and the mapped IP address is not used, the Transfer Login page appears for users who have used all available intranet IP addresses.
        * OFF - Address pool is not configured.
        Possible values = NOSPILLOVER, SPILLOVER, OFF
    .PARAMETER Clientdebug
        Set the trace level on Citrix Gateway. Technical support technicians use these debug logs for in-depth debugging and troubleshooting purposes. Available settings function as follows:
        * DEBUG - Detailed debug messages are collected and written into the specified file.
        * STATS - Application audit level error messages and debug statistic counters are written into the specified file.
        * EVENTS - Application audit-level error messages are written into the specified file.
        * OFF - Only critical events are logged into the Windows Application Log.
        Possible values = debug, stats, events, OFF
    .PARAMETER Icaproxy
        Enable ICA proxy to configure secure Internet access to servers running Citrix XenApp or XenDesktop by using Citrix Receiver instead of the Citrix Gateway Plug-in.
        Possible values = ON, OFF
    .PARAMETER Clientchoices
        Provide users with multiple logon options. With client choices, users have the option of logging on by using the Citrix Gateway Plug-in for Windows, Citrix Gateway Plug-in for Java, the Web Interface, or clientless access from one location. Depending on how Citrix Gateway is configured, users are presented with up to three icons for logon choices. The most common are the Citrix Gateway Plug-in for Windows, Web Interface, and clientless access.
        Possible values = ON, OFF
    .PARAMETER Epaclienttype
        Choose between two types of End point Windows Client
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Encryptcsecexp
        Enable encryption of client security expressions.
        Possible values = ENABLED, DISABLED
    .PARAMETER Securebrowse
        Allow users to connect through Citrix Gateway to network resources from iOS and Android mobile devices with Citrix Receiver. Users do not need to establish a full VPN tunnel to access resources in the secure network.
        Possible values = ENABLED, DISABLED
    .PARAMETER Clientversions
        checkversion api.
    .PARAMETER Icasessiontimeout
        Enable or disable ica session timeout. If enabled and in case AAA session gets terminated, ICA connections associated with that will also get terminated.
        Possible values = ON, OFF
    .PARAMETER Backendserversni
        enables sni extension for backend server handshakes.
        Possible values = ENABLED, DISABLED
    .PARAMETER Backendcertvalidation
        enables backend server certificate validation.
        Possible values = ENABLED, DISABLED
    .PARAMETER Netmask
        The netmask for the spoofed ip address.
    .PARAMETER Samesite
        SameSite attribute value for Cookies generated in VPN context. This attribute value will be appended only for the cookies which are specified in the builtin patset ns_cookies_samesite.
        Possible values = None, LAX, STRICT
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnparameter
        An example how to unset vpnparameter configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnparameter
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnparameter
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Boolean]$httpport,

        [Boolean]$winsip,

        [Boolean]$dnsvservername,

        [Boolean]$splitdns,

        [Boolean]$icauseraccounting,

        [Boolean]$sesstimeout,

        [Boolean]$clientsecurity,

        [Boolean]$clientsecuritygroup,

        [Boolean]$smartgroup,

        [Boolean]$clientsecuritymessage,

        [Boolean]$clientsecuritylog,

        [Boolean]$authorizationgroup,

        [Boolean]$clientidletimeout,

        [Boolean]$allprotocolproxy,

        [Boolean]$httpproxy,

        [Boolean]$ftpproxy,

        [Boolean]$socksproxy,

        [Boolean]$gopherproxy,

        [Boolean]$sslproxy,

        [Boolean]$proxyexception,

        [Boolean]$forcecleanup,

        [Boolean]$clientoptions,

        [Boolean]$clientconfiguration,

        [Boolean]$loginscript,

        [Boolean]$logoutscript,

        [Boolean]$homepage,

        [Boolean]$proxy,

        [Boolean]$wihome,

        [Boolean]$citrixreceiverhome,

        [Boolean]$wiportalmode,

        [Boolean]$iipdnssuffix,

        [Boolean]$forcedtimeout,

        [Boolean]$forcedtimeoutwarning,

        [Boolean]$defaultauthorizationaction,

        [Boolean]$ntdomain,

        [Boolean]$clientlessvpnmode,

        [Boolean]$emailhome,

        [Boolean]$clientlessmodeurlencoding,

        [Boolean]$clientlesspersistentcookie,

        [Boolean]$allowedlogingroups,

        [Boolean]$apptokentimeout,

        [Boolean]$mdxtokentimeout,

        [Boolean]$storefronturl,

        [Boolean]$uitheme,

        [Boolean]$kcdaccount,

        [Boolean]$rdpclientprofilename,

        [Boolean]$windowspluginupgrade,

        [Boolean]$macpluginupgrade,

        [Boolean]$linuxpluginupgrade,

        [Boolean]$iconwithreceiver,

        [Boolean]$userdomains,

        [Boolean]$alwaysonprofilename,

        [Boolean]$autoproxyurl,

        [Boolean]$pcoipprofilename,

        [Boolean]$advancedclientlessvpnmode,

        [Boolean]$fqdnspoofedip,

        [Boolean]$splittunnel,

        [Boolean]$locallanaccess,

        [Boolean]$rfc1918,

        [Boolean]$spoofiip,

        [Boolean]$killconnections,

        [Boolean]$transparentinterception,

        [Boolean]$windowsclienttype,

        [Boolean]$proxylocalbypass,

        [Boolean]$clientcleanupprompt,

        [Boolean]$sso,

        [Boolean]$ssocredential,

        [Boolean]$windowsautologon,

        [Boolean]$usemip,

        [Boolean]$useiip,

        [Boolean]$clientdebug,

        [Boolean]$icaproxy,

        [Boolean]$clientchoices,

        [Boolean]$epaclienttype,

        [Boolean]$encryptcsecexp,

        [Boolean]$securebrowse,

        [Boolean]$clientversions,

        [Boolean]$icasessiontimeout,

        [Boolean]$backendserversni,

        [Boolean]$backendcertvalidation,

        [Boolean]$netmask,

        [Boolean]$samesite 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnparameter: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('httpport') ) { $payload.Add('httpport', $httpport) }
            if ( $PSBoundParameters.ContainsKey('winsip') ) { $payload.Add('winsip', $winsip) }
            if ( $PSBoundParameters.ContainsKey('dnsvservername') ) { $payload.Add('dnsvservername', $dnsvservername) }
            if ( $PSBoundParameters.ContainsKey('splitdns') ) { $payload.Add('splitdns', $splitdns) }
            if ( $PSBoundParameters.ContainsKey('icauseraccounting') ) { $payload.Add('icauseraccounting', $icauseraccounting) }
            if ( $PSBoundParameters.ContainsKey('sesstimeout') ) { $payload.Add('sesstimeout', $sesstimeout) }
            if ( $PSBoundParameters.ContainsKey('clientsecurity') ) { $payload.Add('clientsecurity', $clientsecurity) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritygroup') ) { $payload.Add('clientsecuritygroup', $clientsecuritygroup) }
            if ( $PSBoundParameters.ContainsKey('smartgroup') ) { $payload.Add('smartgroup', $smartgroup) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritymessage') ) { $payload.Add('clientsecuritymessage', $clientsecuritymessage) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritylog') ) { $payload.Add('clientsecuritylog', $clientsecuritylog) }
            if ( $PSBoundParameters.ContainsKey('authorizationgroup') ) { $payload.Add('authorizationgroup', $authorizationgroup) }
            if ( $PSBoundParameters.ContainsKey('clientidletimeout') ) { $payload.Add('clientidletimeout', $clientidletimeout) }
            if ( $PSBoundParameters.ContainsKey('allprotocolproxy') ) { $payload.Add('allprotocolproxy', $allprotocolproxy) }
            if ( $PSBoundParameters.ContainsKey('httpproxy') ) { $payload.Add('httpproxy', $httpproxy) }
            if ( $PSBoundParameters.ContainsKey('ftpproxy') ) { $payload.Add('ftpproxy', $ftpproxy) }
            if ( $PSBoundParameters.ContainsKey('socksproxy') ) { $payload.Add('socksproxy', $socksproxy) }
            if ( $PSBoundParameters.ContainsKey('gopherproxy') ) { $payload.Add('gopherproxy', $gopherproxy) }
            if ( $PSBoundParameters.ContainsKey('sslproxy') ) { $payload.Add('sslproxy', $sslproxy) }
            if ( $PSBoundParameters.ContainsKey('proxyexception') ) { $payload.Add('proxyexception', $proxyexception) }
            if ( $PSBoundParameters.ContainsKey('forcecleanup') ) { $payload.Add('forcecleanup', $forcecleanup) }
            if ( $PSBoundParameters.ContainsKey('clientoptions') ) { $payload.Add('clientoptions', $clientoptions) }
            if ( $PSBoundParameters.ContainsKey('clientconfiguration') ) { $payload.Add('clientconfiguration', $clientconfiguration) }
            if ( $PSBoundParameters.ContainsKey('loginscript') ) { $payload.Add('loginscript', $loginscript) }
            if ( $PSBoundParameters.ContainsKey('logoutscript') ) { $payload.Add('logoutscript', $logoutscript) }
            if ( $PSBoundParameters.ContainsKey('homepage') ) { $payload.Add('homepage', $homepage) }
            if ( $PSBoundParameters.ContainsKey('proxy') ) { $payload.Add('proxy', $proxy) }
            if ( $PSBoundParameters.ContainsKey('wihome') ) { $payload.Add('wihome', $wihome) }
            if ( $PSBoundParameters.ContainsKey('citrixreceiverhome') ) { $payload.Add('citrixreceiverhome', $citrixreceiverhome) }
            if ( $PSBoundParameters.ContainsKey('wiportalmode') ) { $payload.Add('wiportalmode', $wiportalmode) }
            if ( $PSBoundParameters.ContainsKey('iipdnssuffix') ) { $payload.Add('iipdnssuffix', $iipdnssuffix) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeout') ) { $payload.Add('forcedtimeout', $forcedtimeout) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeoutwarning') ) { $payload.Add('forcedtimeoutwarning', $forcedtimeoutwarning) }
            if ( $PSBoundParameters.ContainsKey('defaultauthorizationaction') ) { $payload.Add('defaultauthorizationaction', $defaultauthorizationaction) }
            if ( $PSBoundParameters.ContainsKey('ntdomain') ) { $payload.Add('ntdomain', $ntdomain) }
            if ( $PSBoundParameters.ContainsKey('clientlessvpnmode') ) { $payload.Add('clientlessvpnmode', $clientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('emailhome') ) { $payload.Add('emailhome', $emailhome) }
            if ( $PSBoundParameters.ContainsKey('clientlessmodeurlencoding') ) { $payload.Add('clientlessmodeurlencoding', $clientlessmodeurlencoding) }
            if ( $PSBoundParameters.ContainsKey('clientlesspersistentcookie') ) { $payload.Add('clientlesspersistentcookie', $clientlesspersistentcookie) }
            if ( $PSBoundParameters.ContainsKey('allowedlogingroups') ) { $payload.Add('allowedlogingroups', $allowedlogingroups) }
            if ( $PSBoundParameters.ContainsKey('apptokentimeout') ) { $payload.Add('apptokentimeout', $apptokentimeout) }
            if ( $PSBoundParameters.ContainsKey('mdxtokentimeout') ) { $payload.Add('mdxtokentimeout', $mdxtokentimeout) }
            if ( $PSBoundParameters.ContainsKey('storefronturl') ) { $payload.Add('storefronturl', $storefronturl) }
            if ( $PSBoundParameters.ContainsKey('uitheme') ) { $payload.Add('uitheme', $uitheme) }
            if ( $PSBoundParameters.ContainsKey('kcdaccount') ) { $payload.Add('kcdaccount', $kcdaccount) }
            if ( $PSBoundParameters.ContainsKey('rdpclientprofilename') ) { $payload.Add('rdpclientprofilename', $rdpclientprofilename) }
            if ( $PSBoundParameters.ContainsKey('windowspluginupgrade') ) { $payload.Add('windowspluginupgrade', $windowspluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('macpluginupgrade') ) { $payload.Add('macpluginupgrade', $macpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('linuxpluginupgrade') ) { $payload.Add('linuxpluginupgrade', $linuxpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('iconwithreceiver') ) { $payload.Add('iconwithreceiver', $iconwithreceiver) }
            if ( $PSBoundParameters.ContainsKey('userdomains') ) { $payload.Add('userdomains', $userdomains) }
            if ( $PSBoundParameters.ContainsKey('alwaysonprofilename') ) { $payload.Add('alwaysonprofilename', $alwaysonprofilename) }
            if ( $PSBoundParameters.ContainsKey('autoproxyurl') ) { $payload.Add('autoproxyurl', $autoproxyurl) }
            if ( $PSBoundParameters.ContainsKey('pcoipprofilename') ) { $payload.Add('pcoipprofilename', $pcoipprofilename) }
            if ( $PSBoundParameters.ContainsKey('advancedclientlessvpnmode') ) { $payload.Add('advancedclientlessvpnmode', $advancedclientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('fqdnspoofedip') ) { $payload.Add('fqdnspoofedip', $fqdnspoofedip) }
            if ( $PSBoundParameters.ContainsKey('splittunnel') ) { $payload.Add('splittunnel', $splittunnel) }
            if ( $PSBoundParameters.ContainsKey('locallanaccess') ) { $payload.Add('locallanaccess', $locallanaccess) }
            if ( $PSBoundParameters.ContainsKey('rfc1918') ) { $payload.Add('rfc1918', $rfc1918) }
            if ( $PSBoundParameters.ContainsKey('spoofiip') ) { $payload.Add('spoofiip', $spoofiip) }
            if ( $PSBoundParameters.ContainsKey('killconnections') ) { $payload.Add('killconnections', $killconnections) }
            if ( $PSBoundParameters.ContainsKey('transparentinterception') ) { $payload.Add('transparentinterception', $transparentinterception) }
            if ( $PSBoundParameters.ContainsKey('windowsclienttype') ) { $payload.Add('windowsclienttype', $windowsclienttype) }
            if ( $PSBoundParameters.ContainsKey('proxylocalbypass') ) { $payload.Add('proxylocalbypass', $proxylocalbypass) }
            if ( $PSBoundParameters.ContainsKey('clientcleanupprompt') ) { $payload.Add('clientcleanupprompt', $clientcleanupprompt) }
            if ( $PSBoundParameters.ContainsKey('sso') ) { $payload.Add('sso', $sso) }
            if ( $PSBoundParameters.ContainsKey('ssocredential') ) { $payload.Add('ssocredential', $ssocredential) }
            if ( $PSBoundParameters.ContainsKey('windowsautologon') ) { $payload.Add('windowsautologon', $windowsautologon) }
            if ( $PSBoundParameters.ContainsKey('usemip') ) { $payload.Add('usemip', $usemip) }
            if ( $PSBoundParameters.ContainsKey('useiip') ) { $payload.Add('useiip', $useiip) }
            if ( $PSBoundParameters.ContainsKey('clientdebug') ) { $payload.Add('clientdebug', $clientdebug) }
            if ( $PSBoundParameters.ContainsKey('icaproxy') ) { $payload.Add('icaproxy', $icaproxy) }
            if ( $PSBoundParameters.ContainsKey('clientchoices') ) { $payload.Add('clientchoices', $clientchoices) }
            if ( $PSBoundParameters.ContainsKey('epaclienttype') ) { $payload.Add('epaclienttype', $epaclienttype) }
            if ( $PSBoundParameters.ContainsKey('encryptcsecexp') ) { $payload.Add('encryptcsecexp', $encryptcsecexp) }
            if ( $PSBoundParameters.ContainsKey('securebrowse') ) { $payload.Add('securebrowse', $securebrowse) }
            if ( $PSBoundParameters.ContainsKey('clientversions') ) { $payload.Add('clientversions', $clientversions) }
            if ( $PSBoundParameters.ContainsKey('icasessiontimeout') ) { $payload.Add('icasessiontimeout', $icasessiontimeout) }
            if ( $PSBoundParameters.ContainsKey('backendserversni') ) { $payload.Add('backendserversni', $backendserversni) }
            if ( $PSBoundParameters.ContainsKey('backendcertvalidation') ) { $payload.Add('backendcertvalidation', $backendcertvalidation) }
            if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) }
            if ( $PSBoundParameters.ContainsKey('samesite') ) { $payload.Add('samesite', $samesite) }
            if ( $PSCmdlet.ShouldProcess("vpnparameter", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnparameter -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-ADCUnsetVpnparameter: Finished"
    }
}

function Invoke-ADCGetVpnparameter {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN parameter resource.
    .PARAMETER GetAll
        Retrieve all vpnparameter object(s).
    .PARAMETER Count
        If specified, the count of the vpnparameter 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-ADCGetVpnparameter
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnparameter -GetAll
        Get all vpnparameter data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnparameter -name <string>
        Get vpnparameter object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnparameter -Filter @{ 'name'='<value>' }
        Get vpnparameter data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnparameter
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnparameter/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnparameter: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnparameter objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnparameter -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 vpnparameter objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnparameter -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnparameter objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnparameter -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnparameter configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnparameter configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnparameter -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-ADCGetVpnparameter: Ended"
    }
}

function Invoke-ADCKillVpnpcoipconnection {
    <#
    .SYNOPSIS
        Kill SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP connection resource.
    .PARAMETER Username
        User name for the PCOIP connections.
    .PARAMETER All
        All active pcoip connections.
    .EXAMPLE
        PS C:\>Invoke-ADCKillVpnpcoipconnection
        An example how to kill vpnpcoipconnection configuration Object(s).
    .NOTES
        File Name : Invoke-ADCKillVpnpcoipconnection
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipconnection/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Username,

        [boolean]$All 

    )
    begin {
        Write-Verbose "Invoke-ADCKillVpnpcoipconnection: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('username') ) { $payload.Add('username', $username) }
            if ( $PSBoundParameters.ContainsKey('all') ) { $payload.Add('all', $all) }
            if ( $PSCmdlet.ShouldProcess($Name, "Kill SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnpcoipconnection -Action kill -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-ADCKillVpnpcoipconnection: Finished"
    }
}

function Invoke-ADCGetVpnpcoipconnection {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for PCoIP connection resource.
    .PARAMETER Username
        User name for the PCOIP connections.
    .PARAMETER Nodeid
        Unique number that identifies the cluster node.
    .PARAMETER GetAll
        Retrieve all vpnpcoipconnection object(s).
    .PARAMETER Count
        If specified, the count of the vpnpcoipconnection 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-ADCGetVpnpcoipconnection
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipconnection -GetAll
        Get all vpnpcoipconnection data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipconnection -Count
        Get the number of vpnpcoipconnection objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipconnection -name <string>
        Get vpnpcoipconnection object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipconnection -Filter @{ 'name'='<value>' }
        Get vpnpcoipconnection data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnpcoipconnection
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipconnection/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Username,

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateRange(0, 31)]
        [double]$Nodeid,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnpcoipconnection: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnpcoipconnection objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipconnection -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 vpnpcoipconnection objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipconnection -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnpcoipconnection objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('username') ) { $arguments.Add('username', $username) } 
                if ( $PSBoundParameters.ContainsKey('nodeid') ) { $arguments.Add('nodeid', $nodeid) }
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipconnection -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnpcoipconnection configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnpcoipconnection configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipconnection -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-ADCGetVpnpcoipconnection: Ended"
    }
}

function Invoke-ADCAddVpnpcoipprofile {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP session profile resource.
    .PARAMETER Name
        name of PCoIP profile.
    .PARAMETER Conserverurl
        Connection server URL.
    .PARAMETER Icvverification
        ICV verification for PCOIP transport packets.
        Possible values = ENABLED, DISABLED
    .PARAMETER Sessionidletimeout
        PCOIP Idle Session timeout.
    .PARAMETER PassThru
        Return details about the created vpnpcoipprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnpcoipprofile -name <string> -conserverurl <string>
        An example how to add vpnpcoipprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnpcoipprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [string]$Conserverurl,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Icvverification = 'DISABLED',

        [ValidateRange(30, 240)]
        [double]$Sessionidletimeout = '180',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnpcoipprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                conserverurl   = $conserverurl
            }
            if ( $PSBoundParameters.ContainsKey('icvverification') ) { $payload.Add('icvverification', $icvverification) }
            if ( $PSBoundParameters.ContainsKey('sessionidletimeout') ) { $payload.Add('sessionidletimeout', $sessionidletimeout) }
            if ( $PSCmdlet.ShouldProcess("vpnpcoipprofile", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnpcoipprofile -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-ADCGetVpnpcoipprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnpcoipprofile: Finished"
    }
}

function Invoke-ADCDeleteVpnpcoipprofile {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP session profile resource.
    .PARAMETER Name
        name of PCoIP profile.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnpcoipprofile -Name <string>
        An example how to delete vpnpcoipprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnpcoipprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnpcoipprofile: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnpcoipprofile -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-ADCDeleteVpnpcoipprofile: Finished"
    }
}

function Invoke-ADCUpdateVpnpcoipprofile {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP session profile resource.
    .PARAMETER Name
        name of PCoIP profile.
    .PARAMETER Conserverurl
        Connection server URL.
    .PARAMETER Icvverification
        ICV verification for PCOIP transport packets.
        Possible values = ENABLED, DISABLED
    .PARAMETER Sessionidletimeout
        PCOIP Idle Session timeout.
    .PARAMETER PassThru
        Return details about the created vpnpcoipprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnpcoipprofile -name <string>
        An example how to update vpnpcoipprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnpcoipprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Conserverurl,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Icvverification,

        [ValidateRange(30, 240)]
        [double]$Sessionidletimeout,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnpcoipprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('conserverurl') ) { $payload.Add('conserverurl', $conserverurl) }
            if ( $PSBoundParameters.ContainsKey('icvverification') ) { $payload.Add('icvverification', $icvverification) }
            if ( $PSBoundParameters.ContainsKey('sessionidletimeout') ) { $payload.Add('sessionidletimeout', $sessionidletimeout) }
            if ( $PSCmdlet.ShouldProcess("vpnpcoipprofile", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnpcoipprofile -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-ADCGetVpnpcoipprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnpcoipprofile: Finished"
    }
}

function Invoke-ADCUnsetVpnpcoipprofile {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP session profile resource.
    .PARAMETER Name
        name of PCoIP profile.
    .PARAMETER Icvverification
        ICV verification for PCOIP transport packets.
        Possible values = ENABLED, DISABLED
    .PARAMETER Sessionidletimeout
        PCOIP Idle Session timeout.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnpcoipprofile -name <string>
        An example how to unset vpnpcoipprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnpcoipprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipprofile
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$icvverification,

        [Boolean]$sessionidletimeout 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnpcoipprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('icvverification') ) { $payload.Add('icvverification', $icvverification) }
            if ( $PSBoundParameters.ContainsKey('sessionidletimeout') ) { $payload.Add('sessionidletimeout', $sessionidletimeout) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnpcoipprofile -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-ADCUnsetVpnpcoipprofile: Finished"
    }
}

function Invoke-ADCGetVpnpcoipprofile {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for PCoIP session profile resource.
    .PARAMETER Name
        name of PCoIP profile.
    .PARAMETER GetAll
        Retrieve all vpnpcoipprofile object(s).
    .PARAMETER Count
        If specified, the count of the vpnpcoipprofile 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-ADCGetVpnpcoipprofile
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipprofile -GetAll
        Get all vpnpcoipprofile data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipprofile -Count
        Get the number of vpnpcoipprofile objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipprofile -name <string>
        Get vpnpcoipprofile object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipprofile -Filter @{ 'name'='<value>' }
        Get vpnpcoipprofile data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnpcoipprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnpcoipprofile: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnpcoipprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipprofile -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 vpnpcoipprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnpcoipprofile objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipprofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnpcoipprofile configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipprofile -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnpcoipprofile configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipprofile -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-ADCGetVpnpcoipprofile: Ended"
    }
}

function Invoke-ADCAddVpnpcoipvserverprofile {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP vserver profile resource.
    .PARAMETER Name
        name of PCoIP vserver profile.
    .PARAMETER Logindomain
        Login domain for PCoIP users.
    .PARAMETER Udpport
        UDP port for PCoIP data traffic.
        * in CLI is represented as 65535 in NITRO API
    .PARAMETER PassThru
        Return details about the created vpnpcoipvserverprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnpcoipvserverprofile -name <string> -logindomain <string>
        An example how to add vpnpcoipvserverprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnpcoipvserverprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipvserverprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [string]$Logindomain,

        [ValidateRange(1, 65535)]
        [int]$Udpport = '4172',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnpcoipvserverprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                logindomain    = $logindomain
            }
            if ( $PSBoundParameters.ContainsKey('udpport') ) { $payload.Add('udpport', $udpport) }
            if ( $PSCmdlet.ShouldProcess("vpnpcoipvserverprofile", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnpcoipvserverprofile -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-ADCGetVpnpcoipvserverprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnpcoipvserverprofile: Finished"
    }
}

function Invoke-ADCDeleteVpnpcoipvserverprofile {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP vserver profile resource.
    .PARAMETER Name
        name of PCoIP vserver profile.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnpcoipvserverprofile -Name <string>
        An example how to delete vpnpcoipvserverprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnpcoipvserverprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipvserverprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnpcoipvserverprofile: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnpcoipvserverprofile -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-ADCDeleteVpnpcoipvserverprofile: Finished"
    }
}

function Invoke-ADCUpdateVpnpcoipvserverprofile {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP vserver profile resource.
    .PARAMETER Name
        name of PCoIP vserver profile.
    .PARAMETER Udpport
        UDP port for PCoIP data traffic.
        * in CLI is represented as 65535 in NITRO API
    .PARAMETER Logindomain
        Login domain for PCoIP users.
    .PARAMETER PassThru
        Return details about the created vpnpcoipvserverprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnpcoipvserverprofile -name <string>
        An example how to update vpnpcoipvserverprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnpcoipvserverprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipvserverprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateRange(1, 65535)]
        [int]$Udpport,

        [string]$Logindomain,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnpcoipvserverprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('udpport') ) { $payload.Add('udpport', $udpport) }
            if ( $PSBoundParameters.ContainsKey('logindomain') ) { $payload.Add('logindomain', $logindomain) }
            if ( $PSCmdlet.ShouldProcess("vpnpcoipvserverprofile", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnpcoipvserverprofile -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-ADCGetVpnpcoipvserverprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnpcoipvserverprofile: Finished"
    }
}

function Invoke-ADCUnsetVpnpcoipvserverprofile {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for PCoIP vserver profile resource.
    .PARAMETER Name
        name of PCoIP vserver profile.
    .PARAMETER Udpport
        UDP port for PCoIP data traffic.
        * in CLI is represented as 65535 in NITRO API
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnpcoipvserverprofile -name <string>
        An example how to unset vpnpcoipvserverprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnpcoipvserverprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipvserverprofile
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$udpport 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnpcoipvserverprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('udpport') ) { $payload.Add('udpport', $udpport) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnpcoipvserverprofile -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-ADCUnsetVpnpcoipvserverprofile: Finished"
    }
}

function Invoke-ADCGetVpnpcoipvserverprofile {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for PCoIP vserver profile resource.
    .PARAMETER Name
        name of PCoIP vserver profile.
    .PARAMETER GetAll
        Retrieve all vpnpcoipvserverprofile object(s).
    .PARAMETER Count
        If specified, the count of the vpnpcoipvserverprofile 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-ADCGetVpnpcoipvserverprofile
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipvserverprofile -GetAll
        Get all vpnpcoipvserverprofile data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipvserverprofile -Count
        Get the number of vpnpcoipvserverprofile objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipvserverprofile -name <string>
        Get vpnpcoipvserverprofile object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnpcoipvserverprofile -Filter @{ 'name'='<value>' }
        Get vpnpcoipvserverprofile data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnpcoipvserverprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnpcoipvserverprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnpcoipvserverprofile: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnpcoipvserverprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipvserverprofile -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 vpnpcoipvserverprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipvserverprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnpcoipvserverprofile objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipvserverprofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnpcoipvserverprofile configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipvserverprofile -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnpcoipvserverprofile configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnpcoipvserverprofile -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-ADCGetVpnpcoipvserverprofile: Ended"
    }
}

function Invoke-ADCAddVpnportaltheme {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for portaltheme resource.
    .PARAMETER Name
        Name of the uitheme.
    .PARAMETER Basetheme
        .
        Possible values = Default, Greenbubble, X1, RfWebUI
    .PARAMETER PassThru
        Return details about the created vpnportaltheme item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnportaltheme -name <string> -basetheme <string>
        An example how to add vpnportaltheme configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnportaltheme
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnportaltheme/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidateSet('Default', 'Greenbubble', 'X1', 'RfWebUI')]
        [string]$Basetheme,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnportaltheme: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                basetheme      = $basetheme
            }

            if ( $PSCmdlet.ShouldProcess("vpnportaltheme", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnportaltheme -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-ADCGetVpnportaltheme -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnportaltheme: Finished"
    }
}

function Invoke-ADCDeleteVpnportaltheme {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for portaltheme resource.
    .PARAMETER Name
        Name of the uitheme.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnportaltheme -Name <string>
        An example how to delete vpnportaltheme configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnportaltheme
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnportaltheme/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnportaltheme: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnportaltheme -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-ADCDeleteVpnportaltheme: Finished"
    }
}

function Invoke-ADCGetVpnportaltheme {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for portaltheme resource.
    .PARAMETER Name
        Name of the uitheme.
    .PARAMETER GetAll
        Retrieve all vpnportaltheme object(s).
    .PARAMETER Count
        If specified, the count of the vpnportaltheme 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-ADCGetVpnportaltheme
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnportaltheme -GetAll
        Get all vpnportaltheme data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnportaltheme -Count
        Get the number of vpnportaltheme objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnportaltheme -name <string>
        Get vpnportaltheme object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnportaltheme -Filter @{ 'name'='<value>' }
        Get vpnportaltheme data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnportaltheme
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnportaltheme/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnportaltheme: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnportaltheme objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnportaltheme -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 vpnportaltheme objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnportaltheme -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnportaltheme objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnportaltheme -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnportaltheme configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnportaltheme -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnportaltheme configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnportaltheme -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-ADCGetVpnportaltheme: Ended"
    }
}

function Invoke-ADCAddVpnsamlssoprofile {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for SAML sso action resource.
    .PARAMETER Name
        Name for the new saml single sign-on profile. 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 an SSO action is created.
    .PARAMETER Samlsigningcertname
        Name of the signing authority as given in the SAML server's SSL certificate.
    .PARAMETER Assertionconsumerserviceurl
        URL to which the assertion is to be sent.
    .PARAMETER Relaystaterule
        Expression to extract relaystate to be sent along with assertion. Evaluation of this expression should return TEXT content. This is typically a target url to which user is redirected after the recipient validates SAML token.
    .PARAMETER Sendpassword
        Option to send password in assertion.
        Possible values = ON, OFF
    .PARAMETER Samlissuername
        The name to be used in requests sent from Citrix ADC to IdP to uniquely identify Citrix ADC.
    .PARAMETER Signaturealg
        Algorithm to be used to sign/verify SAML transactions.
        Possible values = RSA-SHA1, RSA-SHA256
    .PARAMETER Digestmethod
        Algorithm to be used to compute/verify digest for SAML transactions.
        Possible values = SHA1, SHA256
    .PARAMETER Audience
        Audience for which assertion sent by IdP is applicable. This is typically entity name or url that represents ServiceProvider.
    .PARAMETER Nameidformat
        Format of Name Identifier sent in Assertion.
        Possible values = Unspecified, emailAddress, X509SubjectName, WindowsDomainQualifiedName, kerberos, entity, persistent, transient
    .PARAMETER Nameidexpr
        Expression that will be evaluated to obtain NameIdentifier to be sent in assertion.
    .PARAMETER Attribute1
        Name of attribute1 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute1expr
        Expression that will be evaluated to obtain attribute1's value to be sent in Assertion.
    .PARAMETER Attribute1friendlyname
        User-Friendly Name of attribute1 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute1format
        Format of Attribute1 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute2
        Name of attribute2 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute2expr
        Expression that will be evaluated to obtain attribute2's value to be sent in Assertion.
    .PARAMETER Attribute2friendlyname
        User-Friendly Name of attribute2 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute2format
        Format of Attribute2 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute3
        Name of attribute3 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute3expr
        Expression that will be evaluated to obtain attribute3's value to be sent in Assertion.
    .PARAMETER Attribute3friendlyname
        User-Friendly Name of attribute3 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute3format
        Format of Attribute3 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute4
        Name of attribute4 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute4expr
        Expression that will be evaluated to obtain attribute4's value to be sent in Assertion.
    .PARAMETER Attribute4friendlyname
        User-Friendly Name of attribute4 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute4format
        Format of Attribute4 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute5
        Name of attribute5 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute5expr
        Expression that will be evaluated to obtain attribute5's value to be sent in Assertion.
    .PARAMETER Attribute5friendlyname
        User-Friendly Name of attribute5 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute5format
        Format of Attribute5 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute6
        Name of attribute6 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute6expr
        Expression that will be evaluated to obtain attribute6's value to be sent in Assertion.
    .PARAMETER Attribute6friendlyname
        User-Friendly Name of attribute6 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute6format
        Format of Attribute6 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute7
        Name of attribute7 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute7expr
        Expression that will be evaluated to obtain attribute7's value to be sent in Assertion.
    .PARAMETER Attribute7friendlyname
        User-Friendly Name of attribute7 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute7format
        Format of Attribute7 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute8
        Name of attribute8 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute8expr
        Expression that will be evaluated to obtain attribute8's value to be sent in Assertion.
    .PARAMETER Attribute8friendlyname
        User-Friendly Name of attribute8 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute8format
        Format of Attribute8 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute9
        Name of attribute9 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute9expr
        Expression that will be evaluated to obtain attribute9's value to be sent in Assertion.
    .PARAMETER Attribute9friendlyname
        User-Friendly Name of attribute9 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute9format
        Format of Attribute9 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute10
        Name of attribute10 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute10expr
        Expression that will be evaluated to obtain attribute10's value to be sent in Assertion.
    .PARAMETER Attribute10friendlyname
        User-Friendly Name of attribute10 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute10format
        Format of Attribute10 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute11
        Name of attribute11 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute11expr
        Expression that will be evaluated to obtain attribute11's value to be sent in Assertion.
    .PARAMETER Attribute11friendlyname
        User-Friendly Name of attribute11 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute11format
        Format of Attribute11 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute12
        Name of attribute12 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute12expr
        Expression that will be evaluated to obtain attribute12's value to be sent in Assertion.
    .PARAMETER Attribute12friendlyname
        User-Friendly Name of attribute12 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute12format
        Format of Attribute12 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute13
        Name of attribute13 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute13expr
        Expression that will be evaluated to obtain attribute13's value to be sent in Assertion.
    .PARAMETER Attribute13friendlyname
        User-Friendly Name of attribute13 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute13format
        Format of Attribute13 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute14
        Name of attribute14 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute14expr
        Expression that will be evaluated to obtain attribute14's value to be sent in Assertion.
    .PARAMETER Attribute14friendlyname
        User-Friendly Name of attribute14 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute14format
        Format of Attribute14 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute15
        Name of attribute15 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute15expr
        Expression that will be evaluated to obtain attribute15's value to be sent in Assertion.
    .PARAMETER Attribute15friendlyname
        User-Friendly Name of attribute15 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute15format
        Format of Attribute15 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute16
        Name of attribute16 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute16expr
        Expression that will be evaluated to obtain attribute16's value to be sent in Assertion.
    .PARAMETER Attribute16friendlyname
        User-Friendly Name of attribute16 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute16format
        Format of Attribute16 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Encryptassertion
        Option to encrypt assertion when Citrix ADC sends one.
        Possible values = ON, OFF
    .PARAMETER Samlspcertname
        Name of the SSL certificate of peer/receving party using which Assertion is encrypted.
    .PARAMETER Encryptionalgorithm
        Algorithm to be used to encrypt SAML assertion.
        Possible values = DES3, AES128, AES192, AES256
    .PARAMETER Skewtime
        This option specifies the number of minutes on either side of current time that the assertion would be valid. For example, if skewTime is 10, then assertion would be valid from (current time - 10) min to (current time + 10) min, ie 20min in all.
    .PARAMETER Signassertion
        Option to sign portions of assertion when Citrix ADC IDP sends one. Based on the user selection, either Assertion or Response or Both or none can be signed.
        Possible values = NONE, ASSERTION, RESPONSE, BOTH
    .PARAMETER Signatureservice
        Name of the service in cloud used to sign the data.
    .PARAMETER PassThru
        Return details about the created vpnsamlssoprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnsamlssoprofile -name <string> -assertionconsumerserviceurl <string>
        An example how to add vpnsamlssoprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnsamlssoprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsamlssoprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Samlsigningcertname,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Assertionconsumerserviceurl,

        [string]$Relaystaterule,

        [ValidateSet('ON', 'OFF')]
        [string]$Sendpassword = 'OFF',

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Samlissuername,

        [ValidateSet('RSA-SHA1', 'RSA-SHA256')]
        [string]$Signaturealg = 'RSA-SHA256',

        [ValidateSet('SHA1', 'SHA256')]
        [string]$Digestmethod = 'SHA256',

        [string]$Audience,

        [ValidateSet('Unspecified', 'emailAddress', 'X509SubjectName', 'WindowsDomainQualifiedName', 'kerberos', 'entity', 'persistent', 'transient')]
        [string]$Nameidformat = 'transient',

        [string]$Nameidexpr,

        [string]$Attribute1,

        [string]$Attribute1expr,

        [string]$Attribute1friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute1format,

        [string]$Attribute2,

        [string]$Attribute2expr,

        [string]$Attribute2friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute2format,

        [string]$Attribute3,

        [string]$Attribute3expr,

        [string]$Attribute3friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute3format,

        [string]$Attribute4,

        [string]$Attribute4expr,

        [string]$Attribute4friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute4format,

        [string]$Attribute5,

        [string]$Attribute5expr,

        [string]$Attribute5friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute5format,

        [string]$Attribute6,

        [string]$Attribute6expr,

        [string]$Attribute6friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute6format,

        [string]$Attribute7,

        [string]$Attribute7expr,

        [string]$Attribute7friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute7format,

        [string]$Attribute8,

        [string]$Attribute8expr,

        [string]$Attribute8friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute8format,

        [string]$Attribute9,

        [string]$Attribute9expr,

        [string]$Attribute9friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute9format,

        [string]$Attribute10,

        [string]$Attribute10expr,

        [string]$Attribute10friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute10format,

        [string]$Attribute11,

        [string]$Attribute11expr,

        [string]$Attribute11friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute11format,

        [string]$Attribute12,

        [string]$Attribute12expr,

        [string]$Attribute12friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute12format,

        [string]$Attribute13,

        [string]$Attribute13expr,

        [string]$Attribute13friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute13format,

        [string]$Attribute14,

        [string]$Attribute14expr,

        [string]$Attribute14friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute14format,

        [string]$Attribute15,

        [string]$Attribute15expr,

        [string]$Attribute15friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute15format,

        [string]$Attribute16,

        [string]$Attribute16expr,

        [string]$Attribute16friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute16format,

        [ValidateSet('ON', 'OFF')]
        [string]$Encryptassertion = 'OFF',

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Samlspcertname,

        [ValidateSet('DES3', 'AES128', 'AES192', 'AES256')]
        [string]$Encryptionalgorithm = 'AES256',

        [double]$Skewtime = '5',

        [ValidateSet('NONE', 'ASSERTION', 'RESPONSE', 'BOTH')]
        [string]$Signassertion = 'ASSERTION',

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Signatureservice,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnsamlssoprofile: Starting"
    }
    process {
        try {
            $payload = @{ name              = $name
                assertionconsumerserviceurl = $assertionconsumerserviceurl
            }
            if ( $PSBoundParameters.ContainsKey('samlsigningcertname') ) { $payload.Add('samlsigningcertname', $samlsigningcertname) }
            if ( $PSBoundParameters.ContainsKey('relaystaterule') ) { $payload.Add('relaystaterule', $relaystaterule) }
            if ( $PSBoundParameters.ContainsKey('sendpassword') ) { $payload.Add('sendpassword', $sendpassword) }
            if ( $PSBoundParameters.ContainsKey('samlissuername') ) { $payload.Add('samlissuername', $samlissuername) }
            if ( $PSBoundParameters.ContainsKey('signaturealg') ) { $payload.Add('signaturealg', $signaturealg) }
            if ( $PSBoundParameters.ContainsKey('digestmethod') ) { $payload.Add('digestmethod', $digestmethod) }
            if ( $PSBoundParameters.ContainsKey('audience') ) { $payload.Add('audience', $audience) }
            if ( $PSBoundParameters.ContainsKey('nameidformat') ) { $payload.Add('nameidformat', $nameidformat) }
            if ( $PSBoundParameters.ContainsKey('nameidexpr') ) { $payload.Add('nameidexpr', $nameidexpr) }
            if ( $PSBoundParameters.ContainsKey('attribute1') ) { $payload.Add('attribute1', $attribute1) }
            if ( $PSBoundParameters.ContainsKey('attribute1expr') ) { $payload.Add('attribute1expr', $attribute1expr) }
            if ( $PSBoundParameters.ContainsKey('attribute1friendlyname') ) { $payload.Add('attribute1friendlyname', $attribute1friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute1format') ) { $payload.Add('attribute1format', $attribute1format) }
            if ( $PSBoundParameters.ContainsKey('attribute2') ) { $payload.Add('attribute2', $attribute2) }
            if ( $PSBoundParameters.ContainsKey('attribute2expr') ) { $payload.Add('attribute2expr', $attribute2expr) }
            if ( $PSBoundParameters.ContainsKey('attribute2friendlyname') ) { $payload.Add('attribute2friendlyname', $attribute2friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute2format') ) { $payload.Add('attribute2format', $attribute2format) }
            if ( $PSBoundParameters.ContainsKey('attribute3') ) { $payload.Add('attribute3', $attribute3) }
            if ( $PSBoundParameters.ContainsKey('attribute3expr') ) { $payload.Add('attribute3expr', $attribute3expr) }
            if ( $PSBoundParameters.ContainsKey('attribute3friendlyname') ) { $payload.Add('attribute3friendlyname', $attribute3friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute3format') ) { $payload.Add('attribute3format', $attribute3format) }
            if ( $PSBoundParameters.ContainsKey('attribute4') ) { $payload.Add('attribute4', $attribute4) }
            if ( $PSBoundParameters.ContainsKey('attribute4expr') ) { $payload.Add('attribute4expr', $attribute4expr) }
            if ( $PSBoundParameters.ContainsKey('attribute4friendlyname') ) { $payload.Add('attribute4friendlyname', $attribute4friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute4format') ) { $payload.Add('attribute4format', $attribute4format) }
            if ( $PSBoundParameters.ContainsKey('attribute5') ) { $payload.Add('attribute5', $attribute5) }
            if ( $PSBoundParameters.ContainsKey('attribute5expr') ) { $payload.Add('attribute5expr', $attribute5expr) }
            if ( $PSBoundParameters.ContainsKey('attribute5friendlyname') ) { $payload.Add('attribute5friendlyname', $attribute5friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute5format') ) { $payload.Add('attribute5format', $attribute5format) }
            if ( $PSBoundParameters.ContainsKey('attribute6') ) { $payload.Add('attribute6', $attribute6) }
            if ( $PSBoundParameters.ContainsKey('attribute6expr') ) { $payload.Add('attribute6expr', $attribute6expr) }
            if ( $PSBoundParameters.ContainsKey('attribute6friendlyname') ) { $payload.Add('attribute6friendlyname', $attribute6friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute6format') ) { $payload.Add('attribute6format', $attribute6format) }
            if ( $PSBoundParameters.ContainsKey('attribute7') ) { $payload.Add('attribute7', $attribute7) }
            if ( $PSBoundParameters.ContainsKey('attribute7expr') ) { $payload.Add('attribute7expr', $attribute7expr) }
            if ( $PSBoundParameters.ContainsKey('attribute7friendlyname') ) { $payload.Add('attribute7friendlyname', $attribute7friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute7format') ) { $payload.Add('attribute7format', $attribute7format) }
            if ( $PSBoundParameters.ContainsKey('attribute8') ) { $payload.Add('attribute8', $attribute8) }
            if ( $PSBoundParameters.ContainsKey('attribute8expr') ) { $payload.Add('attribute8expr', $attribute8expr) }
            if ( $PSBoundParameters.ContainsKey('attribute8friendlyname') ) { $payload.Add('attribute8friendlyname', $attribute8friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute8format') ) { $payload.Add('attribute8format', $attribute8format) }
            if ( $PSBoundParameters.ContainsKey('attribute9') ) { $payload.Add('attribute9', $attribute9) }
            if ( $PSBoundParameters.ContainsKey('attribute9expr') ) { $payload.Add('attribute9expr', $attribute9expr) }
            if ( $PSBoundParameters.ContainsKey('attribute9friendlyname') ) { $payload.Add('attribute9friendlyname', $attribute9friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute9format') ) { $payload.Add('attribute9format', $attribute9format) }
            if ( $PSBoundParameters.ContainsKey('attribute10') ) { $payload.Add('attribute10', $attribute10) }
            if ( $PSBoundParameters.ContainsKey('attribute10expr') ) { $payload.Add('attribute10expr', $attribute10expr) }
            if ( $PSBoundParameters.ContainsKey('attribute10friendlyname') ) { $payload.Add('attribute10friendlyname', $attribute10friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute10format') ) { $payload.Add('attribute10format', $attribute10format) }
            if ( $PSBoundParameters.ContainsKey('attribute11') ) { $payload.Add('attribute11', $attribute11) }
            if ( $PSBoundParameters.ContainsKey('attribute11expr') ) { $payload.Add('attribute11expr', $attribute11expr) }
            if ( $PSBoundParameters.ContainsKey('attribute11friendlyname') ) { $payload.Add('attribute11friendlyname', $attribute11friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute11format') ) { $payload.Add('attribute11format', $attribute11format) }
            if ( $PSBoundParameters.ContainsKey('attribute12') ) { $payload.Add('attribute12', $attribute12) }
            if ( $PSBoundParameters.ContainsKey('attribute12expr') ) { $payload.Add('attribute12expr', $attribute12expr) }
            if ( $PSBoundParameters.ContainsKey('attribute12friendlyname') ) { $payload.Add('attribute12friendlyname', $attribute12friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute12format') ) { $payload.Add('attribute12format', $attribute12format) }
            if ( $PSBoundParameters.ContainsKey('attribute13') ) { $payload.Add('attribute13', $attribute13) }
            if ( $PSBoundParameters.ContainsKey('attribute13expr') ) { $payload.Add('attribute13expr', $attribute13expr) }
            if ( $PSBoundParameters.ContainsKey('attribute13friendlyname') ) { $payload.Add('attribute13friendlyname', $attribute13friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute13format') ) { $payload.Add('attribute13format', $attribute13format) }
            if ( $PSBoundParameters.ContainsKey('attribute14') ) { $payload.Add('attribute14', $attribute14) }
            if ( $PSBoundParameters.ContainsKey('attribute14expr') ) { $payload.Add('attribute14expr', $attribute14expr) }
            if ( $PSBoundParameters.ContainsKey('attribute14friendlyname') ) { $payload.Add('attribute14friendlyname', $attribute14friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute14format') ) { $payload.Add('attribute14format', $attribute14format) }
            if ( $PSBoundParameters.ContainsKey('attribute15') ) { $payload.Add('attribute15', $attribute15) }
            if ( $PSBoundParameters.ContainsKey('attribute15expr') ) { $payload.Add('attribute15expr', $attribute15expr) }
            if ( $PSBoundParameters.ContainsKey('attribute15friendlyname') ) { $payload.Add('attribute15friendlyname', $attribute15friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute15format') ) { $payload.Add('attribute15format', $attribute15format) }
            if ( $PSBoundParameters.ContainsKey('attribute16') ) { $payload.Add('attribute16', $attribute16) }
            if ( $PSBoundParameters.ContainsKey('attribute16expr') ) { $payload.Add('attribute16expr', $attribute16expr) }
            if ( $PSBoundParameters.ContainsKey('attribute16friendlyname') ) { $payload.Add('attribute16friendlyname', $attribute16friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute16format') ) { $payload.Add('attribute16format', $attribute16format) }
            if ( $PSBoundParameters.ContainsKey('encryptassertion') ) { $payload.Add('encryptassertion', $encryptassertion) }
            if ( $PSBoundParameters.ContainsKey('samlspcertname') ) { $payload.Add('samlspcertname', $samlspcertname) }
            if ( $PSBoundParameters.ContainsKey('encryptionalgorithm') ) { $payload.Add('encryptionalgorithm', $encryptionalgorithm) }
            if ( $PSBoundParameters.ContainsKey('skewtime') ) { $payload.Add('skewtime', $skewtime) }
            if ( $PSBoundParameters.ContainsKey('signassertion') ) { $payload.Add('signassertion', $signassertion) }
            if ( $PSBoundParameters.ContainsKey('signatureservice') ) { $payload.Add('signatureservice', $signatureservice) }
            if ( $PSCmdlet.ShouldProcess("vpnsamlssoprofile", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnsamlssoprofile -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-ADCGetVpnsamlssoprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnsamlssoprofile: Finished"
    }
}

function Invoke-ADCDeleteVpnsamlssoprofile {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for SAML sso action resource.
    .PARAMETER Name
        Name for the new saml single sign-on profile. 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 an SSO action is created.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnsamlssoprofile -Name <string>
        An example how to delete vpnsamlssoprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnsamlssoprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsamlssoprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnsamlssoprofile: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnsamlssoprofile -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-ADCDeleteVpnsamlssoprofile: Finished"
    }
}

function Invoke-ADCUpdateVpnsamlssoprofile {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for SAML sso action resource.
    .PARAMETER Name
        Name for the new saml single sign-on profile. 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 an SSO action is created.
    .PARAMETER Samlsigningcertname
        Name of the signing authority as given in the SAML server's SSL certificate.
    .PARAMETER Assertionconsumerserviceurl
        URL to which the assertion is to be sent.
    .PARAMETER Sendpassword
        Option to send password in assertion.
        Possible values = ON, OFF
    .PARAMETER Samlissuername
        The name to be used in requests sent from Citrix ADC to IdP to uniquely identify Citrix ADC.
    .PARAMETER Relaystaterule
        Expression to extract relaystate to be sent along with assertion. Evaluation of this expression should return TEXT content. This is typically a target url to which user is redirected after the recipient validates SAML token.
    .PARAMETER Signaturealg
        Algorithm to be used to sign/verify SAML transactions.
        Possible values = RSA-SHA1, RSA-SHA256
    .PARAMETER Digestmethod
        Algorithm to be used to compute/verify digest for SAML transactions.
        Possible values = SHA1, SHA256
    .PARAMETER Audience
        Audience for which assertion sent by IdP is applicable. This is typically entity name or url that represents ServiceProvider.
    .PARAMETER Nameidformat
        Format of Name Identifier sent in Assertion.
        Possible values = Unspecified, emailAddress, X509SubjectName, WindowsDomainQualifiedName, kerberos, entity, persistent, transient
    .PARAMETER Nameidexpr
        Expression that will be evaluated to obtain NameIdentifier to be sent in assertion.
    .PARAMETER Attribute1
        Name of attribute1 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute1expr
        Expression that will be evaluated to obtain attribute1's value to be sent in Assertion.
    .PARAMETER Attribute1friendlyname
        User-Friendly Name of attribute1 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute1format
        Format of Attribute1 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute2
        Name of attribute2 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute2expr
        Expression that will be evaluated to obtain attribute2's value to be sent in Assertion.
    .PARAMETER Attribute2friendlyname
        User-Friendly Name of attribute2 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute2format
        Format of Attribute2 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute3
        Name of attribute3 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute3expr
        Expression that will be evaluated to obtain attribute3's value to be sent in Assertion.
    .PARAMETER Attribute3friendlyname
        User-Friendly Name of attribute3 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute3format
        Format of Attribute3 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute4
        Name of attribute4 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute4expr
        Expression that will be evaluated to obtain attribute4's value to be sent in Assertion.
    .PARAMETER Attribute4friendlyname
        User-Friendly Name of attribute4 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute4format
        Format of Attribute4 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute5
        Name of attribute5 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute5expr
        Expression that will be evaluated to obtain attribute5's value to be sent in Assertion.
    .PARAMETER Attribute5friendlyname
        User-Friendly Name of attribute5 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute5format
        Format of Attribute5 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute6
        Name of attribute6 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute6expr
        Expression that will be evaluated to obtain attribute6's value to be sent in Assertion.
    .PARAMETER Attribute6friendlyname
        User-Friendly Name of attribute6 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute6format
        Format of Attribute6 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute7
        Name of attribute7 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute7expr
        Expression that will be evaluated to obtain attribute7's value to be sent in Assertion.
    .PARAMETER Attribute7friendlyname
        User-Friendly Name of attribute7 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute7format
        Format of Attribute7 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute8
        Name of attribute8 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute8expr
        Expression that will be evaluated to obtain attribute8's value to be sent in Assertion.
    .PARAMETER Attribute8friendlyname
        User-Friendly Name of attribute8 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute8format
        Format of Attribute8 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute9
        Name of attribute9 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute9expr
        Expression that will be evaluated to obtain attribute9's value to be sent in Assertion.
    .PARAMETER Attribute9friendlyname
        User-Friendly Name of attribute9 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute9format
        Format of Attribute9 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute10
        Name of attribute10 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute10expr
        Expression that will be evaluated to obtain attribute10's value to be sent in Assertion.
    .PARAMETER Attribute10friendlyname
        User-Friendly Name of attribute10 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute10format
        Format of Attribute10 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute11
        Name of attribute11 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute11expr
        Expression that will be evaluated to obtain attribute11's value to be sent in Assertion.
    .PARAMETER Attribute11friendlyname
        User-Friendly Name of attribute11 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute11format
        Format of Attribute11 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute12
        Name of attribute12 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute12expr
        Expression that will be evaluated to obtain attribute12's value to be sent in Assertion.
    .PARAMETER Attribute12friendlyname
        User-Friendly Name of attribute12 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute12format
        Format of Attribute12 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute13
        Name of attribute13 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute13expr
        Expression that will be evaluated to obtain attribute13's value to be sent in Assertion.
    .PARAMETER Attribute13friendlyname
        User-Friendly Name of attribute13 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute13format
        Format of Attribute13 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute14
        Name of attribute14 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute14expr
        Expression that will be evaluated to obtain attribute14's value to be sent in Assertion.
    .PARAMETER Attribute14friendlyname
        User-Friendly Name of attribute14 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute14format
        Format of Attribute14 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute15
        Name of attribute15 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute15expr
        Expression that will be evaluated to obtain attribute15's value to be sent in Assertion.
    .PARAMETER Attribute15friendlyname
        User-Friendly Name of attribute15 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute15format
        Format of Attribute15 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute16
        Name of attribute16 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute16expr
        Expression that will be evaluated to obtain attribute16's value to be sent in Assertion.
    .PARAMETER Attribute16friendlyname
        User-Friendly Name of attribute16 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute16format
        Format of Attribute16 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Encryptassertion
        Option to encrypt assertion when Citrix ADC sends one.
        Possible values = ON, OFF
    .PARAMETER Samlspcertname
        Name of the SSL certificate of peer/receving party using which Assertion is encrypted.
    .PARAMETER Encryptionalgorithm
        Algorithm to be used to encrypt SAML assertion.
        Possible values = DES3, AES128, AES192, AES256
    .PARAMETER Skewtime
        This option specifies the number of minutes on either side of current time that the assertion would be valid. For example, if skewTime is 10, then assertion would be valid from (current time - 10) min to (current time + 10) min, ie 20min in all.
    .PARAMETER Signassertion
        Option to sign portions of assertion when Citrix ADC IDP sends one. Based on the user selection, either Assertion or Response or Both or none can be signed.
        Possible values = NONE, ASSERTION, RESPONSE, BOTH
    .PARAMETER Signatureservice
        Name of the service in cloud used to sign the data.
    .PARAMETER PassThru
        Return details about the created vpnsamlssoprofile item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnsamlssoprofile -name <string>
        An example how to update vpnsamlssoprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnsamlssoprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsamlssoprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Samlsigningcertname,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Assertionconsumerserviceurl,

        [ValidateSet('ON', 'OFF')]
        [string]$Sendpassword,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Samlissuername,

        [string]$Relaystaterule,

        [ValidateSet('RSA-SHA1', 'RSA-SHA256')]
        [string]$Signaturealg,

        [ValidateSet('SHA1', 'SHA256')]
        [string]$Digestmethod,

        [string]$Audience,

        [ValidateSet('Unspecified', 'emailAddress', 'X509SubjectName', 'WindowsDomainQualifiedName', 'kerberos', 'entity', 'persistent', 'transient')]
        [string]$Nameidformat,

        [string]$Nameidexpr,

        [string]$Attribute1,

        [string]$Attribute1expr,

        [string]$Attribute1friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute1format,

        [string]$Attribute2,

        [string]$Attribute2expr,

        [string]$Attribute2friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute2format,

        [string]$Attribute3,

        [string]$Attribute3expr,

        [string]$Attribute3friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute3format,

        [string]$Attribute4,

        [string]$Attribute4expr,

        [string]$Attribute4friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute4format,

        [string]$Attribute5,

        [string]$Attribute5expr,

        [string]$Attribute5friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute5format,

        [string]$Attribute6,

        [string]$Attribute6expr,

        [string]$Attribute6friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute6format,

        [string]$Attribute7,

        [string]$Attribute7expr,

        [string]$Attribute7friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute7format,

        [string]$Attribute8,

        [string]$Attribute8expr,

        [string]$Attribute8friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute8format,

        [string]$Attribute9,

        [string]$Attribute9expr,

        [string]$Attribute9friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute9format,

        [string]$Attribute10,

        [string]$Attribute10expr,

        [string]$Attribute10friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute10format,

        [string]$Attribute11,

        [string]$Attribute11expr,

        [string]$Attribute11friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute11format,

        [string]$Attribute12,

        [string]$Attribute12expr,

        [string]$Attribute12friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute12format,

        [string]$Attribute13,

        [string]$Attribute13expr,

        [string]$Attribute13friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute13format,

        [string]$Attribute14,

        [string]$Attribute14expr,

        [string]$Attribute14friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute14format,

        [string]$Attribute15,

        [string]$Attribute15expr,

        [string]$Attribute15friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute15format,

        [string]$Attribute16,

        [string]$Attribute16expr,

        [string]$Attribute16friendlyname,

        [ValidateSet('URI', 'Basic')]
        [string]$Attribute16format,

        [ValidateSet('ON', 'OFF')]
        [string]$Encryptassertion,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Samlspcertname,

        [ValidateSet('DES3', 'AES128', 'AES192', 'AES256')]
        [string]$Encryptionalgorithm,

        [double]$Skewtime,

        [ValidateSet('NONE', 'ASSERTION', 'RESPONSE', 'BOTH')]
        [string]$Signassertion,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Signatureservice,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnsamlssoprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('samlsigningcertname') ) { $payload.Add('samlsigningcertname', $samlsigningcertname) }
            if ( $PSBoundParameters.ContainsKey('assertionconsumerserviceurl') ) { $payload.Add('assertionconsumerserviceurl', $assertionconsumerserviceurl) }
            if ( $PSBoundParameters.ContainsKey('sendpassword') ) { $payload.Add('sendpassword', $sendpassword) }
            if ( $PSBoundParameters.ContainsKey('samlissuername') ) { $payload.Add('samlissuername', $samlissuername) }
            if ( $PSBoundParameters.ContainsKey('relaystaterule') ) { $payload.Add('relaystaterule', $relaystaterule) }
            if ( $PSBoundParameters.ContainsKey('signaturealg') ) { $payload.Add('signaturealg', $signaturealg) }
            if ( $PSBoundParameters.ContainsKey('digestmethod') ) { $payload.Add('digestmethod', $digestmethod) }
            if ( $PSBoundParameters.ContainsKey('audience') ) { $payload.Add('audience', $audience) }
            if ( $PSBoundParameters.ContainsKey('nameidformat') ) { $payload.Add('nameidformat', $nameidformat) }
            if ( $PSBoundParameters.ContainsKey('nameidexpr') ) { $payload.Add('nameidexpr', $nameidexpr) }
            if ( $PSBoundParameters.ContainsKey('attribute1') ) { $payload.Add('attribute1', $attribute1) }
            if ( $PSBoundParameters.ContainsKey('attribute1expr') ) { $payload.Add('attribute1expr', $attribute1expr) }
            if ( $PSBoundParameters.ContainsKey('attribute1friendlyname') ) { $payload.Add('attribute1friendlyname', $attribute1friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute1format') ) { $payload.Add('attribute1format', $attribute1format) }
            if ( $PSBoundParameters.ContainsKey('attribute2') ) { $payload.Add('attribute2', $attribute2) }
            if ( $PSBoundParameters.ContainsKey('attribute2expr') ) { $payload.Add('attribute2expr', $attribute2expr) }
            if ( $PSBoundParameters.ContainsKey('attribute2friendlyname') ) { $payload.Add('attribute2friendlyname', $attribute2friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute2format') ) { $payload.Add('attribute2format', $attribute2format) }
            if ( $PSBoundParameters.ContainsKey('attribute3') ) { $payload.Add('attribute3', $attribute3) }
            if ( $PSBoundParameters.ContainsKey('attribute3expr') ) { $payload.Add('attribute3expr', $attribute3expr) }
            if ( $PSBoundParameters.ContainsKey('attribute3friendlyname') ) { $payload.Add('attribute3friendlyname', $attribute3friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute3format') ) { $payload.Add('attribute3format', $attribute3format) }
            if ( $PSBoundParameters.ContainsKey('attribute4') ) { $payload.Add('attribute4', $attribute4) }
            if ( $PSBoundParameters.ContainsKey('attribute4expr') ) { $payload.Add('attribute4expr', $attribute4expr) }
            if ( $PSBoundParameters.ContainsKey('attribute4friendlyname') ) { $payload.Add('attribute4friendlyname', $attribute4friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute4format') ) { $payload.Add('attribute4format', $attribute4format) }
            if ( $PSBoundParameters.ContainsKey('attribute5') ) { $payload.Add('attribute5', $attribute5) }
            if ( $PSBoundParameters.ContainsKey('attribute5expr') ) { $payload.Add('attribute5expr', $attribute5expr) }
            if ( $PSBoundParameters.ContainsKey('attribute5friendlyname') ) { $payload.Add('attribute5friendlyname', $attribute5friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute5format') ) { $payload.Add('attribute5format', $attribute5format) }
            if ( $PSBoundParameters.ContainsKey('attribute6') ) { $payload.Add('attribute6', $attribute6) }
            if ( $PSBoundParameters.ContainsKey('attribute6expr') ) { $payload.Add('attribute6expr', $attribute6expr) }
            if ( $PSBoundParameters.ContainsKey('attribute6friendlyname') ) { $payload.Add('attribute6friendlyname', $attribute6friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute6format') ) { $payload.Add('attribute6format', $attribute6format) }
            if ( $PSBoundParameters.ContainsKey('attribute7') ) { $payload.Add('attribute7', $attribute7) }
            if ( $PSBoundParameters.ContainsKey('attribute7expr') ) { $payload.Add('attribute7expr', $attribute7expr) }
            if ( $PSBoundParameters.ContainsKey('attribute7friendlyname') ) { $payload.Add('attribute7friendlyname', $attribute7friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute7format') ) { $payload.Add('attribute7format', $attribute7format) }
            if ( $PSBoundParameters.ContainsKey('attribute8') ) { $payload.Add('attribute8', $attribute8) }
            if ( $PSBoundParameters.ContainsKey('attribute8expr') ) { $payload.Add('attribute8expr', $attribute8expr) }
            if ( $PSBoundParameters.ContainsKey('attribute8friendlyname') ) { $payload.Add('attribute8friendlyname', $attribute8friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute8format') ) { $payload.Add('attribute8format', $attribute8format) }
            if ( $PSBoundParameters.ContainsKey('attribute9') ) { $payload.Add('attribute9', $attribute9) }
            if ( $PSBoundParameters.ContainsKey('attribute9expr') ) { $payload.Add('attribute9expr', $attribute9expr) }
            if ( $PSBoundParameters.ContainsKey('attribute9friendlyname') ) { $payload.Add('attribute9friendlyname', $attribute9friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute9format') ) { $payload.Add('attribute9format', $attribute9format) }
            if ( $PSBoundParameters.ContainsKey('attribute10') ) { $payload.Add('attribute10', $attribute10) }
            if ( $PSBoundParameters.ContainsKey('attribute10expr') ) { $payload.Add('attribute10expr', $attribute10expr) }
            if ( $PSBoundParameters.ContainsKey('attribute10friendlyname') ) { $payload.Add('attribute10friendlyname', $attribute10friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute10format') ) { $payload.Add('attribute10format', $attribute10format) }
            if ( $PSBoundParameters.ContainsKey('attribute11') ) { $payload.Add('attribute11', $attribute11) }
            if ( $PSBoundParameters.ContainsKey('attribute11expr') ) { $payload.Add('attribute11expr', $attribute11expr) }
            if ( $PSBoundParameters.ContainsKey('attribute11friendlyname') ) { $payload.Add('attribute11friendlyname', $attribute11friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute11format') ) { $payload.Add('attribute11format', $attribute11format) }
            if ( $PSBoundParameters.ContainsKey('attribute12') ) { $payload.Add('attribute12', $attribute12) }
            if ( $PSBoundParameters.ContainsKey('attribute12expr') ) { $payload.Add('attribute12expr', $attribute12expr) }
            if ( $PSBoundParameters.ContainsKey('attribute12friendlyname') ) { $payload.Add('attribute12friendlyname', $attribute12friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute12format') ) { $payload.Add('attribute12format', $attribute12format) }
            if ( $PSBoundParameters.ContainsKey('attribute13') ) { $payload.Add('attribute13', $attribute13) }
            if ( $PSBoundParameters.ContainsKey('attribute13expr') ) { $payload.Add('attribute13expr', $attribute13expr) }
            if ( $PSBoundParameters.ContainsKey('attribute13friendlyname') ) { $payload.Add('attribute13friendlyname', $attribute13friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute13format') ) { $payload.Add('attribute13format', $attribute13format) }
            if ( $PSBoundParameters.ContainsKey('attribute14') ) { $payload.Add('attribute14', $attribute14) }
            if ( $PSBoundParameters.ContainsKey('attribute14expr') ) { $payload.Add('attribute14expr', $attribute14expr) }
            if ( $PSBoundParameters.ContainsKey('attribute14friendlyname') ) { $payload.Add('attribute14friendlyname', $attribute14friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute14format') ) { $payload.Add('attribute14format', $attribute14format) }
            if ( $PSBoundParameters.ContainsKey('attribute15') ) { $payload.Add('attribute15', $attribute15) }
            if ( $PSBoundParameters.ContainsKey('attribute15expr') ) { $payload.Add('attribute15expr', $attribute15expr) }
            if ( $PSBoundParameters.ContainsKey('attribute15friendlyname') ) { $payload.Add('attribute15friendlyname', $attribute15friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute15format') ) { $payload.Add('attribute15format', $attribute15format) }
            if ( $PSBoundParameters.ContainsKey('attribute16') ) { $payload.Add('attribute16', $attribute16) }
            if ( $PSBoundParameters.ContainsKey('attribute16expr') ) { $payload.Add('attribute16expr', $attribute16expr) }
            if ( $PSBoundParameters.ContainsKey('attribute16friendlyname') ) { $payload.Add('attribute16friendlyname', $attribute16friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute16format') ) { $payload.Add('attribute16format', $attribute16format) }
            if ( $PSBoundParameters.ContainsKey('encryptassertion') ) { $payload.Add('encryptassertion', $encryptassertion) }
            if ( $PSBoundParameters.ContainsKey('samlspcertname') ) { $payload.Add('samlspcertname', $samlspcertname) }
            if ( $PSBoundParameters.ContainsKey('encryptionalgorithm') ) { $payload.Add('encryptionalgorithm', $encryptionalgorithm) }
            if ( $PSBoundParameters.ContainsKey('skewtime') ) { $payload.Add('skewtime', $skewtime) }
            if ( $PSBoundParameters.ContainsKey('signassertion') ) { $payload.Add('signassertion', $signassertion) }
            if ( $PSBoundParameters.ContainsKey('signatureservice') ) { $payload.Add('signatureservice', $signatureservice) }
            if ( $PSCmdlet.ShouldProcess("vpnsamlssoprofile", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnsamlssoprofile -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-ADCGetVpnsamlssoprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnsamlssoprofile: Finished"
    }
}

function Invoke-ADCUnsetVpnsamlssoprofile {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for SAML sso action resource.
    .PARAMETER Name
        Name for the new saml single sign-on profile. 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 an SSO action is created.
    .PARAMETER Samlsigningcertname
        Name of the signing authority as given in the SAML server's SSL certificate.
    .PARAMETER Sendpassword
        Option to send password in assertion.
        Possible values = ON, OFF
    .PARAMETER Samlissuername
        The name to be used in requests sent from Citrix ADC to IdP to uniquely identify Citrix ADC.
    .PARAMETER Relaystaterule
        Expression to extract relaystate to be sent along with assertion. Evaluation of this expression should return TEXT content. This is typically a target url to which user is redirected after the recipient validates SAML token.
    .PARAMETER Signaturealg
        Algorithm to be used to sign/verify SAML transactions.
        Possible values = RSA-SHA1, RSA-SHA256
    .PARAMETER Digestmethod
        Algorithm to be used to compute/verify digest for SAML transactions.
        Possible values = SHA1, SHA256
    .PARAMETER Audience
        Audience for which assertion sent by IdP is applicable. This is typically entity name or url that represents ServiceProvider.
    .PARAMETER Nameidformat
        Format of Name Identifier sent in Assertion.
        Possible values = Unspecified, emailAddress, X509SubjectName, WindowsDomainQualifiedName, kerberos, entity, persistent, transient
    .PARAMETER Nameidexpr
        Expression that will be evaluated to obtain NameIdentifier to be sent in assertion.
    .PARAMETER Attribute1
        Name of attribute1 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute1friendlyname
        User-Friendly Name of attribute1 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute1format
        Format of Attribute1 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute2
        Name of attribute2 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute2friendlyname
        User-Friendly Name of attribute2 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute2format
        Format of Attribute2 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute3
        Name of attribute3 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute3friendlyname
        User-Friendly Name of attribute3 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute3format
        Format of Attribute3 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute4
        Name of attribute4 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute4friendlyname
        User-Friendly Name of attribute4 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute4format
        Format of Attribute4 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute5
        Name of attribute5 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute5friendlyname
        User-Friendly Name of attribute5 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute5format
        Format of Attribute5 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute6
        Name of attribute6 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute6friendlyname
        User-Friendly Name of attribute6 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute6format
        Format of Attribute6 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute7
        Name of attribute7 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute7friendlyname
        User-Friendly Name of attribute7 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute7format
        Format of Attribute7 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute8
        Name of attribute8 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute8friendlyname
        User-Friendly Name of attribute8 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute8format
        Format of Attribute8 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute9
        Name of attribute9 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute9friendlyname
        User-Friendly Name of attribute9 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute9format
        Format of Attribute9 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute10
        Name of attribute10 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute10friendlyname
        User-Friendly Name of attribute10 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute10format
        Format of Attribute10 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute11
        Name of attribute11 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute11friendlyname
        User-Friendly Name of attribute11 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute11format
        Format of Attribute11 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute12
        Name of attribute12 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute12friendlyname
        User-Friendly Name of attribute12 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute12format
        Format of Attribute12 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute13
        Name of attribute13 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute13friendlyname
        User-Friendly Name of attribute13 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute13format
        Format of Attribute13 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute14
        Name of attribute14 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute14friendlyname
        User-Friendly Name of attribute14 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute14format
        Format of Attribute14 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute15
        Name of attribute15 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute15friendlyname
        User-Friendly Name of attribute15 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute15format
        Format of Attribute15 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Attribute16
        Name of attribute16 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute16friendlyname
        User-Friendly Name of attribute16 that needs to be sent in SAML Assertion.
    .PARAMETER Attribute16format
        Format of Attribute16 to be sent in Assertion.
        Possible values = URI, Basic
    .PARAMETER Encryptassertion
        Option to encrypt assertion when Citrix ADC sends one.
        Possible values = ON, OFF
    .PARAMETER Samlspcertname
        Name of the SSL certificate of peer/receving party using which Assertion is encrypted.
    .PARAMETER Encryptionalgorithm
        Algorithm to be used to encrypt SAML assertion.
        Possible values = DES3, AES128, AES192, AES256
    .PARAMETER Skewtime
        This option specifies the number of minutes on either side of current time that the assertion would be valid. For example, if skewTime is 10, then assertion would be valid from (current time - 10) min to (current time + 10) min, ie 20min in all.
    .PARAMETER Signassertion
        Option to sign portions of assertion when Citrix ADC IDP sends one. Based on the user selection, either Assertion or Response or Both or none can be signed.
        Possible values = NONE, ASSERTION, RESPONSE, BOTH
    .PARAMETER Signatureservice
        Name of the service in cloud used to sign the data.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnsamlssoprofile -name <string>
        An example how to unset vpnsamlssoprofile configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnsamlssoprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsamlssoprofile
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Boolean]$samlsigningcertname,

        [Boolean]$sendpassword,

        [Boolean]$samlissuername,

        [Boolean]$relaystaterule,

        [Boolean]$signaturealg,

        [Boolean]$digestmethod,

        [Boolean]$audience,

        [Boolean]$nameidformat,

        [Boolean]$nameidexpr,

        [Boolean]$attribute1,

        [Boolean]$attribute1friendlyname,

        [Boolean]$attribute1format,

        [Boolean]$attribute2,

        [Boolean]$attribute2friendlyname,

        [Boolean]$attribute2format,

        [Boolean]$attribute3,

        [Boolean]$attribute3friendlyname,

        [Boolean]$attribute3format,

        [Boolean]$attribute4,

        [Boolean]$attribute4friendlyname,

        [Boolean]$attribute4format,

        [Boolean]$attribute5,

        [Boolean]$attribute5friendlyname,

        [Boolean]$attribute5format,

        [Boolean]$attribute6,

        [Boolean]$attribute6friendlyname,

        [Boolean]$attribute6format,

        [Boolean]$attribute7,

        [Boolean]$attribute7friendlyname,

        [Boolean]$attribute7format,

        [Boolean]$attribute8,

        [Boolean]$attribute8friendlyname,

        [Boolean]$attribute8format,

        [Boolean]$attribute9,

        [Boolean]$attribute9friendlyname,

        [Boolean]$attribute9format,

        [Boolean]$attribute10,

        [Boolean]$attribute10friendlyname,

        [Boolean]$attribute10format,

        [Boolean]$attribute11,

        [Boolean]$attribute11friendlyname,

        [Boolean]$attribute11format,

        [Boolean]$attribute12,

        [Boolean]$attribute12friendlyname,

        [Boolean]$attribute12format,

        [Boolean]$attribute13,

        [Boolean]$attribute13friendlyname,

        [Boolean]$attribute13format,

        [Boolean]$attribute14,

        [Boolean]$attribute14friendlyname,

        [Boolean]$attribute14format,

        [Boolean]$attribute15,

        [Boolean]$attribute15friendlyname,

        [Boolean]$attribute15format,

        [Boolean]$attribute16,

        [Boolean]$attribute16friendlyname,

        [Boolean]$attribute16format,

        [Boolean]$encryptassertion,

        [Boolean]$samlspcertname,

        [Boolean]$encryptionalgorithm,

        [Boolean]$skewtime,

        [Boolean]$signassertion,

        [Boolean]$signatureservice 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnsamlssoprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('samlsigningcertname') ) { $payload.Add('samlsigningcertname', $samlsigningcertname) }
            if ( $PSBoundParameters.ContainsKey('sendpassword') ) { $payload.Add('sendpassword', $sendpassword) }
            if ( $PSBoundParameters.ContainsKey('samlissuername') ) { $payload.Add('samlissuername', $samlissuername) }
            if ( $PSBoundParameters.ContainsKey('relaystaterule') ) { $payload.Add('relaystaterule', $relaystaterule) }
            if ( $PSBoundParameters.ContainsKey('signaturealg') ) { $payload.Add('signaturealg', $signaturealg) }
            if ( $PSBoundParameters.ContainsKey('digestmethod') ) { $payload.Add('digestmethod', $digestmethod) }
            if ( $PSBoundParameters.ContainsKey('audience') ) { $payload.Add('audience', $audience) }
            if ( $PSBoundParameters.ContainsKey('nameidformat') ) { $payload.Add('nameidformat', $nameidformat) }
            if ( $PSBoundParameters.ContainsKey('nameidexpr') ) { $payload.Add('nameidexpr', $nameidexpr) }
            if ( $PSBoundParameters.ContainsKey('attribute1') ) { $payload.Add('attribute1', $attribute1) }
            if ( $PSBoundParameters.ContainsKey('attribute1friendlyname') ) { $payload.Add('attribute1friendlyname', $attribute1friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute1format') ) { $payload.Add('attribute1format', $attribute1format) }
            if ( $PSBoundParameters.ContainsKey('attribute2') ) { $payload.Add('attribute2', $attribute2) }
            if ( $PSBoundParameters.ContainsKey('attribute2friendlyname') ) { $payload.Add('attribute2friendlyname', $attribute2friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute2format') ) { $payload.Add('attribute2format', $attribute2format) }
            if ( $PSBoundParameters.ContainsKey('attribute3') ) { $payload.Add('attribute3', $attribute3) }
            if ( $PSBoundParameters.ContainsKey('attribute3friendlyname') ) { $payload.Add('attribute3friendlyname', $attribute3friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute3format') ) { $payload.Add('attribute3format', $attribute3format) }
            if ( $PSBoundParameters.ContainsKey('attribute4') ) { $payload.Add('attribute4', $attribute4) }
            if ( $PSBoundParameters.ContainsKey('attribute4friendlyname') ) { $payload.Add('attribute4friendlyname', $attribute4friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute4format') ) { $payload.Add('attribute4format', $attribute4format) }
            if ( $PSBoundParameters.ContainsKey('attribute5') ) { $payload.Add('attribute5', $attribute5) }
            if ( $PSBoundParameters.ContainsKey('attribute5friendlyname') ) { $payload.Add('attribute5friendlyname', $attribute5friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute5format') ) { $payload.Add('attribute5format', $attribute5format) }
            if ( $PSBoundParameters.ContainsKey('attribute6') ) { $payload.Add('attribute6', $attribute6) }
            if ( $PSBoundParameters.ContainsKey('attribute6friendlyname') ) { $payload.Add('attribute6friendlyname', $attribute6friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute6format') ) { $payload.Add('attribute6format', $attribute6format) }
            if ( $PSBoundParameters.ContainsKey('attribute7') ) { $payload.Add('attribute7', $attribute7) }
            if ( $PSBoundParameters.ContainsKey('attribute7friendlyname') ) { $payload.Add('attribute7friendlyname', $attribute7friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute7format') ) { $payload.Add('attribute7format', $attribute7format) }
            if ( $PSBoundParameters.ContainsKey('attribute8') ) { $payload.Add('attribute8', $attribute8) }
            if ( $PSBoundParameters.ContainsKey('attribute8friendlyname') ) { $payload.Add('attribute8friendlyname', $attribute8friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute8format') ) { $payload.Add('attribute8format', $attribute8format) }
            if ( $PSBoundParameters.ContainsKey('attribute9') ) { $payload.Add('attribute9', $attribute9) }
            if ( $PSBoundParameters.ContainsKey('attribute9friendlyname') ) { $payload.Add('attribute9friendlyname', $attribute9friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute9format') ) { $payload.Add('attribute9format', $attribute9format) }
            if ( $PSBoundParameters.ContainsKey('attribute10') ) { $payload.Add('attribute10', $attribute10) }
            if ( $PSBoundParameters.ContainsKey('attribute10friendlyname') ) { $payload.Add('attribute10friendlyname', $attribute10friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute10format') ) { $payload.Add('attribute10format', $attribute10format) }
            if ( $PSBoundParameters.ContainsKey('attribute11') ) { $payload.Add('attribute11', $attribute11) }
            if ( $PSBoundParameters.ContainsKey('attribute11friendlyname') ) { $payload.Add('attribute11friendlyname', $attribute11friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute11format') ) { $payload.Add('attribute11format', $attribute11format) }
            if ( $PSBoundParameters.ContainsKey('attribute12') ) { $payload.Add('attribute12', $attribute12) }
            if ( $PSBoundParameters.ContainsKey('attribute12friendlyname') ) { $payload.Add('attribute12friendlyname', $attribute12friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute12format') ) { $payload.Add('attribute12format', $attribute12format) }
            if ( $PSBoundParameters.ContainsKey('attribute13') ) { $payload.Add('attribute13', $attribute13) }
            if ( $PSBoundParameters.ContainsKey('attribute13friendlyname') ) { $payload.Add('attribute13friendlyname', $attribute13friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute13format') ) { $payload.Add('attribute13format', $attribute13format) }
            if ( $PSBoundParameters.ContainsKey('attribute14') ) { $payload.Add('attribute14', $attribute14) }
            if ( $PSBoundParameters.ContainsKey('attribute14friendlyname') ) { $payload.Add('attribute14friendlyname', $attribute14friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute14format') ) { $payload.Add('attribute14format', $attribute14format) }
            if ( $PSBoundParameters.ContainsKey('attribute15') ) { $payload.Add('attribute15', $attribute15) }
            if ( $PSBoundParameters.ContainsKey('attribute15friendlyname') ) { $payload.Add('attribute15friendlyname', $attribute15friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute15format') ) { $payload.Add('attribute15format', $attribute15format) }
            if ( $PSBoundParameters.ContainsKey('attribute16') ) { $payload.Add('attribute16', $attribute16) }
            if ( $PSBoundParameters.ContainsKey('attribute16friendlyname') ) { $payload.Add('attribute16friendlyname', $attribute16friendlyname) }
            if ( $PSBoundParameters.ContainsKey('attribute16format') ) { $payload.Add('attribute16format', $attribute16format) }
            if ( $PSBoundParameters.ContainsKey('encryptassertion') ) { $payload.Add('encryptassertion', $encryptassertion) }
            if ( $PSBoundParameters.ContainsKey('samlspcertname') ) { $payload.Add('samlspcertname', $samlspcertname) }
            if ( $PSBoundParameters.ContainsKey('encryptionalgorithm') ) { $payload.Add('encryptionalgorithm', $encryptionalgorithm) }
            if ( $PSBoundParameters.ContainsKey('skewtime') ) { $payload.Add('skewtime', $skewtime) }
            if ( $PSBoundParameters.ContainsKey('signassertion') ) { $payload.Add('signassertion', $signassertion) }
            if ( $PSBoundParameters.ContainsKey('signatureservice') ) { $payload.Add('signatureservice', $signatureservice) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnsamlssoprofile -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-ADCUnsetVpnsamlssoprofile: Finished"
    }
}

function Invoke-ADCGetVpnsamlssoprofile {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for SAML sso action resource.
    .PARAMETER Name
        Name for the new saml single sign-on profile. 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 an SSO action is created.
    .PARAMETER GetAll
        Retrieve all vpnsamlssoprofile object(s).
    .PARAMETER Count
        If specified, the count of the vpnsamlssoprofile 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-ADCGetVpnsamlssoprofile
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsamlssoprofile -GetAll
        Get all vpnsamlssoprofile data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsamlssoprofile -Count
        Get the number of vpnsamlssoprofile objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsamlssoprofile -name <string>
        Get vpnsamlssoprofile object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsamlssoprofile -Filter @{ 'name'='<value>' }
        Get vpnsamlssoprofile data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsamlssoprofile
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsamlssoprofile/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [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-ADCGetVpnsamlssoprofile: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnsamlssoprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsamlssoprofile -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 vpnsamlssoprofile objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsamlssoprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsamlssoprofile objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsamlssoprofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsamlssoprofile configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsamlssoprofile -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnsamlssoprofile configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsamlssoprofile -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-ADCGetVpnsamlssoprofile: Ended"
    }
}

function Invoke-ADCAddVpnsessionaction {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN session action resource.
    .PARAMETER Name
        Name for the Citrix Gateway profile (action). Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .PARAMETER Useraccounting
        The name of the radiusPolicy to use for RADIUS user accounting info on the session.
    .PARAMETER Httpport
        Destination port numbers other than port 80, added as a comma-separated list. Traffic to these ports is processed as HTTP traffic, which allows functionality, such as HTTP authorization and single sign-on to a web application to work.
    .PARAMETER Winsip
        WINS server IP address to add to Citrix Gateway for name resolution.
    .PARAMETER Dnsvservername
        Name of the DNS virtual server for the user session.
    .PARAMETER Splitdns
        Route the DNS requests to the local DNS server configured on the user device, or Citrix Gateway (remote), or both.
        Possible values = LOCAL, REMOTE, BOTH
    .PARAMETER Sesstimeout
        Number of minutes after which the session times out.
    .PARAMETER Clientsecurity
        Specify the client security check for the user device to permit a Citrix Gateway session. The web address or IP address is not included in the expression for the client security check.
    .PARAMETER Clientsecuritygroup
        The client security group that will be assigned on failure of the client security check. Users can in general be organized into Groups. In this case, the Client Security Group may have a more restrictive security policy.
    .PARAMETER Clientsecuritymessage
        The client security message that will be displayed on failure of the client security check.
    .PARAMETER Clientsecuritylog
        Set the logging of client security checks.
        Possible values = ON, OFF
    .PARAMETER Splittunnel
        Send, through the tunnel, traffic only for intranet applications that are defined in Citrix Gateway. Route all other traffic directly to the Internet. The OFF setting routes all traffic through Citrix Gateway. With the REVERSE setting, intranet applications define the network traffic that is not intercepted. All network traffic directed to internal IP addresses bypasses the VPN tunnel, while other traffic goes through Citrix Gateway. Reverse split tunneling can be used to log all non-local LAN traffic. For example, if users have a home network and are logged on through the Citrix Gateway Plug-in, network traffic destined to a printer or another device within the home network is not intercepted.
        Possible values = ON, OFF, REVERSE
    .PARAMETER Locallanaccess
        Set local LAN access. If split tunneling is OFF, and you set local LAN access to ON, the local client can route traffic to its local interface. When the local area network switch is specified, this combination of switches is useful. The client can allow local LAN access to devices that commonly have non-routable addresses, such as local printers or local file servers.
        Possible values = ON, OFF
    .PARAMETER Rfc1918
        As defined in the local area network, allow only the following local area network addresses to bypass the VPN tunnel when the local LAN access feature is enabled:
        * 10.*.*.*,
        * 172.16.*.*,
        * 192.168.*.*.
        Possible values = ON, OFF
    .PARAMETER Spoofiip
        IP address that the intranet application uses to route the connection through the virtual adapter.
        Possible values = ON, OFF
    .PARAMETER Killconnections
        Specify whether the Citrix Gateway Plug-in should disconnect all preexisting connections, such as the connections existing before the user logged on to Citrix Gateway, and prevent new incoming connections on the Citrix Gateway Plug-in for Windows and MAC when the user is connected to Citrix Gateway and split tunneling is disabled.
        Possible values = ON, OFF
    .PARAMETER Transparentinterception
        Allow access to network resources by using a single IP address and subnet mask or a range of IP addresses. The OFF setting sets the mode to proxy, in which you configure destination and source IP addresses and port numbers. If you are using the Citrix Gateway Plug-in for Windows, set this parameter to ON, in which the mode is set to transparent. If you are using the Citrix Gateway Plug-in for Java, set this parameter to OFF.
        Possible values = ON, OFF
    .PARAMETER Windowsclienttype
        Choose between two types of Windows Client\
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed\
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Defaultauthorizationaction
        Specify the network resources that users have access to when they log on to the internal network. The default setting for authorization is to deny access to all network resources. Citrix recommends using the default global setting and then creating authorization policies to define the network resources users can access. If you set the default authorization policy to DENY, you must explicitly authorize access to any network resource, which improves security.
        Possible values = ALLOW, DENY
    .PARAMETER Authorizationgroup
        Comma-separated list of groups in which the user is placed when none of the groups that the user is a part of is configured on Citrix Gateway. The authorization policy can be bound to these groups to control access to the resources.
    .PARAMETER Smartgroup
        This is the default group that is chosen when the authentication succeeds in addition to extracted groups.
    .PARAMETER Clientidletimeout
        Time, in minutes, after which to time out the user session if Citrix Gateway does not detect mouse or keyboard activity.
    .PARAMETER Proxy
        Set options to apply proxy for accessing the internal resources. Available settings function as follows:
        * BROWSER - Proxy settings are configured only in Internet Explorer and Firefox browsers.
        * NS - Proxy settings are configured on the Citrix ADC.
        * OFF - Proxy settings are not configured.
        Possible values = BROWSER, NS, OFF
    .PARAMETER Allprotocolproxy
        IP address of the proxy server to use for all protocols supported by Citrix Gateway.
    .PARAMETER Httpproxy
        IP address of the proxy server to be used for HTTP access for all subsequent connections to the internal network.
    .PARAMETER Ftpproxy
        IP address of the proxy server to be used for FTP access for all subsequent connections to the internal network.
    .PARAMETER Socksproxy
        IP address of the proxy server to be used for SOCKS access for all subsequent connections to the internal network.
    .PARAMETER Gopherproxy
        IP address of the proxy server to be used for GOPHER access for all subsequent connections to the internal network.
    .PARAMETER Sslproxy
        IP address of the proxy server to be used for SSL access for all subsequent connections to the internal network.
    .PARAMETER Proxyexception
        Proxy exception string that will be configured in the browser for bypassing the previously configured proxies. Allowed only if proxy type is Browser.
    .PARAMETER Proxylocalbypass
        Bypass proxy server for local addresses option in Internet Explorer and Firefox proxy server settings.
        Possible values = ENABLED, DISABLED
    .PARAMETER Clientcleanupprompt
        Prompt for client-side cache clean-up when a client-initiated session closes.
        Possible values = ON, OFF
    .PARAMETER Forcecleanup
        Force cache clean-up when the user closes a session. You can specify all, none, or any combination of the client-side items.
        Possible values = none, all, cookie, addressbar, plugin, filesystemapplication, application, applicationdata, clientcertificate, autocomplete, cache
    .PARAMETER Clientoptions
        Display only the configured menu options when you select the "Configure Citrix Gateway" option in the Citrix Gateway Plug-in system tray icon for Windows.
        Possible values = none, all, services, filetransfer, configuration
    .PARAMETER Clientconfiguration
        Allow users to change client Debug logging level in Configuration tab of the Citrix Gateway Plug-in for Windows.
        Possible values = none, trace
    .PARAMETER Sso
        Set single sign-on (SSO) for the session. When the user accesses a server, the user's logon credentials are passed to the server for authentication.
        NOTE : This configuration does not honor the following authentication types for security reason. BASIC, DIGEST, and NTLM (without Negotiate NTLM2 Key or Negotiate Sign Flag). Use VPN TrafficAction to configure SSO for these authentication types.
        Possible values = ON, OFF
    .PARAMETER Ssocredential
        Specify whether to use the primary or secondary authentication credentials for single sign-on to the server.
        Possible values = PRIMARY, SECONDARY
    .PARAMETER Windowsautologon
        Enable or disable the Windows Auto Logon for the session. If a VPN session is established after this setting is enabled, the user is automatically logged on by using Windows credentials after the system is restarted.
        Possible values = ON, OFF
    .PARAMETER Usemip
        Enable or disable the use of a unique IP address alias, or a mapped IP address, as the client IP address for each client session. Allow Citrix Gateway to use the mapped IP address as an intranet IP address when all other IP addresses are not available.
        When IP pooling is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        Possible values = NS, OFF
    .PARAMETER Useiip
        Define IP address pool options. Available settings function as follows:
        * SPILLOVER - When an address pool is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        * NOSPILLOVER - When intranet IP addresses are enabled and the mapped IP address is not used, the Transfer Login page appears for users who have used all available intranet IP addresses.
        * OFF - Address pool is not configured.
        Possible values = NOSPILLOVER, SPILLOVER, OFF
    .PARAMETER Clientdebug
        Set the trace level on Citrix Gateway. Technical support technicians use these debug logs for in-depth debugging and troubleshooting purposes. Available settings function as follows:
        * DEBUG - Detailed debug messages are collected and written into the specified file.
        * STATS - Application audit level error messages and debug statistic counters are written into the specified file.
        * EVENTS - Application audit-level error messages are written into the specified file.
        * OFF - Only critical events are logged into the Windows Application Log.
        Possible values = debug, stats, events, OFF
    .PARAMETER Loginscript
        Path to the logon script that is run when a session is established. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Logoutscript
        Path to the logout script. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Homepage
        Web address of the home page that appears when users log on. Otherwise, users receive the default home page for Citrix Gateway, which is the Access Interface.
    .PARAMETER Icaproxy
        Enable ICA proxy to configure secure Internet access to servers running Citrix XenApp or XenDesktop by using Citrix Receiver instead of the Citrix Gateway Plug-in.
        Possible values = ON, OFF
    .PARAMETER Wihome
        Web address of the Web Interface server, such as http://<ipAddress>/Citrix/XenApp, or Receiver for Web, which enumerates the virtualized resources, such as XenApp, XenDesktop, and cloud applications. This web address is used as the home page in ICA proxy mode.
        If Client Choices is ON, you must configure this setting. Because the user can choose between FullClient and ICAProxy, the user may see a different home page. An Internet web site may appear if the user gets the FullClient option, or a Web Interface site if the user gets the ICAProxy option. If the setting is not configured, the XenApp option does not appear as a client choice.
    .PARAMETER Wihomeaddresstype
        Type of the wihome address(IPV4/V6).
        Possible values = IPV4, IPV6
    .PARAMETER Citrixreceiverhome
        Web address for the Citrix Receiver home page. Configure Citrix Gateway so that when users log on to the appliance, the Citrix Gateway Plug-in opens a web browser that allows single sign-on to the Citrix Receiver home page.
    .PARAMETER Wiportalmode
        Layout on the Access Interface. The COMPACT value indicates the use of small icons.
        Possible values = NORMAL, COMPACT
    .PARAMETER Clientchoices
        Provide users with multiple logon options. With client choices, users have the option of logging on by using the Citrix Gateway Plug-in for Windows, Citrix Gateway Plug-in for Java, the Web Interface, or clientless access from one location. Depending on how Citrix Gateway is configured, users are presented with up to three icons for logon choices. The most common are the Citrix Gateway Plug-in for Windows, Web Interface, and clientless access.
        Possible values = ON, OFF
    .PARAMETER Epaclienttype
        Choose between two types of End point Windows Client
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Iipdnssuffix
        An intranet IP DNS suffix. When a user logs on to Citrix Gateway and is assigned an IP address, a DNS record for the user name and IP address combination is added to the Citrix Gateway DNS cache. You can configure a DNS suffix to append to the user name when the DNS record is added to the cache. You can reach to the host from where the user is logged on by using the user's name, which can be easier to remember than an IP address. When the user logs off from Citrix Gateway, the record is removed from the DNS cache.
    .PARAMETER Forcedtimeout
        Force a disconnection from the Citrix Gateway Plug-in with Citrix Gateway after a specified number of minutes. If the session closes, the user must log on again.
    .PARAMETER Forcedtimeoutwarning
        Number of minutes to warn a user before the user session is disconnected.
    .PARAMETER Ntdomain
        Single sign-on domain to use for single sign-on to applications in the internal network. This setting can be overwritten by the domain that users specify at the time of logon or by the domain that the authentication server returns.
    .PARAMETER Clientlessvpnmode
        Enable clientless access for web, XenApp or XenDesktop, and FileShare resources without installing the Citrix Gateway Plug-in. Available settings function as follows:
        * ON - Allow only clientless access.
        * OFF - Allow clientless access after users log on with the Citrix Gateway Plug-in.
        * DISABLED - Do not allow clientless access.
        Possible values = ON, OFF, DISABLED
    .PARAMETER Emailhome
        Web address for the web-based email, such as Outlook Web Access.
    .PARAMETER Clientlessmodeurlencoding
        When clientless access is enabled, you can choose to encode the addresses of internal web applications or to leave the address as clear text. Available settings function as follows:
        * OPAQUE - Use standard encoding mechanisms to make the domain and protocol part of the resource unclear to users.
        * CLEAR - Do not encode the web address and make it visible to users.
        * ENCRYPT - Allow the domain and protocol to be encrypted using a session key. When the web address is encrypted, the URL is different for each user session for the same web resource. If users bookmark the encoded web address, save it in the web browser and then log off, they cannot connect to the web address when they log on and use the bookmark. If users save the encrypted bookmark in the Access Interface during their session, the bookmark works each time the user logs on.
        Possible values = TRANSPARENT, OPAQUE, ENCRYPT
    .PARAMETER Clientlesspersistentcookie
        State of persistent cookies in clientless access mode. Persistent cookies are required for accessing certain features of SharePoint, such as opening and editing Microsoft Word, Excel, and PowerPoint documents hosted on the SharePoint server. A persistent cookie remains on the user device and is sent with each HTTP request. Citrix Gateway encrypts the persistent cookie before sending it to the plug-in on the user device, and refreshes the cookie periodically as long as the session exists. The cookie becomes stale if the session ends. Available settings function as follows:
        * ALLOW - Enable persistent cookies. Users can open and edit Microsoft documents stored in SharePoint.
        * DENY - Disable persistent cookies. Users cannot open and edit Microsoft documents stored in SharePoint.
        * PROMPT - Prompt users to allow or deny persistent cookies during the session. Persistent cookies are not required for clientless access if users do not connect to SharePoint.
        Possible values = ALLOW, DENY, PROMPT
    .PARAMETER Allowedlogingroups
        Specify groups that have permission to log on to Citrix Gateway. Users who do not belong to this group or groups are denied access even if they have valid credentials.
    .PARAMETER Securebrowse
        Allow users to connect through Citrix Gateway to network resources from iOS and Android mobile devices with Citrix Receiver. Users do not need to establish a full VPN tunnel to access resources in the secure network.
        Possible values = ENABLED, DISABLED
    .PARAMETER Storefronturl
        Web address for StoreFront to be used in this session for enumeration of resources from XenApp or XenDesktop.
    .PARAMETER Sfgatewayauthtype
        The authentication type configured for the Citrix Gateway on StoreFront.
        Possible values = domain, RSA, domainAndRSA, SMS, smartCard, sfAuth, sfAuthAndRSA
    .PARAMETER Kcdaccount
        The kcd account details to be used in SSO.
    .PARAMETER Rdpclientprofilename
        Name of the RDP profile associated with the vserver.
    .PARAMETER Windowspluginupgrade
        Option to set plugin upgrade behaviour for Win.
        Possible values = Always, Essential, Never
    .PARAMETER Macpluginupgrade
        Option to set plugin upgrade behaviour for Mac.
        Possible values = Always, Essential, Never
    .PARAMETER Linuxpluginupgrade
        Option to set plugin upgrade behaviour for Linux.
        Possible values = Always, Essential, Never
    .PARAMETER Iconwithreceiver
        Option to decide whether to show plugin icon along with receiver.
        Possible values = ON, OFF
    .PARAMETER Alwaysonprofilename
        Name of the AlwaysON profile associated with the session action. The builtin profile named none can be used to explicitly disable AlwaysON for the session action.
    .PARAMETER Autoproxyurl
        URL to auto proxy config file.
    .PARAMETER Advancedclientlessvpnmode
        Option to enable/disable Advanced ClientlessVpnMode. Additionaly, it can be set to STRICT to block Classic ClientlessVpnMode while in AdvancedClientlessMode.
        Possible values = ENABLED, DISABLED, STRICT
    .PARAMETER Pcoipprofilename
        Name of the PCOIP profile associated with the session action. The builtin profile named none can be used to explicitly disable PCOIP for the session action.
    .PARAMETER Fqdnspoofedip
        Spoofed IP address range that can be used by client for FQDN based split tunneling.
    .PARAMETER Netmask
        The netmask for the spoofed ip address.
    .PARAMETER PassThru
        Return details about the created vpnsessionaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnsessionaction -name <string>
        An example how to add vpnsessionaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnsessionaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [string]$Useraccounting,

        [int[]]$Httpport,

        [string]$Winsip,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Dnsvservername,

        [ValidateSet('LOCAL', 'REMOTE', 'BOTH')]
        [string]$Splitdns,

        [double]$Sesstimeout,

        [string]$Clientsecurity,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Clientsecuritygroup,

        [ValidateLength(1, 127)]
        [string]$Clientsecuritymessage,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientsecuritylog,

        [ValidateSet('ON', 'OFF', 'REVERSE')]
        [string]$Splittunnel,

        [ValidateSet('ON', 'OFF')]
        [string]$Locallanaccess,

        [ValidateSet('ON', 'OFF')]
        [string]$Rfc1918,

        [ValidateSet('ON', 'OFF')]
        [string]$Spoofiip,

        [ValidateSet('ON', 'OFF')]
        [string]$Killconnections,

        [ValidateSet('ON', 'OFF')]
        [string]$Transparentinterception,

        [ValidateSet('AGENT', 'PLUGIN')]
        [string]$Windowsclienttype,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Defaultauthorizationaction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Authorizationgroup,

        [ValidateLength(1, 64)]
        [string]$Smartgroup,

        [ValidateRange(1, 9999)]
        [double]$Clientidletimeout,

        [ValidateSet('BROWSER', 'NS', 'OFF')]
        [string]$Proxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Allprotocolproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Httpproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Ftpproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Socksproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Gopherproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Sslproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Proxyexception,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Proxylocalbypass,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientcleanupprompt,

        [ValidateSet('none', 'all', 'cookie', 'addressbar', 'plugin', 'filesystemapplication', 'application', 'applicationdata', 'clientcertificate', 'autocomplete', 'cache')]
        [string[]]$Forcecleanup,

        [ValidateSet('none', 'all', 'services', 'filetransfer', 'configuration')]
        [string]$Clientoptions,

        [ValidateSet('none', 'trace')]
        [string[]]$Clientconfiguration,

        [ValidateSet('ON', 'OFF')]
        [string]$Sso,

        [ValidateSet('PRIMARY', 'SECONDARY')]
        [string]$Ssocredential,

        [ValidateSet('ON', 'OFF')]
        [string]$Windowsautologon,

        [ValidateSet('NS', 'OFF')]
        [string]$Usemip,

        [ValidateSet('NOSPILLOVER', 'SPILLOVER', 'OFF')]
        [string]$Useiip,

        [ValidateSet('debug', 'stats', 'events', 'OFF')]
        [string]$Clientdebug,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Loginscript,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Logoutscript,

        [string]$Homepage,

        [ValidateSet('ON', 'OFF')]
        [string]$Icaproxy,

        [string]$Wihome,

        [ValidateSet('IPV4', 'IPV6')]
        [string]$Wihomeaddresstype,

        [string]$Citrixreceiverhome,

        [ValidateSet('NORMAL', 'COMPACT')]
        [string]$Wiportalmode,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientchoices,

        [ValidateSet('AGENT', 'PLUGIN')]
        [string]$Epaclienttype,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Iipdnssuffix,

        [ValidateRange(1, 65535)]
        [double]$Forcedtimeout,

        [ValidateRange(1, 255)]
        [double]$Forcedtimeoutwarning,

        [ValidateLength(1, 32)]
        [string]$Ntdomain,

        [ValidateSet('ON', 'OFF', 'DISABLED')]
        [string]$Clientlessvpnmode,

        [string]$Emailhome,

        [ValidateSet('TRANSPARENT', 'OPAQUE', 'ENCRYPT')]
        [string]$Clientlessmodeurlencoding,

        [ValidateSet('ALLOW', 'DENY', 'PROMPT')]
        [string]$Clientlesspersistentcookie,

        [ValidateLength(1, 511)]
        [string]$Allowedlogingroups,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Securebrowse,

        [ValidateLength(1, 255)]
        [string]$Storefronturl,

        [ValidateSet('domain', 'RSA', 'domainAndRSA', 'SMS', 'smartCard', 'sfAuth', 'sfAuthAndRSA')]
        [string]$Sfgatewayauthtype,

        [ValidateLength(1, 32)]
        [string]$Kcdaccount,

        [ValidateLength(1, 31)]
        [string]$Rdpclientprofilename,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Windowspluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Macpluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Linuxpluginupgrade,

        [ValidateSet('ON', 'OFF')]
        [string]$Iconwithreceiver,

        [ValidateLength(1, 31)]
        [string]$Alwaysonprofilename,

        [string]$Autoproxyurl,

        [ValidateSet('ENABLED', 'DISABLED', 'STRICT')]
        [string]$Advancedclientlessvpnmode = 'DISABLED',

        [ValidateLength(1, 31)]
        [string]$Pcoipprofilename,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Fqdnspoofedip,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Netmask,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnsessionaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('useraccounting') ) { $payload.Add('useraccounting', $useraccounting) }
            if ( $PSBoundParameters.ContainsKey('httpport') ) { $payload.Add('httpport', $httpport) }
            if ( $PSBoundParameters.ContainsKey('winsip') ) { $payload.Add('winsip', $winsip) }
            if ( $PSBoundParameters.ContainsKey('dnsvservername') ) { $payload.Add('dnsvservername', $dnsvservername) }
            if ( $PSBoundParameters.ContainsKey('splitdns') ) { $payload.Add('splitdns', $splitdns) }
            if ( $PSBoundParameters.ContainsKey('sesstimeout') ) { $payload.Add('sesstimeout', $sesstimeout) }
            if ( $PSBoundParameters.ContainsKey('clientsecurity') ) { $payload.Add('clientsecurity', $clientsecurity) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritygroup') ) { $payload.Add('clientsecuritygroup', $clientsecuritygroup) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritymessage') ) { $payload.Add('clientsecuritymessage', $clientsecuritymessage) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritylog') ) { $payload.Add('clientsecuritylog', $clientsecuritylog) }
            if ( $PSBoundParameters.ContainsKey('splittunnel') ) { $payload.Add('splittunnel', $splittunnel) }
            if ( $PSBoundParameters.ContainsKey('locallanaccess') ) { $payload.Add('locallanaccess', $locallanaccess) }
            if ( $PSBoundParameters.ContainsKey('rfc1918') ) { $payload.Add('rfc1918', $rfc1918) }
            if ( $PSBoundParameters.ContainsKey('spoofiip') ) { $payload.Add('spoofiip', $spoofiip) }
            if ( $PSBoundParameters.ContainsKey('killconnections') ) { $payload.Add('killconnections', $killconnections) }
            if ( $PSBoundParameters.ContainsKey('transparentinterception') ) { $payload.Add('transparentinterception', $transparentinterception) }
            if ( $PSBoundParameters.ContainsKey('windowsclienttype') ) { $payload.Add('windowsclienttype', $windowsclienttype) }
            if ( $PSBoundParameters.ContainsKey('defaultauthorizationaction') ) { $payload.Add('defaultauthorizationaction', $defaultauthorizationaction) }
            if ( $PSBoundParameters.ContainsKey('authorizationgroup') ) { $payload.Add('authorizationgroup', $authorizationgroup) }
            if ( $PSBoundParameters.ContainsKey('smartgroup') ) { $payload.Add('smartgroup', $smartgroup) }
            if ( $PSBoundParameters.ContainsKey('clientidletimeout') ) { $payload.Add('clientidletimeout', $clientidletimeout) }
            if ( $PSBoundParameters.ContainsKey('proxy') ) { $payload.Add('proxy', $proxy) }
            if ( $PSBoundParameters.ContainsKey('allprotocolproxy') ) { $payload.Add('allprotocolproxy', $allprotocolproxy) }
            if ( $PSBoundParameters.ContainsKey('httpproxy') ) { $payload.Add('httpproxy', $httpproxy) }
            if ( $PSBoundParameters.ContainsKey('ftpproxy') ) { $payload.Add('ftpproxy', $ftpproxy) }
            if ( $PSBoundParameters.ContainsKey('socksproxy') ) { $payload.Add('socksproxy', $socksproxy) }
            if ( $PSBoundParameters.ContainsKey('gopherproxy') ) { $payload.Add('gopherproxy', $gopherproxy) }
            if ( $PSBoundParameters.ContainsKey('sslproxy') ) { $payload.Add('sslproxy', $sslproxy) }
            if ( $PSBoundParameters.ContainsKey('proxyexception') ) { $payload.Add('proxyexception', $proxyexception) }
            if ( $PSBoundParameters.ContainsKey('proxylocalbypass') ) { $payload.Add('proxylocalbypass', $proxylocalbypass) }
            if ( $PSBoundParameters.ContainsKey('clientcleanupprompt') ) { $payload.Add('clientcleanupprompt', $clientcleanupprompt) }
            if ( $PSBoundParameters.ContainsKey('forcecleanup') ) { $payload.Add('forcecleanup', $forcecleanup) }
            if ( $PSBoundParameters.ContainsKey('clientoptions') ) { $payload.Add('clientoptions', $clientoptions) }
            if ( $PSBoundParameters.ContainsKey('clientconfiguration') ) { $payload.Add('clientconfiguration', $clientconfiguration) }
            if ( $PSBoundParameters.ContainsKey('sso') ) { $payload.Add('sso', $sso) }
            if ( $PSBoundParameters.ContainsKey('ssocredential') ) { $payload.Add('ssocredential', $ssocredential) }
            if ( $PSBoundParameters.ContainsKey('windowsautologon') ) { $payload.Add('windowsautologon', $windowsautologon) }
            if ( $PSBoundParameters.ContainsKey('usemip') ) { $payload.Add('usemip', $usemip) }
            if ( $PSBoundParameters.ContainsKey('useiip') ) { $payload.Add('useiip', $useiip) }
            if ( $PSBoundParameters.ContainsKey('clientdebug') ) { $payload.Add('clientdebug', $clientdebug) }
            if ( $PSBoundParameters.ContainsKey('loginscript') ) { $payload.Add('loginscript', $loginscript) }
            if ( $PSBoundParameters.ContainsKey('logoutscript') ) { $payload.Add('logoutscript', $logoutscript) }
            if ( $PSBoundParameters.ContainsKey('homepage') ) { $payload.Add('homepage', $homepage) }
            if ( $PSBoundParameters.ContainsKey('icaproxy') ) { $payload.Add('icaproxy', $icaproxy) }
            if ( $PSBoundParameters.ContainsKey('wihome') ) { $payload.Add('wihome', $wihome) }
            if ( $PSBoundParameters.ContainsKey('wihomeaddresstype') ) { $payload.Add('wihomeaddresstype', $wihomeaddresstype) }
            if ( $PSBoundParameters.ContainsKey('citrixreceiverhome') ) { $payload.Add('citrixreceiverhome', $citrixreceiverhome) }
            if ( $PSBoundParameters.ContainsKey('wiportalmode') ) { $payload.Add('wiportalmode', $wiportalmode) }
            if ( $PSBoundParameters.ContainsKey('clientchoices') ) { $payload.Add('clientchoices', $clientchoices) }
            if ( $PSBoundParameters.ContainsKey('epaclienttype') ) { $payload.Add('epaclienttype', $epaclienttype) }
            if ( $PSBoundParameters.ContainsKey('iipdnssuffix') ) { $payload.Add('iipdnssuffix', $iipdnssuffix) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeout') ) { $payload.Add('forcedtimeout', $forcedtimeout) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeoutwarning') ) { $payload.Add('forcedtimeoutwarning', $forcedtimeoutwarning) }
            if ( $PSBoundParameters.ContainsKey('ntdomain') ) { $payload.Add('ntdomain', $ntdomain) }
            if ( $PSBoundParameters.ContainsKey('clientlessvpnmode') ) { $payload.Add('clientlessvpnmode', $clientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('emailhome') ) { $payload.Add('emailhome', $emailhome) }
            if ( $PSBoundParameters.ContainsKey('clientlessmodeurlencoding') ) { $payload.Add('clientlessmodeurlencoding', $clientlessmodeurlencoding) }
            if ( $PSBoundParameters.ContainsKey('clientlesspersistentcookie') ) { $payload.Add('clientlesspersistentcookie', $clientlesspersistentcookie) }
            if ( $PSBoundParameters.ContainsKey('allowedlogingroups') ) { $payload.Add('allowedlogingroups', $allowedlogingroups) }
            if ( $PSBoundParameters.ContainsKey('securebrowse') ) { $payload.Add('securebrowse', $securebrowse) }
            if ( $PSBoundParameters.ContainsKey('storefronturl') ) { $payload.Add('storefronturl', $storefronturl) }
            if ( $PSBoundParameters.ContainsKey('sfgatewayauthtype') ) { $payload.Add('sfgatewayauthtype', $sfgatewayauthtype) }
            if ( $PSBoundParameters.ContainsKey('kcdaccount') ) { $payload.Add('kcdaccount', $kcdaccount) }
            if ( $PSBoundParameters.ContainsKey('rdpclientprofilename') ) { $payload.Add('rdpclientprofilename', $rdpclientprofilename) }
            if ( $PSBoundParameters.ContainsKey('windowspluginupgrade') ) { $payload.Add('windowspluginupgrade', $windowspluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('macpluginupgrade') ) { $payload.Add('macpluginupgrade', $macpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('linuxpluginupgrade') ) { $payload.Add('linuxpluginupgrade', $linuxpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('iconwithreceiver') ) { $payload.Add('iconwithreceiver', $iconwithreceiver) }
            if ( $PSBoundParameters.ContainsKey('alwaysonprofilename') ) { $payload.Add('alwaysonprofilename', $alwaysonprofilename) }
            if ( $PSBoundParameters.ContainsKey('autoproxyurl') ) { $payload.Add('autoproxyurl', $autoproxyurl) }
            if ( $PSBoundParameters.ContainsKey('advancedclientlessvpnmode') ) { $payload.Add('advancedclientlessvpnmode', $advancedclientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('pcoipprofilename') ) { $payload.Add('pcoipprofilename', $pcoipprofilename) }
            if ( $PSBoundParameters.ContainsKey('fqdnspoofedip') ) { $payload.Add('fqdnspoofedip', $fqdnspoofedip) }
            if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) }
            if ( $PSCmdlet.ShouldProcess("vpnsessionaction", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnsessionaction -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-ADCGetVpnsessionaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnsessionaction: Finished"
    }
}

function Invoke-ADCDeleteVpnsessionaction {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN session action resource.
    .PARAMETER Name
        Name for the Citrix Gateway profile (action). Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnsessionaction -Name <string>
        An example how to delete vpnsessionaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnsessionaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnsessionaction: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnsessionaction -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-ADCDeleteVpnsessionaction: Finished"
    }
}

function Invoke-ADCUpdateVpnsessionaction {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN session action resource.
    .PARAMETER Name
        Name for the Citrix Gateway profile (action). Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .PARAMETER Useraccounting
        The name of the radiusPolicy to use for RADIUS user accounting info on the session.
    .PARAMETER Httpport
        Destination port numbers other than port 80, added as a comma-separated list. Traffic to these ports is processed as HTTP traffic, which allows functionality, such as HTTP authorization and single sign-on to a web application to work.
    .PARAMETER Winsip
        WINS server IP address to add to Citrix Gateway for name resolution.
    .PARAMETER Dnsvservername
        Name of the DNS virtual server for the user session.
    .PARAMETER Splitdns
        Route the DNS requests to the local DNS server configured on the user device, or Citrix Gateway (remote), or both.
        Possible values = LOCAL, REMOTE, BOTH
    .PARAMETER Sesstimeout
        Number of minutes after which the session times out.
    .PARAMETER Clientsecurity
        Specify the client security check for the user device to permit a Citrix Gateway session. The web address or IP address is not included in the expression for the client security check.
    .PARAMETER Clientsecuritygroup
        The client security group that will be assigned on failure of the client security check. Users can in general be organized into Groups. In this case, the Client Security Group may have a more restrictive security policy.
    .PARAMETER Clientsecuritymessage
        The client security message that will be displayed on failure of the client security check.
    .PARAMETER Clientsecuritylog
        Set the logging of client security checks.
        Possible values = ON, OFF
    .PARAMETER Splittunnel
        Send, through the tunnel, traffic only for intranet applications that are defined in Citrix Gateway. Route all other traffic directly to the Internet. The OFF setting routes all traffic through Citrix Gateway. With the REVERSE setting, intranet applications define the network traffic that is not intercepted. All network traffic directed to internal IP addresses bypasses the VPN tunnel, while other traffic goes through Citrix Gateway. Reverse split tunneling can be used to log all non-local LAN traffic. For example, if users have a home network and are logged on through the Citrix Gateway Plug-in, network traffic destined to a printer or another device within the home network is not intercepted.
        Possible values = ON, OFF, REVERSE
    .PARAMETER Locallanaccess
        Set local LAN access. If split tunneling is OFF, and you set local LAN access to ON, the local client can route traffic to its local interface. When the local area network switch is specified, this combination of switches is useful. The client can allow local LAN access to devices that commonly have non-routable addresses, such as local printers or local file servers.
        Possible values = ON, OFF
    .PARAMETER Rfc1918
        As defined in the local area network, allow only the following local area network addresses to bypass the VPN tunnel when the local LAN access feature is enabled:
        * 10.*.*.*,
        * 172.16.*.*,
        * 192.168.*.*.
        Possible values = ON, OFF
    .PARAMETER Spoofiip
        IP address that the intranet application uses to route the connection through the virtual adapter.
        Possible values = ON, OFF
    .PARAMETER Killconnections
        Specify whether the Citrix Gateway Plug-in should disconnect all preexisting connections, such as the connections existing before the user logged on to Citrix Gateway, and prevent new incoming connections on the Citrix Gateway Plug-in for Windows and MAC when the user is connected to Citrix Gateway and split tunneling is disabled.
        Possible values = ON, OFF
    .PARAMETER Transparentinterception
        Allow access to network resources by using a single IP address and subnet mask or a range of IP addresses. The OFF setting sets the mode to proxy, in which you configure destination and source IP addresses and port numbers. If you are using the Citrix Gateway Plug-in for Windows, set this parameter to ON, in which the mode is set to transparent. If you are using the Citrix Gateway Plug-in for Java, set this parameter to OFF.
        Possible values = ON, OFF
    .PARAMETER Windowsclienttype
        Choose between two types of Windows Client\
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed\
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Defaultauthorizationaction
        Specify the network resources that users have access to when they log on to the internal network. The default setting for authorization is to deny access to all network resources. Citrix recommends using the default global setting and then creating authorization policies to define the network resources users can access. If you set the default authorization policy to DENY, you must explicitly authorize access to any network resource, which improves security.
        Possible values = ALLOW, DENY
    .PARAMETER Authorizationgroup
        Comma-separated list of groups in which the user is placed when none of the groups that the user is a part of is configured on Citrix Gateway. The authorization policy can be bound to these groups to control access to the resources.
    .PARAMETER Smartgroup
        This is the default group that is chosen when the authentication succeeds in addition to extracted groups.
    .PARAMETER Clientidletimeout
        Time, in minutes, after which to time out the user session if Citrix Gateway does not detect mouse or keyboard activity.
    .PARAMETER Proxy
        Set options to apply proxy for accessing the internal resources. Available settings function as follows:
        * BROWSER - Proxy settings are configured only in Internet Explorer and Firefox browsers.
        * NS - Proxy settings are configured on the Citrix ADC.
        * OFF - Proxy settings are not configured.
        Possible values = BROWSER, NS, OFF
    .PARAMETER Allprotocolproxy
        IP address of the proxy server to use for all protocols supported by Citrix Gateway.
    .PARAMETER Httpproxy
        IP address of the proxy server to be used for HTTP access for all subsequent connections to the internal network.
    .PARAMETER Ftpproxy
        IP address of the proxy server to be used for FTP access for all subsequent connections to the internal network.
    .PARAMETER Socksproxy
        IP address of the proxy server to be used for SOCKS access for all subsequent connections to the internal network.
    .PARAMETER Gopherproxy
        IP address of the proxy server to be used for GOPHER access for all subsequent connections to the internal network.
    .PARAMETER Sslproxy
        IP address of the proxy server to be used for SSL access for all subsequent connections to the internal network.
    .PARAMETER Proxyexception
        Proxy exception string that will be configured in the browser for bypassing the previously configured proxies. Allowed only if proxy type is Browser.
    .PARAMETER Proxylocalbypass
        Bypass proxy server for local addresses option in Internet Explorer and Firefox proxy server settings.
        Possible values = ENABLED, DISABLED
    .PARAMETER Clientcleanupprompt
        Prompt for client-side cache clean-up when a client-initiated session closes.
        Possible values = ON, OFF
    .PARAMETER Forcecleanup
        Force cache clean-up when the user closes a session. You can specify all, none, or any combination of the client-side items.
        Possible values = none, all, cookie, addressbar, plugin, filesystemapplication, application, applicationdata, clientcertificate, autocomplete, cache
    .PARAMETER Clientoptions
        Display only the configured menu options when you select the "Configure Citrix Gateway" option in the Citrix Gateway Plug-in system tray icon for Windows.
        Possible values = none, all, services, filetransfer, configuration
    .PARAMETER Clientconfiguration
        Allow users to change client Debug logging level in Configuration tab of the Citrix Gateway Plug-in for Windows.
        Possible values = none, trace
    .PARAMETER Sso
        Set single sign-on (SSO) for the session. When the user accesses a server, the user's logon credentials are passed to the server for authentication.
        NOTE : This configuration does not honor the following authentication types for security reason. BASIC, DIGEST, and NTLM (without Negotiate NTLM2 Key or Negotiate Sign Flag). Use VPN TrafficAction to configure SSO for these authentication types.
        Possible values = ON, OFF
    .PARAMETER Ssocredential
        Specify whether to use the primary or secondary authentication credentials for single sign-on to the server.
        Possible values = PRIMARY, SECONDARY
    .PARAMETER Windowsautologon
        Enable or disable the Windows Auto Logon for the session. If a VPN session is established after this setting is enabled, the user is automatically logged on by using Windows credentials after the system is restarted.
        Possible values = ON, OFF
    .PARAMETER Usemip
        Enable or disable the use of a unique IP address alias, or a mapped IP address, as the client IP address for each client session. Allow Citrix Gateway to use the mapped IP address as an intranet IP address when all other IP addresses are not available.
        When IP pooling is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        Possible values = NS, OFF
    .PARAMETER Useiip
        Define IP address pool options. Available settings function as follows:
        * SPILLOVER - When an address pool is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        * NOSPILLOVER - When intranet IP addresses are enabled and the mapped IP address is not used, the Transfer Login page appears for users who have used all available intranet IP addresses.
        * OFF - Address pool is not configured.
        Possible values = NOSPILLOVER, SPILLOVER, OFF
    .PARAMETER Clientdebug
        Set the trace level on Citrix Gateway. Technical support technicians use these debug logs for in-depth debugging and troubleshooting purposes. Available settings function as follows:
        * DEBUG - Detailed debug messages are collected and written into the specified file.
        * STATS - Application audit level error messages and debug statistic counters are written into the specified file.
        * EVENTS - Application audit-level error messages are written into the specified file.
        * OFF - Only critical events are logged into the Windows Application Log.
        Possible values = debug, stats, events, OFF
    .PARAMETER Loginscript
        Path to the logon script that is run when a session is established. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Logoutscript
        Path to the logout script. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Homepage
        Web address of the home page that appears when users log on. Otherwise, users receive the default home page for Citrix Gateway, which is the Access Interface.
    .PARAMETER Icaproxy
        Enable ICA proxy to configure secure Internet access to servers running Citrix XenApp or XenDesktop by using Citrix Receiver instead of the Citrix Gateway Plug-in.
        Possible values = ON, OFF
    .PARAMETER Wihome
        Web address of the Web Interface server, such as http://<ipAddress>/Citrix/XenApp, or Receiver for Web, which enumerates the virtualized resources, such as XenApp, XenDesktop, and cloud applications. This web address is used as the home page in ICA proxy mode.
        If Client Choices is ON, you must configure this setting. Because the user can choose between FullClient and ICAProxy, the user may see a different home page. An Internet web site may appear if the user gets the FullClient option, or a Web Interface site if the user gets the ICAProxy option. If the setting is not configured, the XenApp option does not appear as a client choice.
    .PARAMETER Wihomeaddresstype
        Type of the wihome address(IPV4/V6).
        Possible values = IPV4, IPV6
    .PARAMETER Citrixreceiverhome
        Web address for the Citrix Receiver home page. Configure Citrix Gateway so that when users log on to the appliance, the Citrix Gateway Plug-in opens a web browser that allows single sign-on to the Citrix Receiver home page.
    .PARAMETER Wiportalmode
        Layout on the Access Interface. The COMPACT value indicates the use of small icons.
        Possible values = NORMAL, COMPACT
    .PARAMETER Clientchoices
        Provide users with multiple logon options. With client choices, users have the option of logging on by using the Citrix Gateway Plug-in for Windows, Citrix Gateway Plug-in for Java, the Web Interface, or clientless access from one location. Depending on how Citrix Gateway is configured, users are presented with up to three icons for logon choices. The most common are the Citrix Gateway Plug-in for Windows, Web Interface, and clientless access.
        Possible values = ON, OFF
    .PARAMETER Epaclienttype
        Choose between two types of End point Windows Client
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Iipdnssuffix
        An intranet IP DNS suffix. When a user logs on to Citrix Gateway and is assigned an IP address, a DNS record for the user name and IP address combination is added to the Citrix Gateway DNS cache. You can configure a DNS suffix to append to the user name when the DNS record is added to the cache. You can reach to the host from where the user is logged on by using the user's name, which can be easier to remember than an IP address. When the user logs off from Citrix Gateway, the record is removed from the DNS cache.
    .PARAMETER Forcedtimeout
        Force a disconnection from the Citrix Gateway Plug-in with Citrix Gateway after a specified number of minutes. If the session closes, the user must log on again.
    .PARAMETER Forcedtimeoutwarning
        Number of minutes to warn a user before the user session is disconnected.
    .PARAMETER Ntdomain
        Single sign-on domain to use for single sign-on to applications in the internal network. This setting can be overwritten by the domain that users specify at the time of logon or by the domain that the authentication server returns.
    .PARAMETER Clientlessvpnmode
        Enable clientless access for web, XenApp or XenDesktop, and FileShare resources without installing the Citrix Gateway Plug-in. Available settings function as follows:
        * ON - Allow only clientless access.
        * OFF - Allow clientless access after users log on with the Citrix Gateway Plug-in.
        * DISABLED - Do not allow clientless access.
        Possible values = ON, OFF, DISABLED
    .PARAMETER Emailhome
        Web address for the web-based email, such as Outlook Web Access.
    .PARAMETER Clientlessmodeurlencoding
        When clientless access is enabled, you can choose to encode the addresses of internal web applications or to leave the address as clear text. Available settings function as follows:
        * OPAQUE - Use standard encoding mechanisms to make the domain and protocol part of the resource unclear to users.
        * CLEAR - Do not encode the web address and make it visible to users.
        * ENCRYPT - Allow the domain and protocol to be encrypted using a session key. When the web address is encrypted, the URL is different for each user session for the same web resource. If users bookmark the encoded web address, save it in the web browser and then log off, they cannot connect to the web address when they log on and use the bookmark. If users save the encrypted bookmark in the Access Interface during their session, the bookmark works each time the user logs on.
        Possible values = TRANSPARENT, OPAQUE, ENCRYPT
    .PARAMETER Clientlesspersistentcookie
        State of persistent cookies in clientless access mode. Persistent cookies are required for accessing certain features of SharePoint, such as opening and editing Microsoft Word, Excel, and PowerPoint documents hosted on the SharePoint server. A persistent cookie remains on the user device and is sent with each HTTP request. Citrix Gateway encrypts the persistent cookie before sending it to the plug-in on the user device, and refreshes the cookie periodically as long as the session exists. The cookie becomes stale if the session ends. Available settings function as follows:
        * ALLOW - Enable persistent cookies. Users can open and edit Microsoft documents stored in SharePoint.
        * DENY - Disable persistent cookies. Users cannot open and edit Microsoft documents stored in SharePoint.
        * PROMPT - Prompt users to allow or deny persistent cookies during the session. Persistent cookies are not required for clientless access if users do not connect to SharePoint.
        Possible values = ALLOW, DENY, PROMPT
    .PARAMETER Allowedlogingroups
        Specify groups that have permission to log on to Citrix Gateway. Users who do not belong to this group or groups are denied access even if they have valid credentials.
    .PARAMETER Securebrowse
        Allow users to connect through Citrix Gateway to network resources from iOS and Android mobile devices with Citrix Receiver. Users do not need to establish a full VPN tunnel to access resources in the secure network.
        Possible values = ENABLED, DISABLED
    .PARAMETER Storefronturl
        Web address for StoreFront to be used in this session for enumeration of resources from XenApp or XenDesktop.
    .PARAMETER Sfgatewayauthtype
        The authentication type configured for the Citrix Gateway on StoreFront.
        Possible values = domain, RSA, domainAndRSA, SMS, smartCard, sfAuth, sfAuthAndRSA
    .PARAMETER Kcdaccount
        The kcd account details to be used in SSO.
    .PARAMETER Rdpclientprofilename
        Name of the RDP profile associated with the vserver.
    .PARAMETER Windowspluginupgrade
        Option to set plugin upgrade behaviour for Win.
        Possible values = Always, Essential, Never
    .PARAMETER Macpluginupgrade
        Option to set plugin upgrade behaviour for Mac.
        Possible values = Always, Essential, Never
    .PARAMETER Linuxpluginupgrade
        Option to set plugin upgrade behaviour for Linux.
        Possible values = Always, Essential, Never
    .PARAMETER Iconwithreceiver
        Option to decide whether to show plugin icon along with receiver.
        Possible values = ON, OFF
    .PARAMETER Alwaysonprofilename
        Name of the AlwaysON profile associated with the session action. The builtin profile named none can be used to explicitly disable AlwaysON for the session action.
    .PARAMETER Autoproxyurl
        URL to auto proxy config file.
    .PARAMETER Advancedclientlessvpnmode
        Option to enable/disable Advanced ClientlessVpnMode. Additionaly, it can be set to STRICT to block Classic ClientlessVpnMode while in AdvancedClientlessMode.
        Possible values = ENABLED, DISABLED, STRICT
    .PARAMETER Pcoipprofilename
        Name of the PCOIP profile associated with the session action. The builtin profile named none can be used to explicitly disable PCOIP for the session action.
    .PARAMETER Fqdnspoofedip
        Spoofed IP address range that can be used by client for FQDN based split tunneling.
    .PARAMETER Netmask
        The netmask for the spoofed ip address.
    .PARAMETER PassThru
        Return details about the created vpnsessionaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnsessionaction -name <string>
        An example how to update vpnsessionaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnsessionaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [string]$Useraccounting,

        [int[]]$Httpport,

        [string]$Winsip,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Dnsvservername,

        [ValidateSet('LOCAL', 'REMOTE', 'BOTH')]
        [string]$Splitdns,

        [double]$Sesstimeout,

        [string]$Clientsecurity,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Clientsecuritygroup,

        [ValidateLength(1, 127)]
        [string]$Clientsecuritymessage,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientsecuritylog,

        [ValidateSet('ON', 'OFF', 'REVERSE')]
        [string]$Splittunnel,

        [ValidateSet('ON', 'OFF')]
        [string]$Locallanaccess,

        [ValidateSet('ON', 'OFF')]
        [string]$Rfc1918,

        [ValidateSet('ON', 'OFF')]
        [string]$Spoofiip,

        [ValidateSet('ON', 'OFF')]
        [string]$Killconnections,

        [ValidateSet('ON', 'OFF')]
        [string]$Transparentinterception,

        [ValidateSet('AGENT', 'PLUGIN')]
        [string]$Windowsclienttype,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Defaultauthorizationaction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Authorizationgroup,

        [ValidateLength(1, 64)]
        [string]$Smartgroup,

        [ValidateRange(1, 9999)]
        [double]$Clientidletimeout,

        [ValidateSet('BROWSER', 'NS', 'OFF')]
        [string]$Proxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Allprotocolproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Httpproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Ftpproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Socksproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Gopherproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Sslproxy,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Proxyexception,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Proxylocalbypass,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientcleanupprompt,

        [ValidateSet('none', 'all', 'cookie', 'addressbar', 'plugin', 'filesystemapplication', 'application', 'applicationdata', 'clientcertificate', 'autocomplete', 'cache')]
        [string[]]$Forcecleanup,

        [ValidateSet('none', 'all', 'services', 'filetransfer', 'configuration')]
        [string]$Clientoptions,

        [ValidateSet('none', 'trace')]
        [string[]]$Clientconfiguration,

        [ValidateSet('ON', 'OFF')]
        [string]$Sso,

        [ValidateSet('PRIMARY', 'SECONDARY')]
        [string]$Ssocredential,

        [ValidateSet('ON', 'OFF')]
        [string]$Windowsautologon,

        [ValidateSet('NS', 'OFF')]
        [string]$Usemip,

        [ValidateSet('NOSPILLOVER', 'SPILLOVER', 'OFF')]
        [string]$Useiip,

        [ValidateSet('debug', 'stats', 'events', 'OFF')]
        [string]$Clientdebug,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Loginscript,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Logoutscript,

        [string]$Homepage,

        [ValidateSet('ON', 'OFF')]
        [string]$Icaproxy,

        [string]$Wihome,

        [ValidateSet('IPV4', 'IPV6')]
        [string]$Wihomeaddresstype,

        [string]$Citrixreceiverhome,

        [ValidateSet('NORMAL', 'COMPACT')]
        [string]$Wiportalmode,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientchoices,

        [ValidateSet('AGENT', 'PLUGIN')]
        [string]$Epaclienttype,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Iipdnssuffix,

        [ValidateRange(1, 65535)]
        [double]$Forcedtimeout,

        [ValidateRange(1, 255)]
        [double]$Forcedtimeoutwarning,

        [ValidateLength(1, 32)]
        [string]$Ntdomain,

        [ValidateSet('ON', 'OFF', 'DISABLED')]
        [string]$Clientlessvpnmode,

        [string]$Emailhome,

        [ValidateSet('TRANSPARENT', 'OPAQUE', 'ENCRYPT')]
        [string]$Clientlessmodeurlencoding,

        [ValidateSet('ALLOW', 'DENY', 'PROMPT')]
        [string]$Clientlesspersistentcookie,

        [ValidateLength(1, 511)]
        [string]$Allowedlogingroups,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Securebrowse,

        [ValidateLength(1, 255)]
        [string]$Storefronturl,

        [ValidateSet('domain', 'RSA', 'domainAndRSA', 'SMS', 'smartCard', 'sfAuth', 'sfAuthAndRSA')]
        [string]$Sfgatewayauthtype,

        [ValidateLength(1, 32)]
        [string]$Kcdaccount,

        [ValidateLength(1, 31)]
        [string]$Rdpclientprofilename,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Windowspluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Macpluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Linuxpluginupgrade,

        [ValidateSet('ON', 'OFF')]
        [string]$Iconwithreceiver,

        [ValidateLength(1, 31)]
        [string]$Alwaysonprofilename,

        [string]$Autoproxyurl,

        [ValidateSet('ENABLED', 'DISABLED', 'STRICT')]
        [string]$Advancedclientlessvpnmode,

        [ValidateLength(1, 31)]
        [string]$Pcoipprofilename,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Fqdnspoofedip,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Netmask,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnsessionaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('useraccounting') ) { $payload.Add('useraccounting', $useraccounting) }
            if ( $PSBoundParameters.ContainsKey('httpport') ) { $payload.Add('httpport', $httpport) }
            if ( $PSBoundParameters.ContainsKey('winsip') ) { $payload.Add('winsip', $winsip) }
            if ( $PSBoundParameters.ContainsKey('dnsvservername') ) { $payload.Add('dnsvservername', $dnsvservername) }
            if ( $PSBoundParameters.ContainsKey('splitdns') ) { $payload.Add('splitdns', $splitdns) }
            if ( $PSBoundParameters.ContainsKey('sesstimeout') ) { $payload.Add('sesstimeout', $sesstimeout) }
            if ( $PSBoundParameters.ContainsKey('clientsecurity') ) { $payload.Add('clientsecurity', $clientsecurity) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritygroup') ) { $payload.Add('clientsecuritygroup', $clientsecuritygroup) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritymessage') ) { $payload.Add('clientsecuritymessage', $clientsecuritymessage) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritylog') ) { $payload.Add('clientsecuritylog', $clientsecuritylog) }
            if ( $PSBoundParameters.ContainsKey('splittunnel') ) { $payload.Add('splittunnel', $splittunnel) }
            if ( $PSBoundParameters.ContainsKey('locallanaccess') ) { $payload.Add('locallanaccess', $locallanaccess) }
            if ( $PSBoundParameters.ContainsKey('rfc1918') ) { $payload.Add('rfc1918', $rfc1918) }
            if ( $PSBoundParameters.ContainsKey('spoofiip') ) { $payload.Add('spoofiip', $spoofiip) }
            if ( $PSBoundParameters.ContainsKey('killconnections') ) { $payload.Add('killconnections', $killconnections) }
            if ( $PSBoundParameters.ContainsKey('transparentinterception') ) { $payload.Add('transparentinterception', $transparentinterception) }
            if ( $PSBoundParameters.ContainsKey('windowsclienttype') ) { $payload.Add('windowsclienttype', $windowsclienttype) }
            if ( $PSBoundParameters.ContainsKey('defaultauthorizationaction') ) { $payload.Add('defaultauthorizationaction', $defaultauthorizationaction) }
            if ( $PSBoundParameters.ContainsKey('authorizationgroup') ) { $payload.Add('authorizationgroup', $authorizationgroup) }
            if ( $PSBoundParameters.ContainsKey('smartgroup') ) { $payload.Add('smartgroup', $smartgroup) }
            if ( $PSBoundParameters.ContainsKey('clientidletimeout') ) { $payload.Add('clientidletimeout', $clientidletimeout) }
            if ( $PSBoundParameters.ContainsKey('proxy') ) { $payload.Add('proxy', $proxy) }
            if ( $PSBoundParameters.ContainsKey('allprotocolproxy') ) { $payload.Add('allprotocolproxy', $allprotocolproxy) }
            if ( $PSBoundParameters.ContainsKey('httpproxy') ) { $payload.Add('httpproxy', $httpproxy) }
            if ( $PSBoundParameters.ContainsKey('ftpproxy') ) { $payload.Add('ftpproxy', $ftpproxy) }
            if ( $PSBoundParameters.ContainsKey('socksproxy') ) { $payload.Add('socksproxy', $socksproxy) }
            if ( $PSBoundParameters.ContainsKey('gopherproxy') ) { $payload.Add('gopherproxy', $gopherproxy) }
            if ( $PSBoundParameters.ContainsKey('sslproxy') ) { $payload.Add('sslproxy', $sslproxy) }
            if ( $PSBoundParameters.ContainsKey('proxyexception') ) { $payload.Add('proxyexception', $proxyexception) }
            if ( $PSBoundParameters.ContainsKey('proxylocalbypass') ) { $payload.Add('proxylocalbypass', $proxylocalbypass) }
            if ( $PSBoundParameters.ContainsKey('clientcleanupprompt') ) { $payload.Add('clientcleanupprompt', $clientcleanupprompt) }
            if ( $PSBoundParameters.ContainsKey('forcecleanup') ) { $payload.Add('forcecleanup', $forcecleanup) }
            if ( $PSBoundParameters.ContainsKey('clientoptions') ) { $payload.Add('clientoptions', $clientoptions) }
            if ( $PSBoundParameters.ContainsKey('clientconfiguration') ) { $payload.Add('clientconfiguration', $clientconfiguration) }
            if ( $PSBoundParameters.ContainsKey('sso') ) { $payload.Add('sso', $sso) }
            if ( $PSBoundParameters.ContainsKey('ssocredential') ) { $payload.Add('ssocredential', $ssocredential) }
            if ( $PSBoundParameters.ContainsKey('windowsautologon') ) { $payload.Add('windowsautologon', $windowsautologon) }
            if ( $PSBoundParameters.ContainsKey('usemip') ) { $payload.Add('usemip', $usemip) }
            if ( $PSBoundParameters.ContainsKey('useiip') ) { $payload.Add('useiip', $useiip) }
            if ( $PSBoundParameters.ContainsKey('clientdebug') ) { $payload.Add('clientdebug', $clientdebug) }
            if ( $PSBoundParameters.ContainsKey('loginscript') ) { $payload.Add('loginscript', $loginscript) }
            if ( $PSBoundParameters.ContainsKey('logoutscript') ) { $payload.Add('logoutscript', $logoutscript) }
            if ( $PSBoundParameters.ContainsKey('homepage') ) { $payload.Add('homepage', $homepage) }
            if ( $PSBoundParameters.ContainsKey('icaproxy') ) { $payload.Add('icaproxy', $icaproxy) }
            if ( $PSBoundParameters.ContainsKey('wihome') ) { $payload.Add('wihome', $wihome) }
            if ( $PSBoundParameters.ContainsKey('wihomeaddresstype') ) { $payload.Add('wihomeaddresstype', $wihomeaddresstype) }
            if ( $PSBoundParameters.ContainsKey('citrixreceiverhome') ) { $payload.Add('citrixreceiverhome', $citrixreceiverhome) }
            if ( $PSBoundParameters.ContainsKey('wiportalmode') ) { $payload.Add('wiportalmode', $wiportalmode) }
            if ( $PSBoundParameters.ContainsKey('clientchoices') ) { $payload.Add('clientchoices', $clientchoices) }
            if ( $PSBoundParameters.ContainsKey('epaclienttype') ) { $payload.Add('epaclienttype', $epaclienttype) }
            if ( $PSBoundParameters.ContainsKey('iipdnssuffix') ) { $payload.Add('iipdnssuffix', $iipdnssuffix) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeout') ) { $payload.Add('forcedtimeout', $forcedtimeout) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeoutwarning') ) { $payload.Add('forcedtimeoutwarning', $forcedtimeoutwarning) }
            if ( $PSBoundParameters.ContainsKey('ntdomain') ) { $payload.Add('ntdomain', $ntdomain) }
            if ( $PSBoundParameters.ContainsKey('clientlessvpnmode') ) { $payload.Add('clientlessvpnmode', $clientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('emailhome') ) { $payload.Add('emailhome', $emailhome) }
            if ( $PSBoundParameters.ContainsKey('clientlessmodeurlencoding') ) { $payload.Add('clientlessmodeurlencoding', $clientlessmodeurlencoding) }
            if ( $PSBoundParameters.ContainsKey('clientlesspersistentcookie') ) { $payload.Add('clientlesspersistentcookie', $clientlesspersistentcookie) }
            if ( $PSBoundParameters.ContainsKey('allowedlogingroups') ) { $payload.Add('allowedlogingroups', $allowedlogingroups) }
            if ( $PSBoundParameters.ContainsKey('securebrowse') ) { $payload.Add('securebrowse', $securebrowse) }
            if ( $PSBoundParameters.ContainsKey('storefronturl') ) { $payload.Add('storefronturl', $storefronturl) }
            if ( $PSBoundParameters.ContainsKey('sfgatewayauthtype') ) { $payload.Add('sfgatewayauthtype', $sfgatewayauthtype) }
            if ( $PSBoundParameters.ContainsKey('kcdaccount') ) { $payload.Add('kcdaccount', $kcdaccount) }
            if ( $PSBoundParameters.ContainsKey('rdpclientprofilename') ) { $payload.Add('rdpclientprofilename', $rdpclientprofilename) }
            if ( $PSBoundParameters.ContainsKey('windowspluginupgrade') ) { $payload.Add('windowspluginupgrade', $windowspluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('macpluginupgrade') ) { $payload.Add('macpluginupgrade', $macpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('linuxpluginupgrade') ) { $payload.Add('linuxpluginupgrade', $linuxpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('iconwithreceiver') ) { $payload.Add('iconwithreceiver', $iconwithreceiver) }
            if ( $PSBoundParameters.ContainsKey('alwaysonprofilename') ) { $payload.Add('alwaysonprofilename', $alwaysonprofilename) }
            if ( $PSBoundParameters.ContainsKey('autoproxyurl') ) { $payload.Add('autoproxyurl', $autoproxyurl) }
            if ( $PSBoundParameters.ContainsKey('advancedclientlessvpnmode') ) { $payload.Add('advancedclientlessvpnmode', $advancedclientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('pcoipprofilename') ) { $payload.Add('pcoipprofilename', $pcoipprofilename) }
            if ( $PSBoundParameters.ContainsKey('fqdnspoofedip') ) { $payload.Add('fqdnspoofedip', $fqdnspoofedip) }
            if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) }
            if ( $PSCmdlet.ShouldProcess("vpnsessionaction", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnsessionaction -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-ADCGetVpnsessionaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnsessionaction: Finished"
    }
}

function Invoke-ADCUnsetVpnsessionaction {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN session action resource.
    .PARAMETER Name
        Name for the Citrix Gateway profile (action). Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .PARAMETER Useraccounting
        The name of the radiusPolicy to use for RADIUS user accounting info on the session.
    .PARAMETER Httpport
        Destination port numbers other than port 80, added as a comma-separated list. Traffic to these ports is processed as HTTP traffic, which allows functionality, such as HTTP authorization and single sign-on to a web application to work.
    .PARAMETER Winsip
        WINS server IP address to add to Citrix Gateway for name resolution.
    .PARAMETER Dnsvservername
        Name of the DNS virtual server for the user session.
    .PARAMETER Splitdns
        Route the DNS requests to the local DNS server configured on the user device, or Citrix Gateway (remote), or both.
        Possible values = LOCAL, REMOTE, BOTH
    .PARAMETER Sesstimeout
        Number of minutes after which the session times out.
    .PARAMETER Clientsecurity
        Specify the client security check for the user device to permit a Citrix Gateway session. The web address or IP address is not included in the expression for the client security check.
    .PARAMETER Clientsecuritygroup
        The client security group that will be assigned on failure of the client security check. Users can in general be organized into Groups. In this case, the Client Security Group may have a more restrictive security policy.
    .PARAMETER Clientsecuritymessage
        The client security message that will be displayed on failure of the client security check.
    .PARAMETER Clientsecuritylog
        Set the logging of client security checks.
        Possible values = ON, OFF
    .PARAMETER Splittunnel
        Send, through the tunnel, traffic only for intranet applications that are defined in Citrix Gateway. Route all other traffic directly to the Internet. The OFF setting routes all traffic through Citrix Gateway. With the REVERSE setting, intranet applications define the network traffic that is not intercepted. All network traffic directed to internal IP addresses bypasses the VPN tunnel, while other traffic goes through Citrix Gateway. Reverse split tunneling can be used to log all non-local LAN traffic. For example, if users have a home network and are logged on through the Citrix Gateway Plug-in, network traffic destined to a printer or another device within the home network is not intercepted.
        Possible values = ON, OFF, REVERSE
    .PARAMETER Locallanaccess
        Set local LAN access. If split tunneling is OFF, and you set local LAN access to ON, the local client can route traffic to its local interface. When the local area network switch is specified, this combination of switches is useful. The client can allow local LAN access to devices that commonly have non-routable addresses, such as local printers or local file servers.
        Possible values = ON, OFF
    .PARAMETER Rfc1918
        As defined in the local area network, allow only the following local area network addresses to bypass the VPN tunnel when the local LAN access feature is enabled:
        * 10.*.*.*,
        * 172.16.*.*,
        * 192.168.*.*.
        Possible values = ON, OFF
    .PARAMETER Spoofiip
        IP address that the intranet application uses to route the connection through the virtual adapter.
        Possible values = ON, OFF
    .PARAMETER Killconnections
        Specify whether the Citrix Gateway Plug-in should disconnect all preexisting connections, such as the connections existing before the user logged on to Citrix Gateway, and prevent new incoming connections on the Citrix Gateway Plug-in for Windows and MAC when the user is connected to Citrix Gateway and split tunneling is disabled.
        Possible values = ON, OFF
    .PARAMETER Transparentinterception
        Allow access to network resources by using a single IP address and subnet mask or a range of IP addresses. The OFF setting sets the mode to proxy, in which you configure destination and source IP addresses and port numbers. If you are using the Citrix Gateway Plug-in for Windows, set this parameter to ON, in which the mode is set to transparent. If you are using the Citrix Gateway Plug-in for Java, set this parameter to OFF.
        Possible values = ON, OFF
    .PARAMETER Windowsclienttype
        Choose between two types of Windows Client\
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed\
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Defaultauthorizationaction
        Specify the network resources that users have access to when they log on to the internal network. The default setting for authorization is to deny access to all network resources. Citrix recommends using the default global setting and then creating authorization policies to define the network resources users can access. If you set the default authorization policy to DENY, you must explicitly authorize access to any network resource, which improves security.
        Possible values = ALLOW, DENY
    .PARAMETER Authorizationgroup
        Comma-separated list of groups in which the user is placed when none of the groups that the user is a part of is configured on Citrix Gateway. The authorization policy can be bound to these groups to control access to the resources.
    .PARAMETER Smartgroup
        This is the default group that is chosen when the authentication succeeds in addition to extracted groups.
    .PARAMETER Clientidletimeout
        Time, in minutes, after which to time out the user session if Citrix Gateway does not detect mouse or keyboard activity.
    .PARAMETER Proxy
        Set options to apply proxy for accessing the internal resources. Available settings function as follows:
        * BROWSER - Proxy settings are configured only in Internet Explorer and Firefox browsers.
        * NS - Proxy settings are configured on the Citrix ADC.
        * OFF - Proxy settings are not configured.
        Possible values = BROWSER, NS, OFF
    .PARAMETER Allprotocolproxy
        IP address of the proxy server to use for all protocols supported by Citrix Gateway.
    .PARAMETER Httpproxy
        IP address of the proxy server to be used for HTTP access for all subsequent connections to the internal network.
    .PARAMETER Ftpproxy
        IP address of the proxy server to be used for FTP access for all subsequent connections to the internal network.
    .PARAMETER Socksproxy
        IP address of the proxy server to be used for SOCKS access for all subsequent connections to the internal network.
    .PARAMETER Gopherproxy
        IP address of the proxy server to be used for GOPHER access for all subsequent connections to the internal network.
    .PARAMETER Sslproxy
        IP address of the proxy server to be used for SSL access for all subsequent connections to the internal network.
    .PARAMETER Proxyexception
        Proxy exception string that will be configured in the browser for bypassing the previously configured proxies. Allowed only if proxy type is Browser.
    .PARAMETER Proxylocalbypass
        Bypass proxy server for local addresses option in Internet Explorer and Firefox proxy server settings.
        Possible values = ENABLED, DISABLED
    .PARAMETER Clientcleanupprompt
        Prompt for client-side cache clean-up when a client-initiated session closes.
        Possible values = ON, OFF
    .PARAMETER Forcecleanup
        Force cache clean-up when the user closes a session. You can specify all, none, or any combination of the client-side items.
        Possible values = none, all, cookie, addressbar, plugin, filesystemapplication, application, applicationdata, clientcertificate, autocomplete, cache
    .PARAMETER Clientoptions
        Display only the configured menu options when you select the "Configure Citrix Gateway" option in the Citrix Gateway Plug-in system tray icon for Windows.
        Possible values = none, all, services, filetransfer, configuration
    .PARAMETER Clientconfiguration
        Allow users to change client Debug logging level in Configuration tab of the Citrix Gateway Plug-in for Windows.
        Possible values = none, trace
    .PARAMETER Sso
        Set single sign-on (SSO) for the session. When the user accesses a server, the user's logon credentials are passed to the server for authentication.
        NOTE : This configuration does not honor the following authentication types for security reason. BASIC, DIGEST, and NTLM (without Negotiate NTLM2 Key or Negotiate Sign Flag). Use VPN TrafficAction to configure SSO for these authentication types.
        Possible values = ON, OFF
    .PARAMETER Ssocredential
        Specify whether to use the primary or secondary authentication credentials for single sign-on to the server.
        Possible values = PRIMARY, SECONDARY
    .PARAMETER Windowsautologon
        Enable or disable the Windows Auto Logon for the session. If a VPN session is established after this setting is enabled, the user is automatically logged on by using Windows credentials after the system is restarted.
        Possible values = ON, OFF
    .PARAMETER Usemip
        Enable or disable the use of a unique IP address alias, or a mapped IP address, as the client IP address for each client session. Allow Citrix Gateway to use the mapped IP address as an intranet IP address when all other IP addresses are not available.
        When IP pooling is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        Possible values = NS, OFF
    .PARAMETER Useiip
        Define IP address pool options. Available settings function as follows:
        * SPILLOVER - When an address pool is configured and the mapped IP is used as an intranet IP address, the mapped IP address is used when an intranet IP address cannot be assigned.
        * NOSPILLOVER - When intranet IP addresses are enabled and the mapped IP address is not used, the Transfer Login page appears for users who have used all available intranet IP addresses.
        * OFF - Address pool is not configured.
        Possible values = NOSPILLOVER, SPILLOVER, OFF
    .PARAMETER Clientdebug
        Set the trace level on Citrix Gateway. Technical support technicians use these debug logs for in-depth debugging and troubleshooting purposes. Available settings function as follows:
        * DEBUG - Detailed debug messages are collected and written into the specified file.
        * STATS - Application audit level error messages and debug statistic counters are written into the specified file.
        * EVENTS - Application audit-level error messages are written into the specified file.
        * OFF - Only critical events are logged into the Windows Application Log.
        Possible values = debug, stats, events, OFF
    .PARAMETER Loginscript
        Path to the logon script that is run when a session is established. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Logoutscript
        Path to the logout script. Separate multiple scripts by using comma. A "$" in the path signifies that the word following the "$" is an environment variable.
    .PARAMETER Homepage
        Web address of the home page that appears when users log on. Otherwise, users receive the default home page for Citrix Gateway, which is the Access Interface.
    .PARAMETER Icaproxy
        Enable ICA proxy to configure secure Internet access to servers running Citrix XenApp or XenDesktop by using Citrix Receiver instead of the Citrix Gateway Plug-in.
        Possible values = ON, OFF
    .PARAMETER Wihome
        Web address of the Web Interface server, such as http://<ipAddress>/Citrix/XenApp, or Receiver for Web, which enumerates the virtualized resources, such as XenApp, XenDesktop, and cloud applications. This web address is used as the home page in ICA proxy mode.
        If Client Choices is ON, you must configure this setting. Because the user can choose between FullClient and ICAProxy, the user may see a different home page. An Internet web site may appear if the user gets the FullClient option, or a Web Interface site if the user gets the ICAProxy option. If the setting is not configured, the XenApp option does not appear as a client choice.
    .PARAMETER Citrixreceiverhome
        Web address for the Citrix Receiver home page. Configure Citrix Gateway so that when users log on to the appliance, the Citrix Gateway Plug-in opens a web browser that allows single sign-on to the Citrix Receiver home page.
    .PARAMETER Wiportalmode
        Layout on the Access Interface. The COMPACT value indicates the use of small icons.
        Possible values = NORMAL, COMPACT
    .PARAMETER Clientchoices
        Provide users with multiple logon options. With client choices, users have the option of logging on by using the Citrix Gateway Plug-in for Windows, Citrix Gateway Plug-in for Java, the Web Interface, or clientless access from one location. Depending on how Citrix Gateway is configured, users are presented with up to three icons for logon choices. The most common are the Citrix Gateway Plug-in for Windows, Web Interface, and clientless access.
        Possible values = ON, OFF
    .PARAMETER Epaclienttype
        Choose between two types of End point Windows Client
        a) Application Agent - which always runs in the task bar as a standalone application and also has a supporting service which runs permanently when installed
        b) Activex Control - ActiveX control run by Microsoft Internet Explorer.
        Possible values = AGENT, PLUGIN
    .PARAMETER Iipdnssuffix
        An intranet IP DNS suffix. When a user logs on to Citrix Gateway and is assigned an IP address, a DNS record for the user name and IP address combination is added to the Citrix Gateway DNS cache. You can configure a DNS suffix to append to the user name when the DNS record is added to the cache. You can reach to the host from where the user is logged on by using the user's name, which can be easier to remember than an IP address. When the user logs off from Citrix Gateway, the record is removed from the DNS cache.
    .PARAMETER Forcedtimeout
        Force a disconnection from the Citrix Gateway Plug-in with Citrix Gateway after a specified number of minutes. If the session closes, the user must log on again.
    .PARAMETER Forcedtimeoutwarning
        Number of minutes to warn a user before the user session is disconnected.
    .PARAMETER Ntdomain
        Single sign-on domain to use for single sign-on to applications in the internal network. This setting can be overwritten by the domain that users specify at the time of logon or by the domain that the authentication server returns.
    .PARAMETER Clientlessvpnmode
        Enable clientless access for web, XenApp or XenDesktop, and FileShare resources without installing the Citrix Gateway Plug-in. Available settings function as follows:
        * ON - Allow only clientless access.
        * OFF - Allow clientless access after users log on with the Citrix Gateway Plug-in.
        * DISABLED - Do not allow clientless access.
        Possible values = ON, OFF, DISABLED
    .PARAMETER Emailhome
        Web address for the web-based email, such as Outlook Web Access.
    .PARAMETER Clientlessmodeurlencoding
        When clientless access is enabled, you can choose to encode the addresses of internal web applications or to leave the address as clear text. Available settings function as follows:
        * OPAQUE - Use standard encoding mechanisms to make the domain and protocol part of the resource unclear to users.
        * CLEAR - Do not encode the web address and make it visible to users.
        * ENCRYPT - Allow the domain and protocol to be encrypted using a session key. When the web address is encrypted, the URL is different for each user session for the same web resource. If users bookmark the encoded web address, save it in the web browser and then log off, they cannot connect to the web address when they log on and use the bookmark. If users save the encrypted bookmark in the Access Interface during their session, the bookmark works each time the user logs on.
        Possible values = TRANSPARENT, OPAQUE, ENCRYPT
    .PARAMETER Clientlesspersistentcookie
        State of persistent cookies in clientless access mode. Persistent cookies are required for accessing certain features of SharePoint, such as opening and editing Microsoft Word, Excel, and PowerPoint documents hosted on the SharePoint server. A persistent cookie remains on the user device and is sent with each HTTP request. Citrix Gateway encrypts the persistent cookie before sending it to the plug-in on the user device, and refreshes the cookie periodically as long as the session exists. The cookie becomes stale if the session ends. Available settings function as follows:
        * ALLOW - Enable persistent cookies. Users can open and edit Microsoft documents stored in SharePoint.
        * DENY - Disable persistent cookies. Users cannot open and edit Microsoft documents stored in SharePoint.
        * PROMPT - Prompt users to allow or deny persistent cookies during the session. Persistent cookies are not required for clientless access if users do not connect to SharePoint.
        Possible values = ALLOW, DENY, PROMPT
    .PARAMETER Allowedlogingroups
        Specify groups that have permission to log on to Citrix Gateway. Users who do not belong to this group or groups are denied access even if they have valid credentials.
    .PARAMETER Securebrowse
        Allow users to connect through Citrix Gateway to network resources from iOS and Android mobile devices with Citrix Receiver. Users do not need to establish a full VPN tunnel to access resources in the secure network.
        Possible values = ENABLED, DISABLED
    .PARAMETER Storefronturl
        Web address for StoreFront to be used in this session for enumeration of resources from XenApp or XenDesktop.
    .PARAMETER Sfgatewayauthtype
        The authentication type configured for the Citrix Gateway on StoreFront.
        Possible values = domain, RSA, domainAndRSA, SMS, smartCard, sfAuth, sfAuthAndRSA
    .PARAMETER Kcdaccount
        The kcd account details to be used in SSO.
    .PARAMETER Rdpclientprofilename
        Name of the RDP profile associated with the vserver.
    .PARAMETER Windowspluginupgrade
        Option to set plugin upgrade behaviour for Win.
        Possible values = Always, Essential, Never
    .PARAMETER Macpluginupgrade
        Option to set plugin upgrade behaviour for Mac.
        Possible values = Always, Essential, Never
    .PARAMETER Linuxpluginupgrade
        Option to set plugin upgrade behaviour for Linux.
        Possible values = Always, Essential, Never
    .PARAMETER Iconwithreceiver
        Option to decide whether to show plugin icon along with receiver.
        Possible values = ON, OFF
    .PARAMETER Alwaysonprofilename
        Name of the AlwaysON profile associated with the session action. The builtin profile named none can be used to explicitly disable AlwaysON for the session action.
    .PARAMETER Autoproxyurl
        URL to auto proxy config file.
    .PARAMETER Advancedclientlessvpnmode
        Option to enable/disable Advanced ClientlessVpnMode. Additionaly, it can be set to STRICT to block Classic ClientlessVpnMode while in AdvancedClientlessMode.
        Possible values = ENABLED, DISABLED, STRICT
    .PARAMETER Pcoipprofilename
        Name of the PCOIP profile associated with the session action. The builtin profile named none can be used to explicitly disable PCOIP for the session action.
    .PARAMETER Fqdnspoofedip
        Spoofed IP address range that can be used by client for FQDN based split tunneling.
    .PARAMETER Netmask
        The netmask for the spoofed ip address.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnsessionaction -name <string>
        An example how to unset vpnsessionaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnsessionaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionaction
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Boolean]$useraccounting,

        [Boolean]$httpport,

        [Boolean]$winsip,

        [Boolean]$dnsvservername,

        [Boolean]$splitdns,

        [Boolean]$sesstimeout,

        [Boolean]$clientsecurity,

        [Boolean]$clientsecuritygroup,

        [Boolean]$clientsecuritymessage,

        [Boolean]$clientsecuritylog,

        [Boolean]$splittunnel,

        [Boolean]$locallanaccess,

        [Boolean]$rfc1918,

        [Boolean]$spoofiip,

        [Boolean]$killconnections,

        [Boolean]$transparentinterception,

        [Boolean]$windowsclienttype,

        [Boolean]$defaultauthorizationaction,

        [Boolean]$authorizationgroup,

        [Boolean]$smartgroup,

        [Boolean]$clientidletimeout,

        [Boolean]$proxy,

        [Boolean]$allprotocolproxy,

        [Boolean]$httpproxy,

        [Boolean]$ftpproxy,

        [Boolean]$socksproxy,

        [Boolean]$gopherproxy,

        [Boolean]$sslproxy,

        [Boolean]$proxyexception,

        [Boolean]$proxylocalbypass,

        [Boolean]$clientcleanupprompt,

        [Boolean]$forcecleanup,

        [Boolean]$clientoptions,

        [Boolean]$clientconfiguration,

        [Boolean]$sso,

        [Boolean]$ssocredential,

        [Boolean]$windowsautologon,

        [Boolean]$usemip,

        [Boolean]$useiip,

        [Boolean]$clientdebug,

        [Boolean]$loginscript,

        [Boolean]$logoutscript,

        [Boolean]$homepage,

        [Boolean]$icaproxy,

        [Boolean]$wihome,

        [Boolean]$citrixreceiverhome,

        [Boolean]$wiportalmode,

        [Boolean]$clientchoices,

        [Boolean]$epaclienttype,

        [Boolean]$iipdnssuffix,

        [Boolean]$forcedtimeout,

        [Boolean]$forcedtimeoutwarning,

        [Boolean]$ntdomain,

        [Boolean]$clientlessvpnmode,

        [Boolean]$emailhome,

        [Boolean]$clientlessmodeurlencoding,

        [Boolean]$clientlesspersistentcookie,

        [Boolean]$allowedlogingroups,

        [Boolean]$securebrowse,

        [Boolean]$storefronturl,

        [Boolean]$sfgatewayauthtype,

        [Boolean]$kcdaccount,

        [Boolean]$rdpclientprofilename,

        [Boolean]$windowspluginupgrade,

        [Boolean]$macpluginupgrade,

        [Boolean]$linuxpluginupgrade,

        [Boolean]$iconwithreceiver,

        [Boolean]$alwaysonprofilename,

        [Boolean]$autoproxyurl,

        [Boolean]$advancedclientlessvpnmode,

        [Boolean]$pcoipprofilename,

        [Boolean]$fqdnspoofedip,

        [Boolean]$netmask 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnsessionaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('useraccounting') ) { $payload.Add('useraccounting', $useraccounting) }
            if ( $PSBoundParameters.ContainsKey('httpport') ) { $payload.Add('httpport', $httpport) }
            if ( $PSBoundParameters.ContainsKey('winsip') ) { $payload.Add('winsip', $winsip) }
            if ( $PSBoundParameters.ContainsKey('dnsvservername') ) { $payload.Add('dnsvservername', $dnsvservername) }
            if ( $PSBoundParameters.ContainsKey('splitdns') ) { $payload.Add('splitdns', $splitdns) }
            if ( $PSBoundParameters.ContainsKey('sesstimeout') ) { $payload.Add('sesstimeout', $sesstimeout) }
            if ( $PSBoundParameters.ContainsKey('clientsecurity') ) { $payload.Add('clientsecurity', $clientsecurity) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritygroup') ) { $payload.Add('clientsecuritygroup', $clientsecuritygroup) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritymessage') ) { $payload.Add('clientsecuritymessage', $clientsecuritymessage) }
            if ( $PSBoundParameters.ContainsKey('clientsecuritylog') ) { $payload.Add('clientsecuritylog', $clientsecuritylog) }
            if ( $PSBoundParameters.ContainsKey('splittunnel') ) { $payload.Add('splittunnel', $splittunnel) }
            if ( $PSBoundParameters.ContainsKey('locallanaccess') ) { $payload.Add('locallanaccess', $locallanaccess) }
            if ( $PSBoundParameters.ContainsKey('rfc1918') ) { $payload.Add('rfc1918', $rfc1918) }
            if ( $PSBoundParameters.ContainsKey('spoofiip') ) { $payload.Add('spoofiip', $spoofiip) }
            if ( $PSBoundParameters.ContainsKey('killconnections') ) { $payload.Add('killconnections', $killconnections) }
            if ( $PSBoundParameters.ContainsKey('transparentinterception') ) { $payload.Add('transparentinterception', $transparentinterception) }
            if ( $PSBoundParameters.ContainsKey('windowsclienttype') ) { $payload.Add('windowsclienttype', $windowsclienttype) }
            if ( $PSBoundParameters.ContainsKey('defaultauthorizationaction') ) { $payload.Add('defaultauthorizationaction', $defaultauthorizationaction) }
            if ( $PSBoundParameters.ContainsKey('authorizationgroup') ) { $payload.Add('authorizationgroup', $authorizationgroup) }
            if ( $PSBoundParameters.ContainsKey('smartgroup') ) { $payload.Add('smartgroup', $smartgroup) }
            if ( $PSBoundParameters.ContainsKey('clientidletimeout') ) { $payload.Add('clientidletimeout', $clientidletimeout) }
            if ( $PSBoundParameters.ContainsKey('proxy') ) { $payload.Add('proxy', $proxy) }
            if ( $PSBoundParameters.ContainsKey('allprotocolproxy') ) { $payload.Add('allprotocolproxy', $allprotocolproxy) }
            if ( $PSBoundParameters.ContainsKey('httpproxy') ) { $payload.Add('httpproxy', $httpproxy) }
            if ( $PSBoundParameters.ContainsKey('ftpproxy') ) { $payload.Add('ftpproxy', $ftpproxy) }
            if ( $PSBoundParameters.ContainsKey('socksproxy') ) { $payload.Add('socksproxy', $socksproxy) }
            if ( $PSBoundParameters.ContainsKey('gopherproxy') ) { $payload.Add('gopherproxy', $gopherproxy) }
            if ( $PSBoundParameters.ContainsKey('sslproxy') ) { $payload.Add('sslproxy', $sslproxy) }
            if ( $PSBoundParameters.ContainsKey('proxyexception') ) { $payload.Add('proxyexception', $proxyexception) }
            if ( $PSBoundParameters.ContainsKey('proxylocalbypass') ) { $payload.Add('proxylocalbypass', $proxylocalbypass) }
            if ( $PSBoundParameters.ContainsKey('clientcleanupprompt') ) { $payload.Add('clientcleanupprompt', $clientcleanupprompt) }
            if ( $PSBoundParameters.ContainsKey('forcecleanup') ) { $payload.Add('forcecleanup', $forcecleanup) }
            if ( $PSBoundParameters.ContainsKey('clientoptions') ) { $payload.Add('clientoptions', $clientoptions) }
            if ( $PSBoundParameters.ContainsKey('clientconfiguration') ) { $payload.Add('clientconfiguration', $clientconfiguration) }
            if ( $PSBoundParameters.ContainsKey('sso') ) { $payload.Add('sso', $sso) }
            if ( $PSBoundParameters.ContainsKey('ssocredential') ) { $payload.Add('ssocredential', $ssocredential) }
            if ( $PSBoundParameters.ContainsKey('windowsautologon') ) { $payload.Add('windowsautologon', $windowsautologon) }
            if ( $PSBoundParameters.ContainsKey('usemip') ) { $payload.Add('usemip', $usemip) }
            if ( $PSBoundParameters.ContainsKey('useiip') ) { $payload.Add('useiip', $useiip) }
            if ( $PSBoundParameters.ContainsKey('clientdebug') ) { $payload.Add('clientdebug', $clientdebug) }
            if ( $PSBoundParameters.ContainsKey('loginscript') ) { $payload.Add('loginscript', $loginscript) }
            if ( $PSBoundParameters.ContainsKey('logoutscript') ) { $payload.Add('logoutscript', $logoutscript) }
            if ( $PSBoundParameters.ContainsKey('homepage') ) { $payload.Add('homepage', $homepage) }
            if ( $PSBoundParameters.ContainsKey('icaproxy') ) { $payload.Add('icaproxy', $icaproxy) }
            if ( $PSBoundParameters.ContainsKey('wihome') ) { $payload.Add('wihome', $wihome) }
            if ( $PSBoundParameters.ContainsKey('citrixreceiverhome') ) { $payload.Add('citrixreceiverhome', $citrixreceiverhome) }
            if ( $PSBoundParameters.ContainsKey('wiportalmode') ) { $payload.Add('wiportalmode', $wiportalmode) }
            if ( $PSBoundParameters.ContainsKey('clientchoices') ) { $payload.Add('clientchoices', $clientchoices) }
            if ( $PSBoundParameters.ContainsKey('epaclienttype') ) { $payload.Add('epaclienttype', $epaclienttype) }
            if ( $PSBoundParameters.ContainsKey('iipdnssuffix') ) { $payload.Add('iipdnssuffix', $iipdnssuffix) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeout') ) { $payload.Add('forcedtimeout', $forcedtimeout) }
            if ( $PSBoundParameters.ContainsKey('forcedtimeoutwarning') ) { $payload.Add('forcedtimeoutwarning', $forcedtimeoutwarning) }
            if ( $PSBoundParameters.ContainsKey('ntdomain') ) { $payload.Add('ntdomain', $ntdomain) }
            if ( $PSBoundParameters.ContainsKey('clientlessvpnmode') ) { $payload.Add('clientlessvpnmode', $clientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('emailhome') ) { $payload.Add('emailhome', $emailhome) }
            if ( $PSBoundParameters.ContainsKey('clientlessmodeurlencoding') ) { $payload.Add('clientlessmodeurlencoding', $clientlessmodeurlencoding) }
            if ( $PSBoundParameters.ContainsKey('clientlesspersistentcookie') ) { $payload.Add('clientlesspersistentcookie', $clientlesspersistentcookie) }
            if ( $PSBoundParameters.ContainsKey('allowedlogingroups') ) { $payload.Add('allowedlogingroups', $allowedlogingroups) }
            if ( $PSBoundParameters.ContainsKey('securebrowse') ) { $payload.Add('securebrowse', $securebrowse) }
            if ( $PSBoundParameters.ContainsKey('storefronturl') ) { $payload.Add('storefronturl', $storefronturl) }
            if ( $PSBoundParameters.ContainsKey('sfgatewayauthtype') ) { $payload.Add('sfgatewayauthtype', $sfgatewayauthtype) }
            if ( $PSBoundParameters.ContainsKey('kcdaccount') ) { $payload.Add('kcdaccount', $kcdaccount) }
            if ( $PSBoundParameters.ContainsKey('rdpclientprofilename') ) { $payload.Add('rdpclientprofilename', $rdpclientprofilename) }
            if ( $PSBoundParameters.ContainsKey('windowspluginupgrade') ) { $payload.Add('windowspluginupgrade', $windowspluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('macpluginupgrade') ) { $payload.Add('macpluginupgrade', $macpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('linuxpluginupgrade') ) { $payload.Add('linuxpluginupgrade', $linuxpluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('iconwithreceiver') ) { $payload.Add('iconwithreceiver', $iconwithreceiver) }
            if ( $PSBoundParameters.ContainsKey('alwaysonprofilename') ) { $payload.Add('alwaysonprofilename', $alwaysonprofilename) }
            if ( $PSBoundParameters.ContainsKey('autoproxyurl') ) { $payload.Add('autoproxyurl', $autoproxyurl) }
            if ( $PSBoundParameters.ContainsKey('advancedclientlessvpnmode') ) { $payload.Add('advancedclientlessvpnmode', $advancedclientlessvpnmode) }
            if ( $PSBoundParameters.ContainsKey('pcoipprofilename') ) { $payload.Add('pcoipprofilename', $pcoipprofilename) }
            if ( $PSBoundParameters.ContainsKey('fqdnspoofedip') ) { $payload.Add('fqdnspoofedip', $fqdnspoofedip) }
            if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnsessionaction -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-ADCUnsetVpnsessionaction: Finished"
    }
}

function Invoke-ADCGetVpnsessionaction {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN session action resource.
    .PARAMETER Name
        Name for the Citrix Gateway profile (action). Must begin with an ASCII alphabetic or underscore (_) character, and must consist only of ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the profile is created.
    .PARAMETER GetAll
        Retrieve all vpnsessionaction object(s).
    .PARAMETER Count
        If specified, the count of the vpnsessionaction 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-ADCGetVpnsessionaction
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionaction -GetAll
        Get all vpnsessionaction data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionaction -Count
        Get the number of vpnsessionaction objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionaction -name <string>
        Get vpnsessionaction object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionaction -Filter @{ 'name'='<value>' }
        Get vpnsessionaction data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsessionaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [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-ADCGetVpnsessionaction: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnsessionaction objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionaction -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 vpnsessionaction objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionaction -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsessionaction objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionaction -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsessionaction configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionaction -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnsessionaction configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionaction -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-ADCGetVpnsessionaction: Ended"
    }
}

function Invoke-ADCAddVpnsessionpolicy {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN session policy resource.
    .PARAMETER Name
        Name for the new session policy that is applied after the user logs on to Citrix Gateway.
    .PARAMETER Rule
        Expression, or name of a named expression, specifying the traffic that matches the policy.
        The following requirements apply only to the Citrix ADC CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Action
        Action to be applied by the new session policy if the rule criteria are met.
    .PARAMETER PassThru
        Return details about the created vpnsessionpolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnsessionpolicy -name <string> -rule <string> -action <string>
        An example how to add vpnsessionpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnsessionpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [string]$Rule,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Action,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnsessionpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                rule           = $rule
                action         = $action
            }

            if ( $PSCmdlet.ShouldProcess("vpnsessionpolicy", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnsessionpolicy -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-ADCGetVpnsessionpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnsessionpolicy: Finished"
    }
}

function Invoke-ADCDeleteVpnsessionpolicy {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN session policy resource.
    .PARAMETER Name
        Name for the new session policy that is applied after the user logs on to Citrix Gateway.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnsessionpolicy -Name <string>
        An example how to delete vpnsessionpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnsessionpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnsessionpolicy: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnsessionpolicy -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-ADCDeleteVpnsessionpolicy: Finished"
    }
}

function Invoke-ADCUpdateVpnsessionpolicy {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN session policy resource.
    .PARAMETER Name
        Name for the new session policy that is applied after the user logs on to Citrix Gateway.
    .PARAMETER Rule
        Expression, or name of a named expression, specifying the traffic that matches the policy.
        The following requirements apply only to the Citrix ADC CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Action
        Action to be applied by the new session policy if the rule criteria are met.
    .PARAMETER PassThru
        Return details about the created vpnsessionpolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnsessionpolicy -name <string>
        An example how to update vpnsessionpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnsessionpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Rule,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Action,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnsessionpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('rule') ) { $payload.Add('rule', $rule) }
            if ( $PSBoundParameters.ContainsKey('action') ) { $payload.Add('action', $action) }
            if ( $PSCmdlet.ShouldProcess("vpnsessionpolicy", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnsessionpolicy -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-ADCGetVpnsessionpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnsessionpolicy: Finished"
    }
}

function Invoke-ADCUnsetVpnsessionpolicy {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN session policy resource.
    .PARAMETER Name
        Name for the new session policy that is applied after the user logs on to Citrix Gateway.
    .PARAMETER Rule
        Expression, or name of a named expression, specifying the traffic that matches the policy.
        The following requirements apply only to the Citrix ADC CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Action
        Action to be applied by the new session policy if the rule criteria are met.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnsessionpolicy -name <string>
        An example how to unset vpnsessionpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnsessionpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$rule,

        [Boolean]$action 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnsessionpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('rule') ) { $payload.Add('rule', $rule) }
            if ( $PSBoundParameters.ContainsKey('action') ) { $payload.Add('action', $action) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnsessionpolicy -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-ADCUnsetVpnsessionpolicy: Finished"
    }
}

function Invoke-ADCGetVpnsessionpolicy {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN session policy resource.
    .PARAMETER Name
        Name for the new session policy that is applied after the user logs on to Citrix Gateway.
    .PARAMETER GetAll
        Retrieve all vpnsessionpolicy object(s).
    .PARAMETER Count
        If specified, the count of the vpnsessionpolicy 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-ADCGetVpnsessionpolicy
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicy -GetAll
        Get all vpnsessionpolicy data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicy -Count
        Get the number of vpnsessionpolicy objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicy -name <string>
        Get vpnsessionpolicy object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicy -Filter @{ 'name'='<value>' }
        Get vpnsessionpolicy data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsessionpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnsessionpolicy: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnsessionpolicy objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy -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 vpnsessionpolicy objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsessionpolicy objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsessionpolicy configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnsessionpolicy configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy -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-ADCGetVpnsessionpolicy: Ended"
    }
}

function Invoke-ADCGetVpnsessionpolicyaaagroupbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the aaagroup that can be bound to vpnsessionpolicy.
    .PARAMETER Name
        Name of the session policy to display.
    .PARAMETER GetAll
        Retrieve all vpnsessionpolicy_aaagroup_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnsessionpolicy_aaagroup_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-ADCGetVpnsessionpolicyaaagroupbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyaaagroupbinding -GetAll
        Get all vpnsessionpolicy_aaagroup_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyaaagroupbinding -Count
        Get the number of vpnsessionpolicy_aaagroup_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyaaagroupbinding -name <string>
        Get vpnsessionpolicy_aaagroup_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyaaagroupbinding -Filter @{ 'name'='<value>' }
        Get vpnsessionpolicy_aaagroup_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsessionpolicyaaagroupbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy_aaagroup_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnsessionpolicyaaagroupbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnsessionpolicy_aaagroup_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaagroup_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 vpnsessionpolicy_aaagroup_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaagroup_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_aaagroup_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaagroup_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_aaagroup_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaagroup_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnsessionpolicy_aaagroup_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaagroup_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-ADCGetVpnsessionpolicyaaagroupbinding: Ended"
    }
}

function Invoke-ADCGetVpnsessionpolicyaaauserbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the aaauser that can be bound to vpnsessionpolicy.
    .PARAMETER Name
        Name of the session policy to display.
    .PARAMETER GetAll
        Retrieve all vpnsessionpolicy_aaauser_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnsessionpolicy_aaauser_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-ADCGetVpnsessionpolicyaaauserbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyaaauserbinding -GetAll
        Get all vpnsessionpolicy_aaauser_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyaaauserbinding -Count
        Get the number of vpnsessionpolicy_aaauser_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyaaauserbinding -name <string>
        Get vpnsessionpolicy_aaauser_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyaaauserbinding -Filter @{ 'name'='<value>' }
        Get vpnsessionpolicy_aaauser_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsessionpolicyaaauserbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy_aaauser_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnsessionpolicyaaauserbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnsessionpolicy_aaauser_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaauser_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 vpnsessionpolicy_aaauser_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaauser_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_aaauser_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaauser_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_aaauser_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaauser_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnsessionpolicy_aaauser_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_aaauser_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-ADCGetVpnsessionpolicyaaauserbinding: Ended"
    }
}

function Invoke-ADCGetVpnsessionpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to vpnsessionpolicy.
    .PARAMETER Name
        Name of the session policy to display.
    .PARAMETER GetAll
        Retrieve all vpnsessionpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnsessionpolicy_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-ADCGetVpnsessionpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicybinding -GetAll
        Get all vpnsessionpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicybinding -name <string>
        Get vpnsessionpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnsessionpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsessionpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnsessionpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnsessionpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_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 vpnsessionpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnsessionpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_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-ADCGetVpnsessionpolicybinding: Ended"
    }
}

function Invoke-ADCGetVpnsessionpolicyvpnglobalbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnglobal that can be bound to vpnsessionpolicy.
    .PARAMETER Name
        Name of the session policy to display.
    .PARAMETER GetAll
        Retrieve all vpnsessionpolicy_vpnglobal_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnsessionpolicy_vpnglobal_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-ADCGetVpnsessionpolicyvpnglobalbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyvpnglobalbinding -GetAll
        Get all vpnsessionpolicy_vpnglobal_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyvpnglobalbinding -Count
        Get the number of vpnsessionpolicy_vpnglobal_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyvpnglobalbinding -name <string>
        Get vpnsessionpolicy_vpnglobal_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyvpnglobalbinding -Filter @{ 'name'='<value>' }
        Get vpnsessionpolicy_vpnglobal_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsessionpolicyvpnglobalbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy_vpnglobal_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnsessionpolicyvpnglobalbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnsessionpolicy_vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnglobal_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 vpnsessionpolicy_vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_vpnglobal_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_vpnglobal_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnsessionpolicy_vpnglobal_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnglobal_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-ADCGetVpnsessionpolicyvpnglobalbinding: Ended"
    }
}

function Invoke-ADCGetVpnsessionpolicyvpnvserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnvserver that can be bound to vpnsessionpolicy.
    .PARAMETER Name
        Name of the session policy to display.
    .PARAMETER GetAll
        Retrieve all vpnsessionpolicy_vpnvserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnsessionpolicy_vpnvserver_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-ADCGetVpnsessionpolicyvpnvserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyvpnvserverbinding -GetAll
        Get all vpnsessionpolicy_vpnvserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyvpnvserverbinding -Count
        Get the number of vpnsessionpolicy_vpnvserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyvpnvserverbinding -name <string>
        Get vpnsessionpolicy_vpnvserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsessionpolicyvpnvserverbinding -Filter @{ 'name'='<value>' }
        Get vpnsessionpolicy_vpnvserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsessionpolicyvpnvserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsessionpolicy_vpnvserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnsessionpolicyvpnvserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnsessionpolicy_vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnvserver_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 vpnsessionpolicy_vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_vpnvserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsessionpolicy_vpnvserver_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnsessionpolicy_vpnvserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsessionpolicy_vpnvserver_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-ADCGetVpnsessionpolicyvpnvserverbinding: Ended"
    }
}

function Invoke-ADCGetVpnsfconfig {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for Create a StoreFront configuration file resource.
    .PARAMETER Vserver
        Name of Gateway virtual server.
    .PARAMETER GetAll
        Retrieve all vpnsfconfig object(s).
    .PARAMETER Count
        If specified, the count of the vpnsfconfig 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-ADCGetVpnsfconfig
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsfconfig -GetAll
        Get all vpnsfconfig data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsfconfig -Count
        Get the number of vpnsfconfig objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsfconfig -name <string>
        Get vpnsfconfig object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnsfconfig -Filter @{ 'name'='<value>' }
        Get vpnsfconfig data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnsfconfig
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnsfconfig/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [string[]]$Vserver,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnsfconfig: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnsfconfig objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsfconfig -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 vpnsfconfig objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsfconfig -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnsfconfig objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('vserver') ) { $arguments.Add('vserver', $vserver) }
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsfconfig -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnsfconfig configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnsfconfig configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnsfconfig -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-ADCGetVpnsfconfig: Ended"
    }
}

function Invoke-ADCGetVpnstoreinfo {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for Store information for a URL resource.
    .PARAMETER Url
        StoreFront URL to be scanned.
    .PARAMETER GetAll
        Retrieve all vpnstoreinfo object(s).
    .PARAMETER Count
        If specified, the count of the vpnstoreinfo 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-ADCGetVpnstoreinfo
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnstoreinfo -GetAll
        Get all vpnstoreinfo data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnstoreinfo -Count
        Get the number of vpnstoreinfo objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnstoreinfo -name <string>
        Get vpnstoreinfo object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnstoreinfo -Filter @{ 'name'='<value>' }
        Get vpnstoreinfo data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnstoreinfo
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnstoreinfo/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [string]$Url,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnstoreinfo: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnstoreinfo objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnstoreinfo -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 vpnstoreinfo objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnstoreinfo -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnstoreinfo objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('url') ) { $arguments.Add('url', $url) }
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnstoreinfo -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnstoreinfo configuration for property ''"

            } else {
                Write-Verbose "Retrieving vpnstoreinfo configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnstoreinfo -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-ADCGetVpnstoreinfo: Ended"
    }
}

function Invoke-ADCAddVpntrafficaction {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN traffic action resource.
    .PARAMETER Name
        Name for the traffic action. 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. Cannot be changed after a traffic action is created.
    .PARAMETER Qual
        Protocol, either HTTP or TCP, to be used with the action.
        Possible values = http, tcp
    .PARAMETER Apptimeout
        Maximum amount of time, in minutes, a user can stay logged on to the web application.
    .PARAMETER Sso
        Provide single sign-on to the web application.
        NOTE : Authentication mechanisms like Basic-authentication require the user credentials to be sent in plaintext which is not secure if the server is running on HTTP (instead of HTTPS).
        Possible values = ON, OFF
    .PARAMETER Hdx
        Provide hdx proxy to the ICA traffic.
        Possible values = ON, OFF
    .PARAMETER Formssoaction
        Name of the form-based single sign-on profile. Form-based single sign-on allows users to log on one time to all protected applications in your network, instead of requiring them to log on separately to access each one.
    .PARAMETER Fta
        Specify file type association, which is a list of file extensions that users are allowed to open.
        Possible values = ON, OFF
    .PARAMETER Wanscaler
        Use the Repeater Plug-in to optimize network traffic.
        Possible values = ON, OFF
    .PARAMETER Kcdaccount
        Kerberos constrained delegation account name.
    .PARAMETER Samlssoprofile
        Profile to be used for doing SAML SSO to remote relying party.
    .PARAMETER Proxy
        IP address and Port of the proxy server to be used for HTTP access for this request.
    .PARAMETER Userexpression
        expression that will be evaluated to obtain username for SingleSignOn.
    .PARAMETER Passwdexpression
        expression that will be evaluated to obtain password for SingleSignOn.
    .PARAMETER PassThru
        Return details about the created vpntrafficaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpntrafficaction -name <string> -qual <string>
        An example how to add vpntrafficaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpntrafficaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateSet('http', 'tcp')]
        [string]$Qual,

        [ValidateRange(1, 715827)]
        [double]$Apptimeout,

        [ValidateSet('ON', 'OFF')]
        [string]$Sso,

        [ValidateSet('ON', 'OFF')]
        [string]$Hdx,

        [string]$Formssoaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Fta,

        [ValidateSet('ON', 'OFF')]
        [string]$Wanscaler,

        [ValidateLength(1, 32)]
        [string]$Kcdaccount = '"Default"',

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Samlssoprofile,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Proxy,

        [string]$Userexpression,

        [string]$Passwdexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpntrafficaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                qual           = $qual
            }
            if ( $PSBoundParameters.ContainsKey('apptimeout') ) { $payload.Add('apptimeout', $apptimeout) }
            if ( $PSBoundParameters.ContainsKey('sso') ) { $payload.Add('sso', $sso) }
            if ( $PSBoundParameters.ContainsKey('hdx') ) { $payload.Add('hdx', $hdx) }
            if ( $PSBoundParameters.ContainsKey('formssoaction') ) { $payload.Add('formssoaction', $formssoaction) }
            if ( $PSBoundParameters.ContainsKey('fta') ) { $payload.Add('fta', $fta) }
            if ( $PSBoundParameters.ContainsKey('wanscaler') ) { $payload.Add('wanscaler', $wanscaler) }
            if ( $PSBoundParameters.ContainsKey('kcdaccount') ) { $payload.Add('kcdaccount', $kcdaccount) }
            if ( $PSBoundParameters.ContainsKey('samlssoprofile') ) { $payload.Add('samlssoprofile', $samlssoprofile) }
            if ( $PSBoundParameters.ContainsKey('proxy') ) { $payload.Add('proxy', $proxy) }
            if ( $PSBoundParameters.ContainsKey('userexpression') ) { $payload.Add('userexpression', $userexpression) }
            if ( $PSBoundParameters.ContainsKey('passwdexpression') ) { $payload.Add('passwdexpression', $passwdexpression) }
            if ( $PSCmdlet.ShouldProcess("vpntrafficaction", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpntrafficaction -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-ADCGetVpntrafficaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpntrafficaction: Finished"
    }
}

function Invoke-ADCDeleteVpntrafficaction {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN traffic action resource.
    .PARAMETER Name
        Name for the traffic action. 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. Cannot be changed after a traffic action is created.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpntrafficaction -Name <string>
        An example how to delete vpntrafficaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpntrafficaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpntrafficaction: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpntrafficaction -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-ADCDeleteVpntrafficaction: Finished"
    }
}

function Invoke-ADCUpdateVpntrafficaction {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN traffic action resource.
    .PARAMETER Name
        Name for the traffic action. 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. Cannot be changed after a traffic action is created.
    .PARAMETER Apptimeout
        Maximum amount of time, in minutes, a user can stay logged on to the web application.
    .PARAMETER Sso
        Provide single sign-on to the web application.
        NOTE : Authentication mechanisms like Basic-authentication require the user credentials to be sent in plaintext which is not secure if the server is running on HTTP (instead of HTTPS).
        Possible values = ON, OFF
    .PARAMETER Hdx
        Provide hdx proxy to the ICA traffic.
        Possible values = ON, OFF
    .PARAMETER Formssoaction
        Name of the form-based single sign-on profile. Form-based single sign-on allows users to log on one time to all protected applications in your network, instead of requiring them to log on separately to access each one.
    .PARAMETER Fta
        Specify file type association, which is a list of file extensions that users are allowed to open.
        Possible values = ON, OFF
    .PARAMETER Wanscaler
        Use the Repeater Plug-in to optimize network traffic.
        Possible values = ON, OFF
    .PARAMETER Kcdaccount
        Kerberos constrained delegation account name.
    .PARAMETER Samlssoprofile
        Profile to be used for doing SAML SSO to remote relying party.
    .PARAMETER Proxy
        IP address and Port of the proxy server to be used for HTTP access for this request.
    .PARAMETER Userexpression
        expression that will be evaluated to obtain username for SingleSignOn.
    .PARAMETER Passwdexpression
        expression that will be evaluated to obtain password for SingleSignOn.
    .PARAMETER PassThru
        Return details about the created vpntrafficaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpntrafficaction -name <string>
        An example how to update vpntrafficaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpntrafficaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [ValidateRange(1, 715827)]
        [double]$Apptimeout,

        [ValidateSet('ON', 'OFF')]
        [string]$Sso,

        [ValidateSet('ON', 'OFF')]
        [string]$Hdx,

        [string]$Formssoaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Fta,

        [ValidateSet('ON', 'OFF')]
        [string]$Wanscaler,

        [ValidateLength(1, 32)]
        [string]$Kcdaccount,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Samlssoprofile,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Proxy,

        [string]$Userexpression,

        [string]$Passwdexpression,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpntrafficaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('apptimeout') ) { $payload.Add('apptimeout', $apptimeout) }
            if ( $PSBoundParameters.ContainsKey('sso') ) { $payload.Add('sso', $sso) }
            if ( $PSBoundParameters.ContainsKey('hdx') ) { $payload.Add('hdx', $hdx) }
            if ( $PSBoundParameters.ContainsKey('formssoaction') ) { $payload.Add('formssoaction', $formssoaction) }
            if ( $PSBoundParameters.ContainsKey('fta') ) { $payload.Add('fta', $fta) }
            if ( $PSBoundParameters.ContainsKey('wanscaler') ) { $payload.Add('wanscaler', $wanscaler) }
            if ( $PSBoundParameters.ContainsKey('kcdaccount') ) { $payload.Add('kcdaccount', $kcdaccount) }
            if ( $PSBoundParameters.ContainsKey('samlssoprofile') ) { $payload.Add('samlssoprofile', $samlssoprofile) }
            if ( $PSBoundParameters.ContainsKey('proxy') ) { $payload.Add('proxy', $proxy) }
            if ( $PSBoundParameters.ContainsKey('userexpression') ) { $payload.Add('userexpression', $userexpression) }
            if ( $PSBoundParameters.ContainsKey('passwdexpression') ) { $payload.Add('passwdexpression', $passwdexpression) }
            if ( $PSCmdlet.ShouldProcess("vpntrafficaction", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpntrafficaction -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-ADCGetVpntrafficaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpntrafficaction: Finished"
    }
}

function Invoke-ADCUnsetVpntrafficaction {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN traffic action resource.
    .PARAMETER Name
        Name for the traffic action. 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. Cannot be changed after a traffic action is created.
    .PARAMETER Wanscaler
        Use the Repeater Plug-in to optimize network traffic.
        Possible values = ON, OFF
    .PARAMETER Kcdaccount
        Kerberos constrained delegation account name.
    .PARAMETER Proxy
        IP address and Port of the proxy server to be used for HTTP access for this request.
    .PARAMETER Userexpression
        expression that will be evaluated to obtain username for SingleSignOn.
    .PARAMETER Passwdexpression
        expression that will be evaluated to obtain password for SingleSignOn.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpntrafficaction -name <string>
        An example how to unset vpntrafficaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpntrafficaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficaction
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Boolean]$wanscaler,

        [Boolean]$kcdaccount,

        [Boolean]$proxy,

        [Boolean]$userexpression,

        [Boolean]$passwdexpression 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpntrafficaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('wanscaler') ) { $payload.Add('wanscaler', $wanscaler) }
            if ( $PSBoundParameters.ContainsKey('kcdaccount') ) { $payload.Add('kcdaccount', $kcdaccount) }
            if ( $PSBoundParameters.ContainsKey('proxy') ) { $payload.Add('proxy', $proxy) }
            if ( $PSBoundParameters.ContainsKey('userexpression') ) { $payload.Add('userexpression', $userexpression) }
            if ( $PSBoundParameters.ContainsKey('passwdexpression') ) { $payload.Add('passwdexpression', $passwdexpression) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpntrafficaction -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-ADCUnsetVpntrafficaction: Finished"
    }
}

function Invoke-ADCGetVpntrafficaction {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN traffic action resource.
    .PARAMETER Name
        Name for the traffic action. 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. Cannot be changed after a traffic action is created.
    .PARAMETER GetAll
        Retrieve all vpntrafficaction object(s).
    .PARAMETER Count
        If specified, the count of the vpntrafficaction 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-ADCGetVpntrafficaction
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficaction -GetAll
        Get all vpntrafficaction data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficaction -Count
        Get the number of vpntrafficaction objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficaction -name <string>
        Get vpntrafficaction object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficaction -Filter @{ 'name'='<value>' }
        Get vpntrafficaction data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpntrafficaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [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-ADCGetVpntrafficaction: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpntrafficaction objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficaction -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 vpntrafficaction objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficaction -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpntrafficaction objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficaction -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpntrafficaction configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficaction -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpntrafficaction configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficaction -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-ADCGetVpntrafficaction: Ended"
    }
}

function Invoke-ADCAddVpntrafficpolicy {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN traffic policy resource.
    .PARAMETER Name
        Name for the traffic policy. 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. Cannot be changed after the policy is created.
    .PARAMETER Rule
        Expression, or name of a named expression, against which traffic is evaluated.
        The following requirements apply only to the Citrix ADC CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Action
        Action to apply to traffic that matches the policy.
    .PARAMETER PassThru
        Return details about the created vpntrafficpolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpntrafficpolicy -name <string> -rule <string> -action <string>
        An example how to add vpntrafficpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpntrafficpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Parameter(Mandatory)]
        [string]$Rule,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Action,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpntrafficpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                rule           = $rule
                action         = $action
            }

            if ( $PSCmdlet.ShouldProcess("vpntrafficpolicy", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpntrafficpolicy -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-ADCGetVpntrafficpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpntrafficpolicy: Finished"
    }
}

function Invoke-ADCDeleteVpntrafficpolicy {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN traffic policy resource.
    .PARAMETER Name
        Name for the traffic policy. 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. Cannot be changed after the policy is created.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpntrafficpolicy -Name <string>
        An example how to delete vpntrafficpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpntrafficpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpntrafficpolicy: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpntrafficpolicy -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-ADCDeleteVpntrafficpolicy: Finished"
    }
}

function Invoke-ADCUpdateVpntrafficpolicy {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN traffic policy resource.
    .PARAMETER Name
        Name for the traffic policy. 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. Cannot be changed after the policy is created.
    .PARAMETER Rule
        Expression, or name of a named expression, against which traffic is evaluated.
        The following requirements apply only to the Citrix ADC CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Action
        Action to apply to traffic that matches the policy.
    .PARAMETER PassThru
        Return details about the created vpntrafficpolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpntrafficpolicy -name <string>
        An example how to update vpntrafficpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpntrafficpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [string]$Rule,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Action,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpntrafficpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('rule') ) { $payload.Add('rule', $rule) }
            if ( $PSBoundParameters.ContainsKey('action') ) { $payload.Add('action', $action) }
            if ( $PSCmdlet.ShouldProcess("vpntrafficpolicy", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpntrafficpolicy -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-ADCGetVpntrafficpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpntrafficpolicy: Finished"
    }
}

function Invoke-ADCUnsetVpntrafficpolicy {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN traffic policy resource.
    .PARAMETER Name
        Name for the traffic policy. 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. Cannot be changed after the policy is created.
    .PARAMETER Rule
        Expression, or name of a named expression, against which traffic is evaluated.
        The following requirements apply only to the Citrix ADC CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Action
        Action to apply to traffic that matches the policy.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpntrafficpolicy -name <string>
        An example how to unset vpntrafficpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpntrafficpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Boolean]$rule,

        [Boolean]$action 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpntrafficpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('rule') ) { $payload.Add('rule', $rule) }
            if ( $PSBoundParameters.ContainsKey('action') ) { $payload.Add('action', $action) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpntrafficpolicy -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-ADCUnsetVpntrafficpolicy: Finished"
    }
}

function Invoke-ADCGetVpntrafficpolicy {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN traffic policy resource.
    .PARAMETER Name
        Name for the traffic policy. 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. Cannot be changed after the policy is created.
    .PARAMETER GetAll
        Retrieve all vpntrafficpolicy object(s).
    .PARAMETER Count
        If specified, the count of the vpntrafficpolicy 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-ADCGetVpntrafficpolicy
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicy -GetAll
        Get all vpntrafficpolicy data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicy -Count
        Get the number of vpntrafficpolicy objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicy -name <string>
        Get vpntrafficpolicy object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicy -Filter @{ 'name'='<value>' }
        Get vpntrafficpolicy data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpntrafficpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [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-ADCGetVpntrafficpolicy: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpntrafficpolicy objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy -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 vpntrafficpolicy objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpntrafficpolicy objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpntrafficpolicy configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpntrafficpolicy configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy -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-ADCGetVpntrafficpolicy: Ended"
    }
}

function Invoke-ADCGetVpntrafficpolicyaaagroupbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the aaagroup that can be bound to vpntrafficpolicy.
    .PARAMETER Name
        Name of the traffic policy for which to display detailed information.
    .PARAMETER GetAll
        Retrieve all vpntrafficpolicy_aaagroup_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpntrafficpolicy_aaagroup_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-ADCGetVpntrafficpolicyaaagroupbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyaaagroupbinding -GetAll
        Get all vpntrafficpolicy_aaagroup_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyaaagroupbinding -Count
        Get the number of vpntrafficpolicy_aaagroup_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyaaagroupbinding -name <string>
        Get vpntrafficpolicy_aaagroup_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyaaagroupbinding -Filter @{ 'name'='<value>' }
        Get vpntrafficpolicy_aaagroup_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpntrafficpolicyaaagroupbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy_aaagroup_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpntrafficpolicyaaagroupbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpntrafficpolicy_aaagroup_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaagroup_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 vpntrafficpolicy_aaagroup_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaagroup_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_aaagroup_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaagroup_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_aaagroup_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaagroup_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpntrafficpolicy_aaagroup_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaagroup_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-ADCGetVpntrafficpolicyaaagroupbinding: Ended"
    }
}

function Invoke-ADCGetVpntrafficpolicyaaauserbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the aaauser that can be bound to vpntrafficpolicy.
    .PARAMETER Name
        Name of the traffic policy for which to display detailed information.
    .PARAMETER GetAll
        Retrieve all vpntrafficpolicy_aaauser_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpntrafficpolicy_aaauser_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-ADCGetVpntrafficpolicyaaauserbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyaaauserbinding -GetAll
        Get all vpntrafficpolicy_aaauser_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyaaauserbinding -Count
        Get the number of vpntrafficpolicy_aaauser_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyaaauserbinding -name <string>
        Get vpntrafficpolicy_aaauser_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyaaauserbinding -Filter @{ 'name'='<value>' }
        Get vpntrafficpolicy_aaauser_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpntrafficpolicyaaauserbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy_aaauser_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpntrafficpolicyaaauserbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpntrafficpolicy_aaauser_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaauser_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 vpntrafficpolicy_aaauser_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaauser_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_aaauser_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaauser_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_aaauser_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaauser_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpntrafficpolicy_aaauser_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_aaauser_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-ADCGetVpntrafficpolicyaaauserbinding: Ended"
    }
}

function Invoke-ADCGetVpntrafficpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to vpntrafficpolicy.
    .PARAMETER Name
        Name of the traffic policy for which to display detailed information.
    .PARAMETER GetAll
        Retrieve all vpntrafficpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpntrafficpolicy_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-ADCGetVpntrafficpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicybinding -GetAll
        Get all vpntrafficpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicybinding -name <string>
        Get vpntrafficpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicybinding -Filter @{ 'name'='<value>' }
        Get vpntrafficpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpntrafficpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpntrafficpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpntrafficpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_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 vpntrafficpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpntrafficpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_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-ADCGetVpntrafficpolicybinding: Ended"
    }
}

function Invoke-ADCGetVpntrafficpolicyvpnglobalbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnglobal that can be bound to vpntrafficpolicy.
    .PARAMETER Name
        Name of the traffic policy for which to display detailed information.
    .PARAMETER GetAll
        Retrieve all vpntrafficpolicy_vpnglobal_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpntrafficpolicy_vpnglobal_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-ADCGetVpntrafficpolicyvpnglobalbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyvpnglobalbinding -GetAll
        Get all vpntrafficpolicy_vpnglobal_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyvpnglobalbinding -Count
        Get the number of vpntrafficpolicy_vpnglobal_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyvpnglobalbinding -name <string>
        Get vpntrafficpolicy_vpnglobal_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyvpnglobalbinding -Filter @{ 'name'='<value>' }
        Get vpntrafficpolicy_vpnglobal_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpntrafficpolicyvpnglobalbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy_vpnglobal_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpntrafficpolicyvpnglobalbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpntrafficpolicy_vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnglobal_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 vpntrafficpolicy_vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_vpnglobal_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_vpnglobal_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpntrafficpolicy_vpnglobal_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnglobal_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-ADCGetVpntrafficpolicyvpnglobalbinding: Ended"
    }
}

function Invoke-ADCGetVpntrafficpolicyvpnvserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnvserver that can be bound to vpntrafficpolicy.
    .PARAMETER Name
        Name of the traffic policy for which to display detailed information.
    .PARAMETER GetAll
        Retrieve all vpntrafficpolicy_vpnvserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpntrafficpolicy_vpnvserver_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-ADCGetVpntrafficpolicyvpnvserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyvpnvserverbinding -GetAll
        Get all vpntrafficpolicy_vpnvserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyvpnvserverbinding -Count
        Get the number of vpntrafficpolicy_vpnvserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyvpnvserverbinding -name <string>
        Get vpntrafficpolicy_vpnvserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpntrafficpolicyvpnvserverbinding -Filter @{ 'name'='<value>' }
        Get vpntrafficpolicy_vpnvserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpntrafficpolicyvpnvserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpntrafficpolicy_vpnvserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpntrafficpolicyvpnvserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpntrafficpolicy_vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnvserver_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 vpntrafficpolicy_vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_vpnvserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpntrafficpolicy_vpnvserver_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpntrafficpolicy_vpnvserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpntrafficpolicy_vpnvserver_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-ADCGetVpntrafficpolicyvpnvserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnurl {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN URL resource.
    .PARAMETER Urlname
        Name of the bookmark link.
    .PARAMETER Linkname
        Description of the bookmark link. The description appears in the Access Interface.
    .PARAMETER Actualurl
        Web address for the bookmark link.
    .PARAMETER Vservername
        Name of the associated LB/CS vserver.
    .PARAMETER Clientlessaccess
        If clientless access to the resource hosting the link is allowed, also use clientless access for the bookmarked web address in the Secure Client Access based session. Allows single sign-on and other HTTP processing on Citrix Gateway for HTTPS resources.
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments associated with the bookmark link.
    .PARAMETER Iconurl
        URL to fetch icon file for displaying this resource.
    .PARAMETER Ssotype
        Single sign on type for unified gateway.
        Possible values = unifiedgateway, selfauth, samlauth
    .PARAMETER Applicationtype
        The type of application this VPN URL represents. Possible values are CVPN/SaaS/VPN.
        Possible values = CVPN, VPN, SaaS
    .PARAMETER Samlssoprofile
        Profile to be used for doing SAML SSO.
    .PARAMETER Appjson
        To store the template details in the json format.
    .PARAMETER PassThru
        Return details about the created vpnurl item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnurl -urlname <string> -linkname <string> -actualurl <string>
        An example how to add vpnurl configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnurl
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurl/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Urlname,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Linkname,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Actualurl,

        [string]$Vservername,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientlessaccess = 'OFF',

        [string]$Comment,

        [string]$Iconurl,

        [ValidateSet('unifiedgateway', 'selfauth', 'samlauth')]
        [string]$Ssotype,

        [ValidateSet('CVPN', 'VPN', 'SaaS')]
        [string]$Applicationtype,

        [string]$Samlssoprofile,

        [string]$Appjson,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnurl: Starting"
    }
    process {
        try {
            $payload = @{ urlname = $urlname
                linkname          = $linkname
                actualurl         = $actualurl
            }
            if ( $PSBoundParameters.ContainsKey('vservername') ) { $payload.Add('vservername', $vservername) }
            if ( $PSBoundParameters.ContainsKey('clientlessaccess') ) { $payload.Add('clientlessaccess', $clientlessaccess) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('iconurl') ) { $payload.Add('iconurl', $iconurl) }
            if ( $PSBoundParameters.ContainsKey('ssotype') ) { $payload.Add('ssotype', $ssotype) }
            if ( $PSBoundParameters.ContainsKey('applicationtype') ) { $payload.Add('applicationtype', $applicationtype) }
            if ( $PSBoundParameters.ContainsKey('samlssoprofile') ) { $payload.Add('samlssoprofile', $samlssoprofile) }
            if ( $PSBoundParameters.ContainsKey('appjson') ) { $payload.Add('appjson', $appjson) }
            if ( $PSCmdlet.ShouldProcess("vpnurl", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnurl -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-ADCGetVpnurl -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnurl: Finished"
    }
}

function Invoke-ADCDeleteVpnurl {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN URL resource.
    .PARAMETER Urlname
        Name of the bookmark link.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnurl -Urlname <string>
        An example how to delete vpnurl configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnurl
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurl/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Urlname 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnurl: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$urlname", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnurl -NitroPath nitro/v1/config -Resource $urlname -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-ADCDeleteVpnurl: Finished"
    }
}

function Invoke-ADCUpdateVpnurl {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN URL resource.
    .PARAMETER Urlname
        Name of the bookmark link.
    .PARAMETER Linkname
        Description of the bookmark link. The description appears in the Access Interface.
    .PARAMETER Actualurl
        Web address for the bookmark link.
    .PARAMETER Vservername
        Name of the associated LB/CS vserver.
    .PARAMETER Clientlessaccess
        If clientless access to the resource hosting the link is allowed, also use clientless access for the bookmarked web address in the Secure Client Access based session. Allows single sign-on and other HTTP processing on Citrix Gateway for HTTPS resources.
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments associated with the bookmark link.
    .PARAMETER Iconurl
        URL to fetch icon file for displaying this resource.
    .PARAMETER Ssotype
        Single sign on type for unified gateway.
        Possible values = unifiedgateway, selfauth, samlauth
    .PARAMETER Applicationtype
        The type of application this VPN URL represents. Possible values are CVPN/SaaS/VPN.
        Possible values = CVPN, VPN, SaaS
    .PARAMETER Samlssoprofile
        Profile to be used for doing SAML SSO.
    .PARAMETER Appjson
        To store the template details in the json format.
    .PARAMETER PassThru
        Return details about the created vpnurl item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnurl -urlname <string>
        An example how to update vpnurl configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnurl
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurl/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Urlname,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Linkname,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Actualurl,

        [string]$Vservername,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientlessaccess,

        [string]$Comment,

        [string]$Iconurl,

        [ValidateSet('unifiedgateway', 'selfauth', 'samlauth')]
        [string]$Ssotype,

        [ValidateSet('CVPN', 'VPN', 'SaaS')]
        [string]$Applicationtype,

        [string]$Samlssoprofile,

        [string]$Appjson,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnurl: Starting"
    }
    process {
        try {
            $payload = @{ urlname = $urlname }
            if ( $PSBoundParameters.ContainsKey('linkname') ) { $payload.Add('linkname', $linkname) }
            if ( $PSBoundParameters.ContainsKey('actualurl') ) { $payload.Add('actualurl', $actualurl) }
            if ( $PSBoundParameters.ContainsKey('vservername') ) { $payload.Add('vservername', $vservername) }
            if ( $PSBoundParameters.ContainsKey('clientlessaccess') ) { $payload.Add('clientlessaccess', $clientlessaccess) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('iconurl') ) { $payload.Add('iconurl', $iconurl) }
            if ( $PSBoundParameters.ContainsKey('ssotype') ) { $payload.Add('ssotype', $ssotype) }
            if ( $PSBoundParameters.ContainsKey('applicationtype') ) { $payload.Add('applicationtype', $applicationtype) }
            if ( $PSBoundParameters.ContainsKey('samlssoprofile') ) { $payload.Add('samlssoprofile', $samlssoprofile) }
            if ( $PSBoundParameters.ContainsKey('appjson') ) { $payload.Add('appjson', $appjson) }
            if ( $PSCmdlet.ShouldProcess("vpnurl", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnurl -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-ADCGetVpnurl -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnurl: Finished"
    }
}

function Invoke-ADCUnsetVpnurl {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN URL resource.
    .PARAMETER Urlname
        Name of the bookmark link.
    .PARAMETER Vservername
        Name of the associated LB/CS vserver.
    .PARAMETER Clientlessaccess
        If clientless access to the resource hosting the link is allowed, also use clientless access for the bookmarked web address in the Secure Client Access based session. Allows single sign-on and other HTTP processing on Citrix Gateway for HTTPS resources.
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments associated with the bookmark link.
    .PARAMETER Iconurl
        URL to fetch icon file for displaying this resource.
    .PARAMETER Ssotype
        Single sign on type for unified gateway.
        Possible values = unifiedgateway, selfauth, samlauth
    .PARAMETER Applicationtype
        The type of application this VPN URL represents. Possible values are CVPN/SaaS/VPN.
        Possible values = CVPN, VPN, SaaS
    .PARAMETER Samlssoprofile
        Profile to be used for doing SAML SSO.
    .PARAMETER Appjson
        To store the template details in the json format.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnurl -urlname <string>
        An example how to unset vpnurl configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnurl
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurl
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Urlname,

        [Boolean]$vservername,

        [Boolean]$clientlessaccess,

        [Boolean]$comment,

        [Boolean]$iconurl,

        [Boolean]$ssotype,

        [Boolean]$applicationtype,

        [Boolean]$samlssoprofile,

        [Boolean]$appjson 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnurl: Starting"
    }
    process {
        try {
            $payload = @{ urlname = $urlname }
            if ( $PSBoundParameters.ContainsKey('vservername') ) { $payload.Add('vservername', $vservername) }
            if ( $PSBoundParameters.ContainsKey('clientlessaccess') ) { $payload.Add('clientlessaccess', $clientlessaccess) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('iconurl') ) { $payload.Add('iconurl', $iconurl) }
            if ( $PSBoundParameters.ContainsKey('ssotype') ) { $payload.Add('ssotype', $ssotype) }
            if ( $PSBoundParameters.ContainsKey('applicationtype') ) { $payload.Add('applicationtype', $applicationtype) }
            if ( $PSBoundParameters.ContainsKey('samlssoprofile') ) { $payload.Add('samlssoprofile', $samlssoprofile) }
            if ( $PSBoundParameters.ContainsKey('appjson') ) { $payload.Add('appjson', $appjson) }
            if ( $PSCmdlet.ShouldProcess("$urlname", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnurl -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-ADCUnsetVpnurl: Finished"
    }
}

function Invoke-ADCGetVpnurl {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN URL resource.
    .PARAMETER Urlname
        Name of the bookmark link.
    .PARAMETER GetAll
        Retrieve all vpnurl object(s).
    .PARAMETER Count
        If specified, the count of the vpnurl 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-ADCGetVpnurl
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurl -GetAll
        Get all vpnurl data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurl -Count
        Get the number of vpnurl objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurl -name <string>
        Get vpnurl object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurl -Filter @{ 'name'='<value>' }
        Get vpnurl data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnurl
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurl/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Urlname,

        [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-ADCGetVpnurl: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnurl objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurl -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 vpnurl objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurl -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnurl objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurl -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnurl configuration for property 'urlname'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurl -NitroPath nitro/v1/config -Resource $urlname -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnurl configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurl -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-ADCGetVpnurl: Ended"
    }
}

function Invoke-ADCAddVpnurlaction {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url action resource.
    .PARAMETER Name
        Name of the bookmark link.
    .PARAMETER Linkname
        Description of the bookmark link. The description appears in the Access Interface.
    .PARAMETER Actualurl
        Web address for the bookmark link.
    .PARAMETER Vservername
        Name of the associated vserver to handle selfAuth SSO.
    .PARAMETER Clientlessaccess
        If clientless access to the resource hosting the link is allowed, also use clientless access for the bookmarked web address in the Secure Client Access based session. Allows single sign-on and other HTTP processing on NetScaler Gateway for HTTPS resources.
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments associated with the bookmark link.
    .PARAMETER Iconurl
        URL to fetch icon file for displaying this resource.
    .PARAMETER Ssotype
        Single sign on type for unified gateway.
        Possible values = unifiedgateway, selfauth, samlauth
    .PARAMETER Applicationtype
        The type of application this VPN URL represents. Possible values are CVPN/SaaS/VPN.
        Possible values = CVPN, VPN, SaaS
    .PARAMETER Samlssoprofile
        Profile to be used for doing SAML SSO.
    .PARAMETER PassThru
        Return details about the created vpnurlaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnurlaction -name <string> -linkname <string> -actualurl <string>
        An example how to add vpnurlaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnurlaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Linkname,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Actualurl,

        [string]$Vservername,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientlessaccess = 'OFF',

        [string]$Comment,

        [string]$Iconurl,

        [ValidateSet('unifiedgateway', 'selfauth', 'samlauth')]
        [string]$Ssotype,

        [ValidateSet('CVPN', 'VPN', 'SaaS')]
        [string]$Applicationtype,

        [string]$Samlssoprofile,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnurlaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                linkname       = $linkname
                actualurl      = $actualurl
            }
            if ( $PSBoundParameters.ContainsKey('vservername') ) { $payload.Add('vservername', $vservername) }
            if ( $PSBoundParameters.ContainsKey('clientlessaccess') ) { $payload.Add('clientlessaccess', $clientlessaccess) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('iconurl') ) { $payload.Add('iconurl', $iconurl) }
            if ( $PSBoundParameters.ContainsKey('ssotype') ) { $payload.Add('ssotype', $ssotype) }
            if ( $PSBoundParameters.ContainsKey('applicationtype') ) { $payload.Add('applicationtype', $applicationtype) }
            if ( $PSBoundParameters.ContainsKey('samlssoprofile') ) { $payload.Add('samlssoprofile', $samlssoprofile) }
            if ( $PSCmdlet.ShouldProcess("vpnurlaction", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnurlaction -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-ADCGetVpnurlaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnurlaction: Finished"
    }
}

function Invoke-ADCDeleteVpnurlaction {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url action resource.
    .PARAMETER Name
        Name of the bookmark link.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnurlaction -Name <string>
        An example how to delete vpnurlaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnurlaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnurlaction: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnurlaction -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-ADCDeleteVpnurlaction: Finished"
    }
}

function Invoke-ADCUpdateVpnurlaction {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url action resource.
    .PARAMETER Name
        Name of the bookmark link.
    .PARAMETER Linkname
        Description of the bookmark link. The description appears in the Access Interface.
    .PARAMETER Actualurl
        Web address for the bookmark link.
    .PARAMETER Vservername
        Name of the associated vserver to handle selfAuth SSO.
    .PARAMETER Clientlessaccess
        If clientless access to the resource hosting the link is allowed, also use clientless access for the bookmarked web address in the Secure Client Access based session. Allows single sign-on and other HTTP processing on NetScaler Gateway for HTTPS resources.
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments associated with the bookmark link.
    .PARAMETER Iconurl
        URL to fetch icon file for displaying this resource.
    .PARAMETER Ssotype
        Single sign on type for unified gateway.
        Possible values = unifiedgateway, selfauth, samlauth
    .PARAMETER Applicationtype
        The type of application this VPN URL represents. Possible values are CVPN/SaaS/VPN.
        Possible values = CVPN, VPN, SaaS
    .PARAMETER Samlssoprofile
        Profile to be used for doing SAML SSO.
    .PARAMETER PassThru
        Return details about the created vpnurlaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnurlaction -name <string>
        An example how to update vpnurlaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnurlaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Linkname,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Actualurl,

        [string]$Vservername,

        [ValidateSet('ON', 'OFF')]
        [string]$Clientlessaccess,

        [string]$Comment,

        [string]$Iconurl,

        [ValidateSet('unifiedgateway', 'selfauth', 'samlauth')]
        [string]$Ssotype,

        [ValidateSet('CVPN', 'VPN', 'SaaS')]
        [string]$Applicationtype,

        [string]$Samlssoprofile,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnurlaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('linkname') ) { $payload.Add('linkname', $linkname) }
            if ( $PSBoundParameters.ContainsKey('actualurl') ) { $payload.Add('actualurl', $actualurl) }
            if ( $PSBoundParameters.ContainsKey('vservername') ) { $payload.Add('vservername', $vservername) }
            if ( $PSBoundParameters.ContainsKey('clientlessaccess') ) { $payload.Add('clientlessaccess', $clientlessaccess) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('iconurl') ) { $payload.Add('iconurl', $iconurl) }
            if ( $PSBoundParameters.ContainsKey('ssotype') ) { $payload.Add('ssotype', $ssotype) }
            if ( $PSBoundParameters.ContainsKey('applicationtype') ) { $payload.Add('applicationtype', $applicationtype) }
            if ( $PSBoundParameters.ContainsKey('samlssoprofile') ) { $payload.Add('samlssoprofile', $samlssoprofile) }
            if ( $PSCmdlet.ShouldProcess("vpnurlaction", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnurlaction -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-ADCGetVpnurlaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnurlaction: Finished"
    }
}

function Invoke-ADCUnsetVpnurlaction {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url action resource.
    .PARAMETER Name
        Name of the bookmark link.
    .PARAMETER Vservername
        Name of the associated vserver to handle selfAuth SSO.
    .PARAMETER Clientlessaccess
        If clientless access to the resource hosting the link is allowed, also use clientless access for the bookmarked web address in the Secure Client Access based session. Allows single sign-on and other HTTP processing on NetScaler Gateway for HTTPS resources.
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments associated with the bookmark link.
    .PARAMETER Iconurl
        URL to fetch icon file for displaying this resource.
    .PARAMETER Ssotype
        Single sign on type for unified gateway.
        Possible values = unifiedgateway, selfauth, samlauth
    .PARAMETER Applicationtype
        The type of application this VPN URL represents. Possible values are CVPN/SaaS/VPN.
        Possible values = CVPN, VPN, SaaS
    .PARAMETER Samlssoprofile
        Profile to be used for doing SAML SSO.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnurlaction -name <string>
        An example how to unset vpnurlaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnurlaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlaction
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$vservername,

        [Boolean]$clientlessaccess,

        [Boolean]$comment,

        [Boolean]$iconurl,

        [Boolean]$ssotype,

        [Boolean]$applicationtype,

        [Boolean]$samlssoprofile 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnurlaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('vservername') ) { $payload.Add('vservername', $vservername) }
            if ( $PSBoundParameters.ContainsKey('clientlessaccess') ) { $payload.Add('clientlessaccess', $clientlessaccess) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('iconurl') ) { $payload.Add('iconurl', $iconurl) }
            if ( $PSBoundParameters.ContainsKey('ssotype') ) { $payload.Add('ssotype', $ssotype) }
            if ( $PSBoundParameters.ContainsKey('applicationtype') ) { $payload.Add('applicationtype', $applicationtype) }
            if ( $PSBoundParameters.ContainsKey('samlssoprofile') ) { $payload.Add('samlssoprofile', $samlssoprofile) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnurlaction -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-ADCUnsetVpnurlaction: Finished"
    }
}

function Invoke-ADCRenameVpnurlaction {
    <#
    .SYNOPSIS
        Rename SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url action resource.
    .PARAMETER Name
        Name of the bookmark link.
    .PARAMETER Newname
        New name for the vpn urlAction.
        Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) hash (#), space ( ), at (@), equals (=), colon (:), and underscore characters.
        The following requirement applies only to the NetScaler CLI:
        If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my vpnurl action" or 'my vpnurl action').
    .PARAMETER PassThru
        Return details about the created vpnurlaction item.
    .EXAMPLE
        PS C:\>Invoke-ADCRenameVpnurlaction -name <string> -newname <string>
        An example how to rename vpnurlaction configuration Object(s).
    .NOTES
        File Name : Invoke-ADCRenameVpnurlaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Newname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCRenameVpnurlaction: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                newname        = $newname
            }

            if ( $PSCmdlet.ShouldProcess("vpnurlaction", "Rename SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnurlaction -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-ADCGetVpnurlaction -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCRenameVpnurlaction: Finished"
    }
}

function Invoke-ADCGetVpnurlaction {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN url action resource.
    .PARAMETER Name
        Name of the bookmark link.
    .PARAMETER GetAll
        Retrieve all vpnurlaction object(s).
    .PARAMETER Count
        If specified, the count of the vpnurlaction 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-ADCGetVpnurlaction
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlaction -GetAll
        Get all vpnurlaction data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlaction -Count
        Get the number of vpnurlaction objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlaction -name <string>
        Get vpnurlaction object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlaction -Filter @{ 'name'='<value>' }
        Get vpnurlaction data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnurlaction
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlaction/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnurlaction: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnurlaction objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlaction -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 vpnurlaction objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlaction -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnurlaction objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlaction -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnurlaction configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlaction -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnurlaction configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlaction -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-ADCGetVpnurlaction: Ended"
    }
}

function Invoke-ADCAddVpnurlpolicy {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url policy resource.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER Rule
        Expression, or name of a named expression, specifying the traffic that matches the policy.
        The following requirements apply only to the NetScaler CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Action
        Action to be applied by the new urlPolicy if the rule criteria are met.
    .PARAMETER Comment
        Any comments to preserve information about this policy.
    .PARAMETER Logaction
        Name of messagelog action to use when a request matches this policy.
    .PARAMETER PassThru
        Return details about the created vpnurlpolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnurlpolicy -name <string> -rule <string> -action <string>
        An example how to add vpnurlpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnurlpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [string]$Rule,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Action,

        [string]$Comment,

        [string]$Logaction,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnurlpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                rule           = $rule
                action         = $action
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('logaction') ) { $payload.Add('logaction', $logaction) }
            if ( $PSCmdlet.ShouldProcess("vpnurlpolicy", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnurlpolicy -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-ADCGetVpnurlpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnurlpolicy: Finished"
    }
}

function Invoke-ADCDeleteVpnurlpolicy {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url policy resource.
    .PARAMETER Name
        Name for the new urlPolicy.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnurlpolicy -Name <string>
        An example how to delete vpnurlpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnurlpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnurlpolicy: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnurlpolicy -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-ADCDeleteVpnurlpolicy: Finished"
    }
}

function Invoke-ADCUpdateVpnurlpolicy {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url policy resource.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER Rule
        Expression, or name of a named expression, specifying the traffic that matches the policy.
        The following requirements apply only to the NetScaler CLI:
        * If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
        * If the expression itself includes double quotation marks, escape the quotations by using the \ character.
        * Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
    .PARAMETER Action
        Action to be applied by the new urlPolicy if the rule criteria are met.
    .PARAMETER Comment
        Any comments to preserve information about this policy.
    .PARAMETER Logaction
        Name of messagelog action to use when a request matches this policy.
    .PARAMETER PassThru
        Return details about the created vpnurlpolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnurlpolicy -name <string>
        An example how to update vpnurlpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnurlpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Rule,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Action,

        [string]$Comment,

        [string]$Logaction,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnurlpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('rule') ) { $payload.Add('rule', $rule) }
            if ( $PSBoundParameters.ContainsKey('action') ) { $payload.Add('action', $action) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('logaction') ) { $payload.Add('logaction', $logaction) }
            if ( $PSCmdlet.ShouldProcess("vpnurlpolicy", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnurlpolicy -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-ADCGetVpnurlpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnurlpolicy: Finished"
    }
}

function Invoke-ADCUnsetVpnurlpolicy {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url policy resource.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER Comment
        Any comments to preserve information about this policy.
    .PARAMETER Logaction
        Name of messagelog action to use when a request matches this policy.
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnurlpolicy -name <string>
        An example how to unset vpnurlpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnurlpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$comment,

        [Boolean]$logaction 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnurlpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('logaction') ) { $payload.Add('logaction', $logaction) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnurlpolicy -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-ADCUnsetVpnurlpolicy: Finished"
    }
}

function Invoke-ADCRenameVpnurlpolicy {
    <#
    .SYNOPSIS
        Rename SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN url policy resource.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER Newname
        New name for the vpn urlPolicy.
        Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) hash (#), space ( ), at (@), equals (=), colon (:), and underscore characters.
        The following requirement applies only to the NetScaler CLI:
        If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my vpnurl policy" or 'my vpnurl policy').
    .PARAMETER PassThru
        Return details about the created vpnurlpolicy item.
    .EXAMPLE
        PS C:\>Invoke-ADCRenameVpnurlpolicy -name <string> -newname <string>
        An example how to rename vpnurlpolicy configuration Object(s).
    .NOTES
        File Name : Invoke-ADCRenameVpnurlpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Newname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCRenameVpnurlpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                newname        = $newname
            }

            if ( $PSCmdlet.ShouldProcess("vpnurlpolicy", "Rename SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnurlpolicy -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-ADCGetVpnurlpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCRenameVpnurlpolicy: Finished"
    }
}

function Invoke-ADCGetVpnurlpolicy {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN url policy resource.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER GetAll
        Retrieve all vpnurlpolicy object(s).
    .PARAMETER Count
        If specified, the count of the vpnurlpolicy 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-ADCGetVpnurlpolicy
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicy -GetAll
        Get all vpnurlpolicy data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicy -Count
        Get the number of vpnurlpolicy objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicy -name <string>
        Get vpnurlpolicy object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicy -Filter @{ 'name'='<value>' }
        Get vpnurlpolicy data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnurlpolicy
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnurlpolicy: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnurlpolicy objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy -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 vpnurlpolicy objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnurlpolicy objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnurlpolicy configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnurlpolicy configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy -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-ADCGetVpnurlpolicy: Ended"
    }
}

function Invoke-ADCGetVpnurlpolicyaaagroupbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the aaagroup that can be bound to vpnurlpolicy.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER GetAll
        Retrieve all vpnurlpolicy_aaagroup_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnurlpolicy_aaagroup_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-ADCGetVpnurlpolicyaaagroupbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyaaagroupbinding -GetAll
        Get all vpnurlpolicy_aaagroup_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyaaagroupbinding -Count
        Get the number of vpnurlpolicy_aaagroup_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyaaagroupbinding -name <string>
        Get vpnurlpolicy_aaagroup_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyaaagroupbinding -Filter @{ 'name'='<value>' }
        Get vpnurlpolicy_aaagroup_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnurlpolicyaaagroupbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy_aaagroup_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnurlpolicyaaagroupbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnurlpolicy_aaagroup_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaagroup_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 vpnurlpolicy_aaagroup_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaagroup_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnurlpolicy_aaagroup_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaagroup_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnurlpolicy_aaagroup_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaagroup_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnurlpolicy_aaagroup_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaagroup_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-ADCGetVpnurlpolicyaaagroupbinding: Ended"
    }
}

function Invoke-ADCGetVpnurlpolicyaaauserbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the aaauser that can be bound to vpnurlpolicy.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER GetAll
        Retrieve all vpnurlpolicy_aaauser_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnurlpolicy_aaauser_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-ADCGetVpnurlpolicyaaauserbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyaaauserbinding -GetAll
        Get all vpnurlpolicy_aaauser_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyaaauserbinding -Count
        Get the number of vpnurlpolicy_aaauser_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyaaauserbinding -name <string>
        Get vpnurlpolicy_aaauser_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyaaauserbinding -Filter @{ 'name'='<value>' }
        Get vpnurlpolicy_aaauser_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnurlpolicyaaauserbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy_aaauser_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnurlpolicyaaauserbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnurlpolicy_aaauser_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaauser_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 vpnurlpolicy_aaauser_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaauser_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnurlpolicy_aaauser_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaauser_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnurlpolicy_aaauser_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaauser_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnurlpolicy_aaauser_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_aaauser_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-ADCGetVpnurlpolicyaaauserbinding: Ended"
    }
}

function Invoke-ADCGetVpnurlpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to vpnurlpolicy.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER GetAll
        Retrieve all vpnurlpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnurlpolicy_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-ADCGetVpnurlpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicybinding -GetAll
        Get all vpnurlpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicybinding -name <string>
        Get vpnurlpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnurlpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnurlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnurlpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnurlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_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 vpnurlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnurlpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnurlpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnurlpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_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-ADCGetVpnurlpolicybinding: Ended"
    }
}

function Invoke-ADCGetVpnurlpolicyvpnglobalbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnglobal that can be bound to vpnurlpolicy.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER GetAll
        Retrieve all vpnurlpolicy_vpnglobal_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnurlpolicy_vpnglobal_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-ADCGetVpnurlpolicyvpnglobalbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyvpnglobalbinding -GetAll
        Get all vpnurlpolicy_vpnglobal_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyvpnglobalbinding -Count
        Get the number of vpnurlpolicy_vpnglobal_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyvpnglobalbinding -name <string>
        Get vpnurlpolicy_vpnglobal_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyvpnglobalbinding -Filter @{ 'name'='<value>' }
        Get vpnurlpolicy_vpnglobal_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnurlpolicyvpnglobalbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy_vpnglobal_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnurlpolicyvpnglobalbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnurlpolicy_vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnglobal_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 vpnurlpolicy_vpnglobal_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnurlpolicy_vpnglobal_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnurlpolicy_vpnglobal_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnglobal_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnurlpolicy_vpnglobal_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnglobal_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-ADCGetVpnurlpolicyvpnglobalbinding: Ended"
    }
}

function Invoke-ADCGetVpnurlpolicyvpnvserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnvserver that can be bound to vpnurlpolicy.
    .PARAMETER Name
        Name for the new urlPolicy.
    .PARAMETER GetAll
        Retrieve all vpnurlpolicy_vpnvserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnurlpolicy_vpnvserver_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-ADCGetVpnurlpolicyvpnvserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyvpnvserverbinding -GetAll
        Get all vpnurlpolicy_vpnvserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyvpnvserverbinding -Count
        Get the number of vpnurlpolicy_vpnvserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyvpnvserverbinding -name <string>
        Get vpnurlpolicy_vpnvserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnurlpolicyvpnvserverbinding -Filter @{ 'name'='<value>' }
        Get vpnurlpolicy_vpnvserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnurlpolicyvpnvserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnurlpolicy_vpnvserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnurlpolicyvpnvserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnurlpolicy_vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnvserver_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 vpnurlpolicy_vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnurlpolicy_vpnvserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnurlpolicy_vpnvserver_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnvserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnurlpolicy_vpnvserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnurlpolicy_vpnvserver_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-ADCGetVpnurlpolicyvpnvserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnvserver {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .PARAMETER Servicetype
        Protocol used by the Citrix Gateway virtual server.
        Possible values = SSL, DTLS
    .PARAMETER Ipv46
        IPv4 or IPv6 address of the Citrix Gateway virtual server. Usually a public IP address. User devices send connection requests to this IP address.
    .PARAMETER Range
        Range of Citrix Gateway virtual server IP addresses. The consecutively numbered range of IP addresses begins with the address specified by the IP Address parameter.
        In the configuration utility, select Network VServer to enter a range.
    .PARAMETER Port
        TCP port on which the virtual server listens.
        * in CLI is represented as 65535 in NITRO API
    .PARAMETER Ipset
        The list of IPv4/IPv6 addresses bound to ipset would form a part of listening service on the current vpn vserver.
    .PARAMETER State
        State of the virtual server. If the virtual server is disabled, requests are not processed.
        Possible values = ENABLED, DISABLED
    .PARAMETER Authentication
        Require authentication for users connecting to Citrix Gateway.
        Possible values = ON, OFF
    .PARAMETER Doublehop
        Use the Citrix Gateway appliance in a double-hop configuration. A double-hop deployment provides an extra layer of security for the internal network by using three firewalls to divide the DMZ into two stages. Such a deployment can have one appliance in the DMZ and one appliance in the secure network.
        Possible values = ENABLED, DISABLED
    .PARAMETER Maxaaausers
        Maximum number of concurrent user sessions allowed on this virtual server. The actual number of users allowed to log on to this virtual server depends on the total number of user licenses.
    .PARAMETER Icaonly
        - When set to ON, it implies Basic mode where the user can log on using either Citrix Receiver or a browser and get access to the published apps configured at the XenApp/XenDEsktop environment pointed out by the WIHome parameter. Users are not allowed to connect using the Citrix Gateway Plug-in and end point scans cannot be configured. Number of users that can log in and access the apps are not limited by the license in this mode.
        - When set to OFF, it implies Smart Access mode where the user can log on using either Citrix Receiver or a browser or a Citrix Gateway Plug-in. The admin can configure end point scans to be run on the client systems and then use the results to control access to the published apps. In this mode, the client can connect to the gateway in other client modes namely VPN and CVPN. Number of users that can log in and access the resources are limited by the CCU licenses in this mode.
        Possible values = ON, OFF
    .PARAMETER Icaproxysessionmigration
        This option determines if an existing ICA Proxy session is transferred when the user logs on from another device.
        Possible values = ON, OFF
    .PARAMETER Dtls
        This option starts/stops the turn service on the vserver.
        Possible values = ON, OFF
    .PARAMETER Loginonce
        This option enables/disables seamless SSO for this Vserver.
        Possible values = ON, OFF
    .PARAMETER Advancedepa
        This option tells whether advanced EPA is enabled on this virtual server.
        Possible values = ON, OFF
    .PARAMETER Devicecert
        Indicates whether device certificate check as a part of EPA is on or off.
        Possible values = ON, OFF
    .PARAMETER Certkeynames
        Name of the certificate key that was bound to the corresponding SSL virtual server as the Certificate Authority for the device certificate.
    .PARAMETER Downstateflush
        Close existing connections when the virtual server is marked DOWN, which means the server might have timed out. Disconnecting existing connections frees resources and in certain cases speeds recovery of overloaded load balancing setups. Enable this setting on servers in which the connections can safely be closed when they are marked DOWN. Do not enable DOWN state flush on servers that must complete their transactions.
        Possible values = ENABLED, DISABLED
    .PARAMETER Listenpolicy
        String specifying the listen policy for the Citrix Gateway virtual server. Can be either a named expression or an expression. The Citrix Gateway virtual server processes only the traffic for which the expression evaluates to true.
    .PARAMETER Listenpriority
        Integer specifying the priority of the listen policy. A higher number specifies a lower priority. If a request matches the listen policies of more than one virtual server, the virtual server whose listen policy has the highest priority (the lowest priority number) accepts the request.
    .PARAMETER Tcpprofilename
        Name of the TCP profile to assign to this virtual server.
    .PARAMETER Httpprofilename
        Name of the HTTP profile to assign to this virtual server.
    .PARAMETER Comment
        Any comments associated with the virtual server.
    .PARAMETER Appflowlog
        Log AppFlow records that contain standard NetFlow or IPFIX information, such as time stamps for the beginning and end of a flow, packet count, and byte count. Also log records that contain application-level information, such as HTTP web addresses, HTTP request methods and response status codes, server response time, and latency.
        Possible values = ENABLED, DISABLED
    .PARAMETER Icmpvsrresponse
        Criterion for responding to PING requests sent to this virtual server. If this parameter is set to ACTIVE, respond only if the virtual server is available. With the PASSIVE setting, respond even if the virtual server is not available.
        Possible values = PASSIVE, ACTIVE
    .PARAMETER Rhistate
        A host route is injected according to the setting on the virtual servers.
        * If set to PASSIVE on all the virtual servers that share the IP address, the appliance always injects the hostroute.
        * If set to ACTIVE on all the virtual servers that share the IP address, the appliance injects even if one virtual server is UP.
        * If set to ACTIVE on some virtual servers and PASSIVE on the others, the appliance injects even if one virtual server set to ACTIVE is UP.
        Possible values = PASSIVE, ACTIVE
    .PARAMETER Netprofile
        The name of the network profile.
    .PARAMETER Cginfrahomepageredirect
        When client requests ShareFile resources and Citrix Gateway detects that the user is unauthenticated or the user session has expired, disabling this option takes the user to the originally requested ShareFile resource after authentication (instead of taking the user to the default VPN home page).
        Possible values = ENABLED, DISABLED
    .PARAMETER Maxloginattempts
        Maximum number of logon attempts.
    .PARAMETER Failedlogintimeout
        Number of minutes an account will be locked if user exceeds maximum permissible attempts.
    .PARAMETER L2conn
        Use Layer 2 parameters (channel number, MAC address, and VLAN ID) in addition to the 4-tuple (<source IP>:<source port>::<destination IP>:<destination port>) that is used to identify a connection. Allows multiple TCP and non-TCP connections with the same 4-tuple to coexist on the Citrix ADC.
        Possible values = ON, OFF
    .PARAMETER Deploymenttype
        .
        Possible values = NONE, ICA_WEBINTERFACE, ICA_STOREFRONT, MOBILITY, WIONNS
    .PARAMETER Rdpserverprofilename
        Name of the RDP server profile associated with the vserver.
    .PARAMETER Windowsepapluginupgrade
        Option to set plugin upgrade behaviour for Win.
        Possible values = Always, Essential, Never
    .PARAMETER Linuxepapluginupgrade
        Option to set plugin upgrade behaviour for Linux.
        Possible values = Always, Essential, Never
    .PARAMETER Macepapluginupgrade
        Option to set plugin upgrade behaviour for Mac.
        Possible values = Always, Essential, Never
    .PARAMETER Logoutonsmartcardremoval
        Option to VPN plugin behavior when smartcard or its reader is removed.
        Possible values = ON, OFF
    .PARAMETER Userdomains
        List of user domains specified as comma seperated value.
    .PARAMETER Authnprofile
        Authentication Profile entity on virtual server. This entity can be used to offload authentication to AAA vserver for multi-factor(nFactor) authentication.
    .PARAMETER Vserverfqdn
        Fully qualified domain name for a VPN virtual server. This is used during StoreFront configuration generation.
    .PARAMETER Pcoipvserverprofilename
        Name of the PCoIP vserver profile associated with the vserver.
    .PARAMETER Samesite
        SameSite attribute value for Cookies generated in VPN context. This attribute value will be appended only for the cookies which are specified in the builtin patset ns_cookies_samesite.
        Possible values = None, LAX, STRICT
    .PARAMETER PassThru
        Return details about the created vpnvserver item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserver -name <string> -servicetype <string>
        An example how to add vpnvserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateSet('SSL', 'DTLS')]
        [string]$Servicetype = 'SSL',

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Ipv46,

        [double]$Range = '1',

        [ValidateRange(1, 65535)]
        [int]$Port,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Ipset,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State = 'ENABLED',

        [ValidateSet('ON', 'OFF')]
        [string]$Authentication = 'ON',

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Doublehop = 'DISABLED',

        [double]$Maxaaausers,

        [ValidateSet('ON', 'OFF')]
        [string]$Icaonly = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Icaproxysessionmigration = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Dtls = 'ON',

        [ValidateSet('ON', 'OFF')]
        [string]$Loginonce = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Advancedepa = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Devicecert = 'OFF',

        [ValidateLength(1, 127)]
        [string]$Certkeynames,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Downstateflush = 'ENABLED',

        [string]$Listenpolicy = '"none"',

        [ValidateRange(0, 100)]
        [double]$Listenpriority = '101',

        [ValidateLength(1, 127)]
        [string]$Tcpprofilename,

        [ValidateLength(1, 127)]
        [string]$Httpprofilename = '"nshttp_default_strict_validation"',

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Appflowlog = 'ENABLED',

        [ValidateSet('PASSIVE', 'ACTIVE')]
        [string]$Icmpvsrresponse = 'PASSIVE',

        [ValidateSet('PASSIVE', 'ACTIVE')]
        [string]$Rhistate = 'PASSIVE',

        [ValidateLength(1, 127)]
        [string]$Netprofile,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Cginfrahomepageredirect = 'ENABLED',

        [ValidateRange(1, 255)]
        [double]$Maxloginattempts,

        [double]$Failedlogintimeout,

        [ValidateSet('ON', 'OFF')]
        [string]$L2conn,

        [ValidateSet('NONE', 'ICA_WEBINTERFACE', 'ICA_STOREFRONT', 'MOBILITY', 'WIONNS')]
        [string]$Deploymenttype = '5',

        [ValidateLength(1, 31)]
        [string]$Rdpserverprofilename,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Windowsepapluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Linuxepapluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Macepapluginupgrade,

        [ValidateSet('ON', 'OFF')]
        [string]$Logoutonsmartcardremoval = 'OFF',

        [string]$Userdomains,

        [string]$Authnprofile,

        [string]$Vserverfqdn,

        [ValidateLength(1, 31)]
        [string]$Pcoipvserverprofilename,

        [ValidateSet('None', 'LAX', 'STRICT')]
        [string]$Samesite,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserver: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                servicetype    = $servicetype
            }
            if ( $PSBoundParameters.ContainsKey('ipv46') ) { $payload.Add('ipv46', $ipv46) }
            if ( $PSBoundParameters.ContainsKey('range') ) { $payload.Add('range', $range) }
            if ( $PSBoundParameters.ContainsKey('port') ) { $payload.Add('port', $port) }
            if ( $PSBoundParameters.ContainsKey('ipset') ) { $payload.Add('ipset', $ipset) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('authentication') ) { $payload.Add('authentication', $authentication) }
            if ( $PSBoundParameters.ContainsKey('doublehop') ) { $payload.Add('doublehop', $doublehop) }
            if ( $PSBoundParameters.ContainsKey('maxaaausers') ) { $payload.Add('maxaaausers', $maxaaausers) }
            if ( $PSBoundParameters.ContainsKey('icaonly') ) { $payload.Add('icaonly', $icaonly) }
            if ( $PSBoundParameters.ContainsKey('icaproxysessionmigration') ) { $payload.Add('icaproxysessionmigration', $icaproxysessionmigration) }
            if ( $PSBoundParameters.ContainsKey('dtls') ) { $payload.Add('dtls', $dtls) }
            if ( $PSBoundParameters.ContainsKey('loginonce') ) { $payload.Add('loginonce', $loginonce) }
            if ( $PSBoundParameters.ContainsKey('advancedepa') ) { $payload.Add('advancedepa', $advancedepa) }
            if ( $PSBoundParameters.ContainsKey('devicecert') ) { $payload.Add('devicecert', $devicecert) }
            if ( $PSBoundParameters.ContainsKey('certkeynames') ) { $payload.Add('certkeynames', $certkeynames) }
            if ( $PSBoundParameters.ContainsKey('downstateflush') ) { $payload.Add('downstateflush', $downstateflush) }
            if ( $PSBoundParameters.ContainsKey('listenpolicy') ) { $payload.Add('listenpolicy', $listenpolicy) }
            if ( $PSBoundParameters.ContainsKey('listenpriority') ) { $payload.Add('listenpriority', $listenpriority) }
            if ( $PSBoundParameters.ContainsKey('tcpprofilename') ) { $payload.Add('tcpprofilename', $tcpprofilename) }
            if ( $PSBoundParameters.ContainsKey('httpprofilename') ) { $payload.Add('httpprofilename', $httpprofilename) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('appflowlog') ) { $payload.Add('appflowlog', $appflowlog) }
            if ( $PSBoundParameters.ContainsKey('icmpvsrresponse') ) { $payload.Add('icmpvsrresponse', $icmpvsrresponse) }
            if ( $PSBoundParameters.ContainsKey('rhistate') ) { $payload.Add('rhistate', $rhistate) }
            if ( $PSBoundParameters.ContainsKey('netprofile') ) { $payload.Add('netprofile', $netprofile) }
            if ( $PSBoundParameters.ContainsKey('cginfrahomepageredirect') ) { $payload.Add('cginfrahomepageredirect', $cginfrahomepageredirect) }
            if ( $PSBoundParameters.ContainsKey('maxloginattempts') ) { $payload.Add('maxloginattempts', $maxloginattempts) }
            if ( $PSBoundParameters.ContainsKey('failedlogintimeout') ) { $payload.Add('failedlogintimeout', $failedlogintimeout) }
            if ( $PSBoundParameters.ContainsKey('l2conn') ) { $payload.Add('l2conn', $l2conn) }
            if ( $PSBoundParameters.ContainsKey('deploymenttype') ) { $payload.Add('deploymenttype', $deploymenttype) }
            if ( $PSBoundParameters.ContainsKey('rdpserverprofilename') ) { $payload.Add('rdpserverprofilename', $rdpserverprofilename) }
            if ( $PSBoundParameters.ContainsKey('windowsepapluginupgrade') ) { $payload.Add('windowsepapluginupgrade', $windowsepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('linuxepapluginupgrade') ) { $payload.Add('linuxepapluginupgrade', $linuxepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('macepapluginupgrade') ) { $payload.Add('macepapluginupgrade', $macepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('logoutonsmartcardremoval') ) { $payload.Add('logoutonsmartcardremoval', $logoutonsmartcardremoval) }
            if ( $PSBoundParameters.ContainsKey('userdomains') ) { $payload.Add('userdomains', $userdomains) }
            if ( $PSBoundParameters.ContainsKey('authnprofile') ) { $payload.Add('authnprofile', $authnprofile) }
            if ( $PSBoundParameters.ContainsKey('vserverfqdn') ) { $payload.Add('vserverfqdn', $vserverfqdn) }
            if ( $PSBoundParameters.ContainsKey('pcoipvserverprofilename') ) { $payload.Add('pcoipvserverprofilename', $pcoipvserverprofilename) }
            if ( $PSBoundParameters.ContainsKey('samesite') ) { $payload.Add('samesite', $samesite) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnvserver -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-ADCGetVpnvserver -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserver: Finished"
    }
}

function Invoke-ADCDeleteVpnvserver {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserver -Name <string>
        An example how to delete vpnvserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserver: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver -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-ADCDeleteVpnvserver: Finished"
    }
}

function Invoke-ADCUpdateVpnvserver {
    <#
    .SYNOPSIS
        Update SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .PARAMETER Ipv46
        IPv4 or IPv6 address of the Citrix Gateway virtual server. Usually a public IP address. User devices send connection requests to this IP address.
    .PARAMETER Ipset
        The list of IPv4/IPv6 addresses bound to ipset would form a part of listening service on the current vpn vserver.
    .PARAMETER Authentication
        Require authentication for users connecting to Citrix Gateway.
        Possible values = ON, OFF
    .PARAMETER Doublehop
        Use the Citrix Gateway appliance in a double-hop configuration. A double-hop deployment provides an extra layer of security for the internal network by using three firewalls to divide the DMZ into two stages. Such a deployment can have one appliance in the DMZ and one appliance in the secure network.
        Possible values = ENABLED, DISABLED
    .PARAMETER Icaonly
        - When set to ON, it implies Basic mode where the user can log on using either Citrix Receiver or a browser and get access to the published apps configured at the XenApp/XenDEsktop environment pointed out by the WIHome parameter. Users are not allowed to connect using the Citrix Gateway Plug-in and end point scans cannot be configured. Number of users that can log in and access the apps are not limited by the license in this mode.
        - When set to OFF, it implies Smart Access mode where the user can log on using either Citrix Receiver or a browser or a Citrix Gateway Plug-in. The admin can configure end point scans to be run on the client systems and then use the results to control access to the published apps. In this mode, the client can connect to the gateway in other client modes namely VPN and CVPN. Number of users that can log in and access the resources are limited by the CCU licenses in this mode.
        Possible values = ON, OFF
    .PARAMETER Icaproxysessionmigration
        This option determines if an existing ICA Proxy session is transferred when the user logs on from another device.
        Possible values = ON, OFF
    .PARAMETER Dtls
        This option starts/stops the turn service on the vserver.
        Possible values = ON, OFF
    .PARAMETER Loginonce
        This option enables/disables seamless SSO for this Vserver.
        Possible values = ON, OFF
    .PARAMETER Advancedepa
        This option tells whether advanced EPA is enabled on this virtual server.
        Possible values = ON, OFF
    .PARAMETER Devicecert
        Indicates whether device certificate check as a part of EPA is on or off.
        Possible values = ON, OFF
    .PARAMETER Certkeynames
        Name of the certificate key that was bound to the corresponding SSL virtual server as the Certificate Authority for the device certificate.
    .PARAMETER Maxaaausers
        Maximum number of concurrent user sessions allowed on this virtual server. The actual number of users allowed to log on to this virtual server depends on the total number of user licenses.
    .PARAMETER Downstateflush
        Close existing connections when the virtual server is marked DOWN, which means the server might have timed out. Disconnecting existing connections frees resources and in certain cases speeds recovery of overloaded load balancing setups. Enable this setting on servers in which the connections can safely be closed when they are marked DOWN. Do not enable DOWN state flush on servers that must complete their transactions.
        Possible values = ENABLED, DISABLED
    .PARAMETER Listenpolicy
        String specifying the listen policy for the Citrix Gateway virtual server. Can be either a named expression or an expression. The Citrix Gateway virtual server processes only the traffic for which the expression evaluates to true.
    .PARAMETER Listenpriority
        Integer specifying the priority of the listen policy. A higher number specifies a lower priority. If a request matches the listen policies of more than one virtual server, the virtual server whose listen policy has the highest priority (the lowest priority number) accepts the request.
    .PARAMETER Tcpprofilename
        Name of the TCP profile to assign to this virtual server.
    .PARAMETER Httpprofilename
        Name of the HTTP profile to assign to this virtual server.
    .PARAMETER Comment
        Any comments associated with the virtual server.
    .PARAMETER Appflowlog
        Log AppFlow records that contain standard NetFlow or IPFIX information, such as time stamps for the beginning and end of a flow, packet count, and byte count. Also log records that contain application-level information, such as HTTP web addresses, HTTP request methods and response status codes, server response time, and latency.
        Possible values = ENABLED, DISABLED
    .PARAMETER Icmpvsrresponse
        Criterion for responding to PING requests sent to this virtual server. If this parameter is set to ACTIVE, respond only if the virtual server is available. With the PASSIVE setting, respond even if the virtual server is not available.
        Possible values = PASSIVE, ACTIVE
    .PARAMETER Rhistate
        A host route is injected according to the setting on the virtual servers.
        * If set to PASSIVE on all the virtual servers that share the IP address, the appliance always injects the hostroute.
        * If set to ACTIVE on all the virtual servers that share the IP address, the appliance injects even if one virtual server is UP.
        * If set to ACTIVE on some virtual servers and PASSIVE on the others, the appliance injects even if one virtual server set to ACTIVE is UP.
        Possible values = PASSIVE, ACTIVE
    .PARAMETER Netprofile
        The name of the network profile.
    .PARAMETER Cginfrahomepageredirect
        When client requests ShareFile resources and Citrix Gateway detects that the user is unauthenticated or the user session has expired, disabling this option takes the user to the originally requested ShareFile resource after authentication (instead of taking the user to the default VPN home page).
        Possible values = ENABLED, DISABLED
    .PARAMETER Maxloginattempts
        Maximum number of logon attempts.
    .PARAMETER Rdpserverprofilename
        Name of the RDP server profile associated with the vserver.
    .PARAMETER Failedlogintimeout
        Number of minutes an account will be locked if user exceeds maximum permissible attempts.
    .PARAMETER L2conn
        Use Layer 2 parameters (channel number, MAC address, and VLAN ID) in addition to the 4-tuple (<source IP>:<source port>::<destination IP>:<destination port>) that is used to identify a connection. Allows multiple TCP and non-TCP connections with the same 4-tuple to coexist on the Citrix ADC.
        Possible values = ON, OFF
    .PARAMETER Windowsepapluginupgrade
        Option to set plugin upgrade behaviour for Win.
        Possible values = Always, Essential, Never
    .PARAMETER Macepapluginupgrade
        Option to set plugin upgrade behaviour for Mac.
        Possible values = Always, Essential, Never
    .PARAMETER Linuxepapluginupgrade
        Option to set plugin upgrade behaviour for Linux.
        Possible values = Always, Essential, Never
    .PARAMETER Logoutonsmartcardremoval
        Option to VPN plugin behavior when smartcard or its reader is removed.
        Possible values = ON, OFF
    .PARAMETER Userdomains
        List of user domains specified as comma seperated value.
    .PARAMETER Authnprofile
        Authentication Profile entity on virtual server. This entity can be used to offload authentication to AAA vserver for multi-factor(nFactor) authentication.
    .PARAMETER Vserverfqdn
        Fully qualified domain name for a VPN virtual server. This is used during StoreFront configuration generation.
    .PARAMETER Pcoipvserverprofilename
        Name of the PCoIP vserver profile associated with the vserver.
    .PARAMETER Samesite
        SameSite attribute value for Cookies generated in VPN context. This attribute value will be appended only for the cookies which are specified in the builtin patset ns_cookies_samesite.
        Possible values = None, LAX, STRICT
    .PARAMETER PassThru
        Return details about the created vpnvserver item.
    .EXAMPLE
        PS C:\>Invoke-ADCUpdateVpnvserver -name <string>
        An example how to update vpnvserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUpdateVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Ipv46,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Ipset,

        [ValidateSet('ON', 'OFF')]
        [string]$Authentication,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Doublehop,

        [ValidateSet('ON', 'OFF')]
        [string]$Icaonly,

        [ValidateSet('ON', 'OFF')]
        [string]$Icaproxysessionmigration,

        [ValidateSet('ON', 'OFF')]
        [string]$Dtls,

        [ValidateSet('ON', 'OFF')]
        [string]$Loginonce,

        [ValidateSet('ON', 'OFF')]
        [string]$Advancedepa,

        [ValidateSet('ON', 'OFF')]
        [string]$Devicecert,

        [ValidateLength(1, 127)]
        [string]$Certkeynames,

        [double]$Maxaaausers,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Downstateflush,

        [string]$Listenpolicy,

        [ValidateRange(0, 100)]
        [double]$Listenpriority,

        [ValidateLength(1, 127)]
        [string]$Tcpprofilename,

        [ValidateLength(1, 127)]
        [string]$Httpprofilename,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Appflowlog,

        [ValidateSet('PASSIVE', 'ACTIVE')]
        [string]$Icmpvsrresponse,

        [ValidateSet('PASSIVE', 'ACTIVE')]
        [string]$Rhistate,

        [ValidateLength(1, 127)]
        [string]$Netprofile,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$Cginfrahomepageredirect,

        [ValidateRange(1, 255)]
        [double]$Maxloginattempts,

        [ValidateLength(1, 31)]
        [string]$Rdpserverprofilename,

        [double]$Failedlogintimeout,

        [ValidateSet('ON', 'OFF')]
        [string]$L2conn,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Windowsepapluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Macepapluginupgrade,

        [ValidateSet('Always', 'Essential', 'Never')]
        [string]$Linuxepapluginupgrade,

        [ValidateSet('ON', 'OFF')]
        [string]$Logoutonsmartcardremoval,

        [string]$Userdomains,

        [string]$Authnprofile,

        [string]$Vserverfqdn,

        [ValidateLength(1, 31)]
        [string]$Pcoipvserverprofilename,

        [ValidateSet('None', 'LAX', 'STRICT')]
        [string]$Samesite,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCUpdateVpnvserver: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('ipv46') ) { $payload.Add('ipv46', $ipv46) }
            if ( $PSBoundParameters.ContainsKey('ipset') ) { $payload.Add('ipset', $ipset) }
            if ( $PSBoundParameters.ContainsKey('authentication') ) { $payload.Add('authentication', $authentication) }
            if ( $PSBoundParameters.ContainsKey('doublehop') ) { $payload.Add('doublehop', $doublehop) }
            if ( $PSBoundParameters.ContainsKey('icaonly') ) { $payload.Add('icaonly', $icaonly) }
            if ( $PSBoundParameters.ContainsKey('icaproxysessionmigration') ) { $payload.Add('icaproxysessionmigration', $icaproxysessionmigration) }
            if ( $PSBoundParameters.ContainsKey('dtls') ) { $payload.Add('dtls', $dtls) }
            if ( $PSBoundParameters.ContainsKey('loginonce') ) { $payload.Add('loginonce', $loginonce) }
            if ( $PSBoundParameters.ContainsKey('advancedepa') ) { $payload.Add('advancedepa', $advancedepa) }
            if ( $PSBoundParameters.ContainsKey('devicecert') ) { $payload.Add('devicecert', $devicecert) }
            if ( $PSBoundParameters.ContainsKey('certkeynames') ) { $payload.Add('certkeynames', $certkeynames) }
            if ( $PSBoundParameters.ContainsKey('maxaaausers') ) { $payload.Add('maxaaausers', $maxaaausers) }
            if ( $PSBoundParameters.ContainsKey('downstateflush') ) { $payload.Add('downstateflush', $downstateflush) }
            if ( $PSBoundParameters.ContainsKey('listenpolicy') ) { $payload.Add('listenpolicy', $listenpolicy) }
            if ( $PSBoundParameters.ContainsKey('listenpriority') ) { $payload.Add('listenpriority', $listenpriority) }
            if ( $PSBoundParameters.ContainsKey('tcpprofilename') ) { $payload.Add('tcpprofilename', $tcpprofilename) }
            if ( $PSBoundParameters.ContainsKey('httpprofilename') ) { $payload.Add('httpprofilename', $httpprofilename) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('appflowlog') ) { $payload.Add('appflowlog', $appflowlog) }
            if ( $PSBoundParameters.ContainsKey('icmpvsrresponse') ) { $payload.Add('icmpvsrresponse', $icmpvsrresponse) }
            if ( $PSBoundParameters.ContainsKey('rhistate') ) { $payload.Add('rhistate', $rhistate) }
            if ( $PSBoundParameters.ContainsKey('netprofile') ) { $payload.Add('netprofile', $netprofile) }
            if ( $PSBoundParameters.ContainsKey('cginfrahomepageredirect') ) { $payload.Add('cginfrahomepageredirect', $cginfrahomepageredirect) }
            if ( $PSBoundParameters.ContainsKey('maxloginattempts') ) { $payload.Add('maxloginattempts', $maxloginattempts) }
            if ( $PSBoundParameters.ContainsKey('rdpserverprofilename') ) { $payload.Add('rdpserverprofilename', $rdpserverprofilename) }
            if ( $PSBoundParameters.ContainsKey('failedlogintimeout') ) { $payload.Add('failedlogintimeout', $failedlogintimeout) }
            if ( $PSBoundParameters.ContainsKey('l2conn') ) { $payload.Add('l2conn', $l2conn) }
            if ( $PSBoundParameters.ContainsKey('windowsepapluginupgrade') ) { $payload.Add('windowsepapluginupgrade', $windowsepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('macepapluginupgrade') ) { $payload.Add('macepapluginupgrade', $macepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('linuxepapluginupgrade') ) { $payload.Add('linuxepapluginupgrade', $linuxepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('logoutonsmartcardremoval') ) { $payload.Add('logoutonsmartcardremoval', $logoutonsmartcardremoval) }
            if ( $PSBoundParameters.ContainsKey('userdomains') ) { $payload.Add('userdomains', $userdomains) }
            if ( $PSBoundParameters.ContainsKey('authnprofile') ) { $payload.Add('authnprofile', $authnprofile) }
            if ( $PSBoundParameters.ContainsKey('vserverfqdn') ) { $payload.Add('vserverfqdn', $vserverfqdn) }
            if ( $PSBoundParameters.ContainsKey('pcoipvserverprofilename') ) { $payload.Add('pcoipvserverprofilename', $pcoipvserverprofilename) }
            if ( $PSBoundParameters.ContainsKey('samesite') ) { $payload.Add('samesite', $samesite) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver", "Update SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver -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-ADCGetVpnvserver -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCUpdateVpnvserver: Finished"
    }
}

function Invoke-ADCUnsetVpnvserver {
    <#
    .SYNOPSIS
        Unset SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .PARAMETER Ipset
        The list of IPv4/IPv6 addresses bound to ipset would form a part of listening service on the current vpn vserver.
    .PARAMETER Authentication
        Require authentication for users connecting to Citrix Gateway.
        Possible values = ON, OFF
    .PARAMETER Doublehop
        Use the Citrix Gateway appliance in a double-hop configuration. A double-hop deployment provides an extra layer of security for the internal network by using three firewalls to divide the DMZ into two stages. Such a deployment can have one appliance in the DMZ and one appliance in the secure network.
        Possible values = ENABLED, DISABLED
    .PARAMETER Icaonly
        - When set to ON, it implies Basic mode where the user can log on using either Citrix Receiver or a browser and get access to the published apps configured at the XenApp/XenDEsktop environment pointed out by the WIHome parameter. Users are not allowed to connect using the Citrix Gateway Plug-in and end point scans cannot be configured. Number of users that can log in and access the apps are not limited by the license in this mode.
        - When set to OFF, it implies Smart Access mode where the user can log on using either Citrix Receiver or a browser or a Citrix Gateway Plug-in. The admin can configure end point scans to be run on the client systems and then use the results to control access to the published apps. In this mode, the client can connect to the gateway in other client modes namely VPN and CVPN. Number of users that can log in and access the resources are limited by the CCU licenses in this mode.
        Possible values = ON, OFF
    .PARAMETER Icaproxysessionmigration
        This option determines if an existing ICA Proxy session is transferred when the user logs on from another device.
        Possible values = ON, OFF
    .PARAMETER Dtls
        This option starts/stops the turn service on the vserver.
        Possible values = ON, OFF
    .PARAMETER Loginonce
        This option enables/disables seamless SSO for this Vserver.
        Possible values = ON, OFF
    .PARAMETER Advancedepa
        This option tells whether advanced EPA is enabled on this virtual server.
        Possible values = ON, OFF
    .PARAMETER Devicecert
        Indicates whether device certificate check as a part of EPA is on or off.
        Possible values = ON, OFF
    .PARAMETER Certkeynames
        Name of the certificate key that was bound to the corresponding SSL virtual server as the Certificate Authority for the device certificate.
    .PARAMETER Maxaaausers
        Maximum number of concurrent user sessions allowed on this virtual server. The actual number of users allowed to log on to this virtual server depends on the total number of user licenses.
    .PARAMETER Downstateflush
        Close existing connections when the virtual server is marked DOWN, which means the server might have timed out. Disconnecting existing connections frees resources and in certain cases speeds recovery of overloaded load balancing setups. Enable this setting on servers in which the connections can safely be closed when they are marked DOWN. Do not enable DOWN state flush on servers that must complete their transactions.
        Possible values = ENABLED, DISABLED
    .PARAMETER Listenpolicy
        String specifying the listen policy for the Citrix Gateway virtual server. Can be either a named expression or an expression. The Citrix Gateway virtual server processes only the traffic for which the expression evaluates to true.
    .PARAMETER Listenpriority
        Integer specifying the priority of the listen policy. A higher number specifies a lower priority. If a request matches the listen policies of more than one virtual server, the virtual server whose listen policy has the highest priority (the lowest priority number) accepts the request.
    .PARAMETER Tcpprofilename
        Name of the TCP profile to assign to this virtual server.
    .PARAMETER Httpprofilename
        Name of the HTTP profile to assign to this virtual server.
    .PARAMETER Comment
        Any comments associated with the virtual server.
    .PARAMETER Appflowlog
        Log AppFlow records that contain standard NetFlow or IPFIX information, such as time stamps for the beginning and end of a flow, packet count, and byte count. Also log records that contain application-level information, such as HTTP web addresses, HTTP request methods and response status codes, server response time, and latency.
        Possible values = ENABLED, DISABLED
    .PARAMETER Icmpvsrresponse
        Criterion for responding to PING requests sent to this virtual server. If this parameter is set to ACTIVE, respond only if the virtual server is available. With the PASSIVE setting, respond even if the virtual server is not available.
        Possible values = PASSIVE, ACTIVE
    .PARAMETER Rhistate
        A host route is injected according to the setting on the virtual servers.
        * If set to PASSIVE on all the virtual servers that share the IP address, the appliance always injects the hostroute.
        * If set to ACTIVE on all the virtual servers that share the IP address, the appliance injects even if one virtual server is UP.
        * If set to ACTIVE on some virtual servers and PASSIVE on the others, the appliance injects even if one virtual server set to ACTIVE is UP.
        Possible values = PASSIVE, ACTIVE
    .PARAMETER Netprofile
        The name of the network profile.
    .PARAMETER Cginfrahomepageredirect
        When client requests ShareFile resources and Citrix Gateway detects that the user is unauthenticated or the user session has expired, disabling this option takes the user to the originally requested ShareFile resource after authentication (instead of taking the user to the default VPN home page).
        Possible values = ENABLED, DISABLED
    .PARAMETER Maxloginattempts
        Maximum number of logon attempts.
    .PARAMETER Rdpserverprofilename
        Name of the RDP server profile associated with the vserver.
    .PARAMETER L2conn
        Use Layer 2 parameters (channel number, MAC address, and VLAN ID) in addition to the 4-tuple (<source IP>:<source port>::<destination IP>:<destination port>) that is used to identify a connection. Allows multiple TCP and non-TCP connections with the same 4-tuple to coexist on the Citrix ADC.
        Possible values = ON, OFF
    .PARAMETER Windowsepapluginupgrade
        Option to set plugin upgrade behaviour for Win.
        Possible values = Always, Essential, Never
    .PARAMETER Macepapluginupgrade
        Option to set plugin upgrade behaviour for Mac.
        Possible values = Always, Essential, Never
    .PARAMETER Linuxepapluginupgrade
        Option to set plugin upgrade behaviour for Linux.
        Possible values = Always, Essential, Never
    .PARAMETER Logoutonsmartcardremoval
        Option to VPN plugin behavior when smartcard or its reader is removed.
        Possible values = ON, OFF
    .PARAMETER Userdomains
        List of user domains specified as comma seperated value.
    .PARAMETER Authnprofile
        Authentication Profile entity on virtual server. This entity can be used to offload authentication to AAA vserver for multi-factor(nFactor) authentication.
    .PARAMETER Vserverfqdn
        Fully qualified domain name for a VPN virtual server. This is used during StoreFront configuration generation.
    .PARAMETER Pcoipvserverprofilename
        Name of the PCoIP vserver profile associated with the vserver.
    .PARAMETER Samesite
        SameSite attribute value for Cookies generated in VPN context. This attribute value will be appended only for the cookies which are specified in the builtin patset ns_cookies_samesite.
        Possible values = None, LAX, STRICT
    .EXAMPLE
        PS C:\>Invoke-ADCUnsetVpnvserver -name <string>
        An example how to unset vpnvserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCUnsetVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Boolean]$ipset,

        [Boolean]$authentication,

        [Boolean]$doublehop,

        [Boolean]$icaonly,

        [Boolean]$icaproxysessionmigration,

        [Boolean]$dtls,

        [Boolean]$loginonce,

        [Boolean]$advancedepa,

        [Boolean]$devicecert,

        [Boolean]$certkeynames,

        [Boolean]$maxaaausers,

        [Boolean]$downstateflush,

        [Boolean]$listenpolicy,

        [Boolean]$listenpriority,

        [Boolean]$tcpprofilename,

        [Boolean]$httpprofilename,

        [Boolean]$comment,

        [Boolean]$appflowlog,

        [Boolean]$icmpvsrresponse,

        [Boolean]$rhistate,

        [Boolean]$netprofile,

        [Boolean]$cginfrahomepageredirect,

        [Boolean]$maxloginattempts,

        [Boolean]$rdpserverprofilename,

        [Boolean]$l2conn,

        [Boolean]$windowsepapluginupgrade,

        [Boolean]$macepapluginupgrade,

        [Boolean]$linuxepapluginupgrade,

        [Boolean]$logoutonsmartcardremoval,

        [Boolean]$userdomains,

        [Boolean]$authnprofile,

        [Boolean]$vserverfqdn,

        [Boolean]$pcoipvserverprofilename,

        [Boolean]$samesite 
    )
    begin {
        Write-Verbose "Invoke-ADCUnsetVpnvserver: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('ipset') ) { $payload.Add('ipset', $ipset) }
            if ( $PSBoundParameters.ContainsKey('authentication') ) { $payload.Add('authentication', $authentication) }
            if ( $PSBoundParameters.ContainsKey('doublehop') ) { $payload.Add('doublehop', $doublehop) }
            if ( $PSBoundParameters.ContainsKey('icaonly') ) { $payload.Add('icaonly', $icaonly) }
            if ( $PSBoundParameters.ContainsKey('icaproxysessionmigration') ) { $payload.Add('icaproxysessionmigration', $icaproxysessionmigration) }
            if ( $PSBoundParameters.ContainsKey('dtls') ) { $payload.Add('dtls', $dtls) }
            if ( $PSBoundParameters.ContainsKey('loginonce') ) { $payload.Add('loginonce', $loginonce) }
            if ( $PSBoundParameters.ContainsKey('advancedepa') ) { $payload.Add('advancedepa', $advancedepa) }
            if ( $PSBoundParameters.ContainsKey('devicecert') ) { $payload.Add('devicecert', $devicecert) }
            if ( $PSBoundParameters.ContainsKey('certkeynames') ) { $payload.Add('certkeynames', $certkeynames) }
            if ( $PSBoundParameters.ContainsKey('maxaaausers') ) { $payload.Add('maxaaausers', $maxaaausers) }
            if ( $PSBoundParameters.ContainsKey('downstateflush') ) { $payload.Add('downstateflush', $downstateflush) }
            if ( $PSBoundParameters.ContainsKey('listenpolicy') ) { $payload.Add('listenpolicy', $listenpolicy) }
            if ( $PSBoundParameters.ContainsKey('listenpriority') ) { $payload.Add('listenpriority', $listenpriority) }
            if ( $PSBoundParameters.ContainsKey('tcpprofilename') ) { $payload.Add('tcpprofilename', $tcpprofilename) }
            if ( $PSBoundParameters.ContainsKey('httpprofilename') ) { $payload.Add('httpprofilename', $httpprofilename) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('appflowlog') ) { $payload.Add('appflowlog', $appflowlog) }
            if ( $PSBoundParameters.ContainsKey('icmpvsrresponse') ) { $payload.Add('icmpvsrresponse', $icmpvsrresponse) }
            if ( $PSBoundParameters.ContainsKey('rhistate') ) { $payload.Add('rhistate', $rhistate) }
            if ( $PSBoundParameters.ContainsKey('netprofile') ) { $payload.Add('netprofile', $netprofile) }
            if ( $PSBoundParameters.ContainsKey('cginfrahomepageredirect') ) { $payload.Add('cginfrahomepageredirect', $cginfrahomepageredirect) }
            if ( $PSBoundParameters.ContainsKey('maxloginattempts') ) { $payload.Add('maxloginattempts', $maxloginattempts) }
            if ( $PSBoundParameters.ContainsKey('rdpserverprofilename') ) { $payload.Add('rdpserverprofilename', $rdpserverprofilename) }
            if ( $PSBoundParameters.ContainsKey('l2conn') ) { $payload.Add('l2conn', $l2conn) }
            if ( $PSBoundParameters.ContainsKey('windowsepapluginupgrade') ) { $payload.Add('windowsepapluginupgrade', $windowsepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('macepapluginupgrade') ) { $payload.Add('macepapluginupgrade', $macepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('linuxepapluginupgrade') ) { $payload.Add('linuxepapluginupgrade', $linuxepapluginupgrade) }
            if ( $PSBoundParameters.ContainsKey('logoutonsmartcardremoval') ) { $payload.Add('logoutonsmartcardremoval', $logoutonsmartcardremoval) }
            if ( $PSBoundParameters.ContainsKey('userdomains') ) { $payload.Add('userdomains', $userdomains) }
            if ( $PSBoundParameters.ContainsKey('authnprofile') ) { $payload.Add('authnprofile', $authnprofile) }
            if ( $PSBoundParameters.ContainsKey('vserverfqdn') ) { $payload.Add('vserverfqdn', $vserverfqdn) }
            if ( $PSBoundParameters.ContainsKey('pcoipvserverprofilename') ) { $payload.Add('pcoipvserverprofilename', $pcoipvserverprofilename) }
            if ( $PSBoundParameters.ContainsKey('samesite') ) { $payload.Add('samesite', $samesite) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -Type vpnvserver -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-ADCUnsetVpnvserver: Finished"
    }
}

function Invoke-ADCEnableVpnvserver {
    <#
    .SYNOPSIS
        Enable SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .EXAMPLE
        PS C:\>Invoke-ADCEnableVpnvserver -name <string>
        An example how to enable vpnvserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCEnableVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name 

    )
    begin {
        Write-Verbose "Invoke-ADCEnableVpnvserver: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }

            if ( $PSCmdlet.ShouldProcess($Name, "Enable SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnvserver -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-ADCEnableVpnvserver: Finished"
    }
}

function Invoke-ADCDisableVpnvserver {
    <#
    .SYNOPSIS
        Disable SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .EXAMPLE
        PS C:\>Invoke-ADCDisableVpnvserver -name <string>
        An example how to disable vpnvserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDisableVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name 

    )
    begin {
        Write-Verbose "Invoke-ADCDisableVpnvserver: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }

            if ( $PSCmdlet.ShouldProcess($Name, "Disable SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnvserver -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-ADCDisableVpnvserver: Finished"
    }
}

function Invoke-ADCRenameVpnvserver {
    <#
    .SYNOPSIS
        Rename SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .PARAMETER Newname
        New name for the Citrix Gateway virtual server. 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 vpnvserver item.
    .EXAMPLE
        PS C:\>Invoke-ADCRenameVpnvserver -name <string> -newname <string>
        An example how to rename vpnvserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCRenameVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Newname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCRenameVpnvserver: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                newname        = $newname
            }

            if ( $PSCmdlet.ShouldProcess("vpnvserver", "Rename SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnvserver -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-ADCGetVpnvserver -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCRenameVpnvserver: Finished"
    }
}

function Invoke-ADCCheckVpnvserver {
    <#
    .SYNOPSIS
        Check SSL VPN configuration Object.
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .EXAMPLE
        PS C:\>Invoke-ADCCheckVpnvserver -name <string>
        An example how to check vpnvserver configuration Object(s).
    .NOTES
        File Name : Invoke-ADCCheckVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [string]$Name 

    )
    begin {
        Write-Verbose "Invoke-ADCCheckVpnvserver: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }

            if ( $PSCmdlet.ShouldProcess($Name, "Check SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method POST -NitroPath nitro/v1/config -Type vpnvserver -Action check -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-ADCCheckVpnvserver: Finished"
    }
}

function Invoke-ADCGetVpnvserver {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Configuration for VPN virtual server resource.
    .PARAMETER Name
        Name for the Citrix Gateway virtual server. 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. Can be changed after the virtual server is created.
    .PARAMETER GetAll
        Retrieve all vpnvserver object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver 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-ADCGetVpnvserver
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserver -GetAll
        Get all vpnvserver data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserver -Count
        Get the number of vpnvserver objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserver -name <string>
        Get vpnvserver object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserver -Filter @{ 'name'='<value>' }
        Get vpnvserver data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserver
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [ValidatePattern('^(([a-zA-Z0-9]|[_])+([\x00-\x7F]|[_]|[#]|[.][ ]|[:]|[@]|[=]|[-])+)$')]
        [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-ADCGetVpnvserver: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all vpnvserver objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver -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 vpnvserver objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver -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-ADCGetVpnvserver: Ended"
    }
}

function Invoke-ADCAddVpnvserveraaapreauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the aaapreauthenticationpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_aaapreauthenticationpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserveraaapreauthenticationpolicybinding -name <string>
        An example how to add vpnvserver_aaapreauthenticationpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserveraaapreauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_aaapreauthenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserveraaapreauthenticationpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_aaapreauthenticationpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_aaapreauthenticationpolicy_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-ADCGetVpnvserveraaapreauthenticationpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserveraaapreauthenticationpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserveraaapreauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the aaapreauthenticationpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserveraaapreauthenticationpolicybinding -Name <string>
        An example how to delete vpnvserver_aaapreauthenticationpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserveraaapreauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_aaapreauthenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserveraaapreauthenticationpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_aaapreauthenticationpolicy_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-ADCDeleteVpnvserveraaapreauthenticationpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserveraaapreauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the aaapreauthenticationpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_aaapreauthenticationpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_aaapreauthenticationpolicy_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-ADCGetVpnvserveraaapreauthenticationpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserveraaapreauthenticationpolicybinding -GetAll
        Get all vpnvserver_aaapreauthenticationpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserveraaapreauthenticationpolicybinding -Count
        Get the number of vpnvserver_aaapreauthenticationpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserveraaapreauthenticationpolicybinding -name <string>
        Get vpnvserver_aaapreauthenticationpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserveraaapreauthenticationpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_aaapreauthenticationpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserveraaapreauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_aaapreauthenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserveraaapreauthenticationpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_aaapreauthenticationpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_aaapreauthenticationpolicy_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 vpnvserver_aaapreauthenticationpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_aaapreauthenticationpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_aaapreauthenticationpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_aaapreauthenticationpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_aaapreauthenticationpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_aaapreauthenticationpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_aaapreauthenticationpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_aaapreauthenticationpolicy_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-ADCGetVpnvserveraaapreauthenticationpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserveranalyticsprofilebinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the analyticsprofile that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Analyticsprofile
        Name of the analytics profile bound to the VPN Vserver.
    .PARAMETER PassThru
        Return details about the created vpnvserver_analyticsprofile_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserveranalyticsprofilebinding -name <string>
        An example how to add vpnvserver_analyticsprofile_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserveranalyticsprofilebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_analyticsprofile_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Analyticsprofile,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserveranalyticsprofilebinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('analyticsprofile') ) { $payload.Add('analyticsprofile', $analyticsprofile) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_analyticsprofile_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_analyticsprofile_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-ADCGetVpnvserveranalyticsprofilebinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserveranalyticsprofilebinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserveranalyticsprofilebinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the analyticsprofile that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Analyticsprofile
        Name of the analytics profile bound to the VPN Vserver.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserveranalyticsprofilebinding -Name <string>
        An example how to delete vpnvserver_analyticsprofile_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserveranalyticsprofilebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_analyticsprofile_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Analyticsprofile 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserveranalyticsprofilebinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Analyticsprofile') ) { $arguments.Add('analyticsprofile', $Analyticsprofile) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_analyticsprofile_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-ADCDeleteVpnvserveranalyticsprofilebinding: Finished"
    }
}

function Invoke-ADCGetVpnvserveranalyticsprofilebinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the analyticsprofile that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_analyticsprofile_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_analyticsprofile_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-ADCGetVpnvserveranalyticsprofilebinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserveranalyticsprofilebinding -GetAll
        Get all vpnvserver_analyticsprofile_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserveranalyticsprofilebinding -Count
        Get the number of vpnvserver_analyticsprofile_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserveranalyticsprofilebinding -name <string>
        Get vpnvserver_analyticsprofile_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserveranalyticsprofilebinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_analyticsprofile_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserveranalyticsprofilebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_analyticsprofile_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserveranalyticsprofilebinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_analyticsprofile_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_analyticsprofile_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 vpnvserver_analyticsprofile_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_analyticsprofile_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_analyticsprofile_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_analyticsprofile_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_analyticsprofile_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_analyticsprofile_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_analyticsprofile_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_analyticsprofile_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-ADCGetVpnvserveranalyticsprofilebinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverappcontrollerbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the appcontroller that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Appcontroller
        Configured App Controller server in XenMobile deployment.
    .PARAMETER PassThru
        Return details about the created vpnvserver_appcontroller_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverappcontrollerbinding -name <string>
        An example how to add vpnvserver_appcontroller_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverappcontrollerbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_appcontroller_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Appcontroller,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverappcontrollerbinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('appcontroller') ) { $payload.Add('appcontroller', $appcontroller) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_appcontroller_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_appcontroller_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-ADCGetVpnvserverappcontrollerbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverappcontrollerbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverappcontrollerbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the appcontroller that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Appcontroller
        Configured App Controller server in XenMobile deployment.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverappcontrollerbinding -Name <string>
        An example how to delete vpnvserver_appcontroller_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverappcontrollerbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_appcontroller_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Appcontroller 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverappcontrollerbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Appcontroller') ) { $arguments.Add('appcontroller', $Appcontroller) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_appcontroller_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-ADCDeleteVpnvserverappcontrollerbinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverappcontrollerbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the appcontroller that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_appcontroller_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_appcontroller_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-ADCGetVpnvserverappcontrollerbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverappcontrollerbinding -GetAll
        Get all vpnvserver_appcontroller_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverappcontrollerbinding -Count
        Get the number of vpnvserver_appcontroller_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverappcontrollerbinding -name <string>
        Get vpnvserver_appcontroller_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverappcontrollerbinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_appcontroller_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverappcontrollerbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_appcontroller_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverappcontrollerbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_appcontroller_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appcontroller_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 vpnvserver_appcontroller_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appcontroller_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_appcontroller_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appcontroller_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_appcontroller_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appcontroller_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_appcontroller_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appcontroller_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-ADCGetVpnvserverappcontrollerbinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverappflowpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the appflowpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_appflowpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverappflowpolicybinding -name <string>
        An example how to add vpnvserver_appflowpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverappflowpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_appflowpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverappflowpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_appflowpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_appflowpolicy_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-ADCGetVpnvserverappflowpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverappflowpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverappflowpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the appflowpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverappflowpolicybinding -Name <string>
        An example how to delete vpnvserver_appflowpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverappflowpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_appflowpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverappflowpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_appflowpolicy_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-ADCDeleteVpnvserverappflowpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverappflowpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the appflowpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_appflowpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_appflowpolicy_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-ADCGetVpnvserverappflowpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverappflowpolicybinding -GetAll
        Get all vpnvserver_appflowpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverappflowpolicybinding -Count
        Get the number of vpnvserver_appflowpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverappflowpolicybinding -name <string>
        Get vpnvserver_appflowpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverappflowpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_appflowpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverappflowpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_appflowpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverappflowpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_appflowpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appflowpolicy_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 vpnvserver_appflowpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appflowpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_appflowpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appflowpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_appflowpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appflowpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_appflowpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_appflowpolicy_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-ADCGetVpnvserverappflowpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauditnslogpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_auditnslogpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauditnslogpolicybinding -name <string>
        An example how to add vpnvserver_auditnslogpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauditnslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauditnslogpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_auditnslogpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_auditnslogpolicy_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-ADCGetVpnvserverauditnslogpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauditnslogpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauditnslogpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauditnslogpolicybinding -Name <string>
        An example how to delete vpnvserver_auditnslogpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauditnslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauditnslogpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_auditnslogpolicy_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-ADCDeleteVpnvserverauditnslogpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauditnslogpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_auditnslogpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_auditnslogpolicy_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-ADCGetVpnvserverauditnslogpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauditnslogpolicybinding -GetAll
        Get all vpnvserver_auditnslogpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauditnslogpolicybinding -Count
        Get the number of vpnvserver_auditnslogpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauditnslogpolicybinding -name <string>
        Get vpnvserver_auditnslogpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauditnslogpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_auditnslogpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauditnslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauditnslogpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_auditnslogpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_auditnslogpolicy_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 vpnvserver_auditnslogpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_auditnslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_auditnslogpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_auditnslogpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_auditnslogpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_auditnslogpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_auditnslogpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_auditnslogpolicy_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-ADCGetVpnvserverauditnslogpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauditsyslogpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_auditsyslogpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauditsyslogpolicybinding -name <string>
        An example how to add vpnvserver_auditsyslogpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauditsyslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauditsyslogpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_auditsyslogpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_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-ADCGetVpnvserverauditsyslogpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauditsyslogpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauditsyslogpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauditsyslogpolicybinding -Name <string>
        An example how to delete vpnvserver_auditsyslogpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauditsyslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauditsyslogpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_auditsyslogpolicy_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-ADCDeleteVpnvserverauditsyslogpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauditsyslogpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_auditsyslogpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_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-ADCGetVpnvserverauditsyslogpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauditsyslogpolicybinding -GetAll
        Get all vpnvserver_auditsyslogpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauditsyslogpolicybinding -Count
        Get the number of vpnvserver_auditsyslogpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauditsyslogpolicybinding -name <string>
        Get vpnvserver_auditsyslogpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauditsyslogpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_auditsyslogpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauditsyslogpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauditsyslogpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_auditsyslogpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_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 vpnvserver_auditsyslogpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_auditsyslogpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_auditsyslogpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_auditsyslogpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_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-ADCGetVpnvserverauditsyslogpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationcertpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationcertpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationcertpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationcertpolicybinding -name <string>
        An example how to add vpnvserver_authenticationcertpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationcertpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationcertpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationcertpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationcertpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationcertpolicy_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-ADCGetVpnvserverauthenticationcertpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationcertpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationcertpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationcertpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationcertpolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationcertpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationcertpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationcertpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationcertpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationcertpolicy_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-ADCDeleteVpnvserverauthenticationcertpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationcertpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationcertpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationcertpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationcertpolicy_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-ADCGetVpnvserverauthenticationcertpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationcertpolicybinding -GetAll
        Get all vpnvserver_authenticationcertpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationcertpolicybinding -Count
        Get the number of vpnvserver_authenticationcertpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationcertpolicybinding -name <string>
        Get vpnvserver_authenticationcertpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationcertpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationcertpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationcertpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationcertpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationcertpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationcertpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationcertpolicy_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 vpnvserver_authenticationcertpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationcertpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationcertpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationcertpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationcertpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationcertpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationcertpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationcertpolicy_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-ADCGetVpnvserverauthenticationcertpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationdfapolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationdfapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationdfapolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationdfapolicybinding -name <string>
        An example how to add vpnvserver_authenticationdfapolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationdfapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationdfapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationdfapolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationdfapolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationdfapolicy_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-ADCGetVpnvserverauthenticationdfapolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationdfapolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationdfapolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationdfapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationdfapolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationdfapolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationdfapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationdfapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationdfapolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationdfapolicy_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-ADCDeleteVpnvserverauthenticationdfapolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationdfapolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationdfapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationdfapolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationdfapolicy_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-ADCGetVpnvserverauthenticationdfapolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationdfapolicybinding -GetAll
        Get all vpnvserver_authenticationdfapolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationdfapolicybinding -Count
        Get the number of vpnvserver_authenticationdfapolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationdfapolicybinding -name <string>
        Get vpnvserver_authenticationdfapolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationdfapolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationdfapolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationdfapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationdfapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationdfapolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationdfapolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationdfapolicy_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 vpnvserver_authenticationdfapolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationdfapolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationdfapolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationdfapolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationdfapolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationdfapolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationdfapolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationdfapolicy_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-ADCGetVpnvserverauthenticationdfapolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationldappolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationldappolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationldappolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationldappolicybinding -name <string>
        An example how to add vpnvserver_authenticationldappolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationldappolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationldappolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationldappolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationldappolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationldappolicy_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-ADCGetVpnvserverauthenticationldappolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationldappolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationldappolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationldappolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationldappolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationldappolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationldappolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationldappolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationldappolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationldappolicy_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-ADCDeleteVpnvserverauthenticationldappolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationldappolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationldappolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationldappolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationldappolicy_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-ADCGetVpnvserverauthenticationldappolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationldappolicybinding -GetAll
        Get all vpnvserver_authenticationldappolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationldappolicybinding -Count
        Get the number of vpnvserver_authenticationldappolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationldappolicybinding -name <string>
        Get vpnvserver_authenticationldappolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationldappolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationldappolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationldappolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationldappolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationldappolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationldappolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationldappolicy_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 vpnvserver_authenticationldappolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationldappolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationldappolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationldappolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationldappolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationldappolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationldappolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationldappolicy_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-ADCGetVpnvserverauthenticationldappolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationlocalpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationlocalpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationlocalpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationlocalpolicybinding -name <string>
        An example how to add vpnvserver_authenticationlocalpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationlocalpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationlocalpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationlocalpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationlocalpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationlocalpolicy_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-ADCGetVpnvserverauthenticationlocalpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationlocalpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationlocalpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationlocalpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationlocalpolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationlocalpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationlocalpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationlocalpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationlocalpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationlocalpolicy_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-ADCDeleteVpnvserverauthenticationlocalpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationlocalpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationlocalpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationlocalpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationlocalpolicy_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-ADCGetVpnvserverauthenticationlocalpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationlocalpolicybinding -GetAll
        Get all vpnvserver_authenticationlocalpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationlocalpolicybinding -Count
        Get the number of vpnvserver_authenticationlocalpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationlocalpolicybinding -name <string>
        Get vpnvserver_authenticationlocalpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationlocalpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationlocalpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationlocalpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationlocalpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationlocalpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationlocalpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationlocalpolicy_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 vpnvserver_authenticationlocalpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationlocalpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationlocalpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationlocalpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationlocalpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationlocalpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationlocalpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationlocalpolicy_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-ADCGetVpnvserverauthenticationlocalpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationloginschemapolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationloginschemapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationloginschemapolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationloginschemapolicybinding -name <string>
        An example how to add vpnvserver_authenticationloginschemapolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationloginschemapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationloginschemapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationloginschemapolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationloginschemapolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationloginschemapolicy_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-ADCGetVpnvserverauthenticationloginschemapolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationloginschemapolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationloginschemapolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationloginschemapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationloginschemapolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationloginschemapolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationloginschemapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationloginschemapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationloginschemapolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationloginschemapolicy_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-ADCDeleteVpnvserverauthenticationloginschemapolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationloginschemapolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationloginschemapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationloginschemapolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationloginschemapolicy_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-ADCGetVpnvserverauthenticationloginschemapolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationloginschemapolicybinding -GetAll
        Get all vpnvserver_authenticationloginschemapolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationloginschemapolicybinding -Count
        Get the number of vpnvserver_authenticationloginschemapolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationloginschemapolicybinding -name <string>
        Get vpnvserver_authenticationloginschemapolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationloginschemapolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationloginschemapolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationloginschemapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationloginschemapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationloginschemapolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationloginschemapolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationloginschemapolicy_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 vpnvserver_authenticationloginschemapolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationloginschemapolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationloginschemapolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationloginschemapolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationloginschemapolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationloginschemapolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationloginschemapolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationloginschemapolicy_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-ADCGetVpnvserverauthenticationloginschemapolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationnegotiatepolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationnegotiatepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationnegotiatepolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationnegotiatepolicybinding -name <string>
        An example how to add vpnvserver_authenticationnegotiatepolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationnegotiatepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationnegotiatepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationnegotiatepolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationnegotiatepolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationnegotiatepolicy_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-ADCGetVpnvserverauthenticationnegotiatepolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationnegotiatepolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationnegotiatepolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationnegotiatepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationnegotiatepolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationnegotiatepolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationnegotiatepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationnegotiatepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationnegotiatepolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationnegotiatepolicy_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-ADCDeleteVpnvserverauthenticationnegotiatepolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationnegotiatepolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationnegotiatepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationnegotiatepolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationnegotiatepolicy_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-ADCGetVpnvserverauthenticationnegotiatepolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationnegotiatepolicybinding -GetAll
        Get all vpnvserver_authenticationnegotiatepolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationnegotiatepolicybinding -Count
        Get the number of vpnvserver_authenticationnegotiatepolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationnegotiatepolicybinding -name <string>
        Get vpnvserver_authenticationnegotiatepolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationnegotiatepolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationnegotiatepolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationnegotiatepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationnegotiatepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationnegotiatepolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationnegotiatepolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationnegotiatepolicy_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 vpnvserver_authenticationnegotiatepolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationnegotiatepolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationnegotiatepolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationnegotiatepolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationnegotiatepolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationnegotiatepolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationnegotiatepolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationnegotiatepolicy_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-ADCGetVpnvserverauthenticationnegotiatepolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationoauthidppolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationoauthidppolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationoauthidppolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationoauthidppolicybinding -name <string>
        An example how to add vpnvserver_authenticationoauthidppolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationoauthidppolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationoauthidppolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationoauthidppolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationoauthidppolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationoauthidppolicy_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-ADCGetVpnvserverauthenticationoauthidppolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationoauthidppolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationoauthidppolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationoauthidppolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationoauthidppolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationoauthidppolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationoauthidppolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationoauthidppolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationoauthidppolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationoauthidppolicy_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-ADCDeleteVpnvserverauthenticationoauthidppolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationoauthidppolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationoauthidppolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationoauthidppolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationoauthidppolicy_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-ADCGetVpnvserverauthenticationoauthidppolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationoauthidppolicybinding -GetAll
        Get all vpnvserver_authenticationoauthidppolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationoauthidppolicybinding -Count
        Get the number of vpnvserver_authenticationoauthidppolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationoauthidppolicybinding -name <string>
        Get vpnvserver_authenticationoauthidppolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationoauthidppolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationoauthidppolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationoauthidppolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationoauthidppolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationoauthidppolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationoauthidppolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationoauthidppolicy_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 vpnvserver_authenticationoauthidppolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationoauthidppolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationoauthidppolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationoauthidppolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationoauthidppolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationoauthidppolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationoauthidppolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationoauthidppolicy_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-ADCGetVpnvserverauthenticationoauthidppolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationpolicybinding -name <string>
        An example how to add vpnvserver_authenticationpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationpolicy_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-ADCGetVpnvserverauthenticationpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationpolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationpolicy_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-ADCDeleteVpnvserverauthenticationpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationpolicy_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-ADCGetVpnvserverauthenticationpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationpolicybinding -GetAll
        Get all vpnvserver_authenticationpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationpolicybinding -Count
        Get the number of vpnvserver_authenticationpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationpolicybinding -name <string>
        Get vpnvserver_authenticationpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationpolicy_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 vpnvserver_authenticationpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationpolicy_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-ADCGetVpnvserverauthenticationpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationradiuspolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationradiuspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationradiuspolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationradiuspolicybinding -name <string>
        An example how to add vpnvserver_authenticationradiuspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationradiuspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationradiuspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationradiuspolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationradiuspolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationradiuspolicy_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-ADCGetVpnvserverauthenticationradiuspolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationradiuspolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationradiuspolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationradiuspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationradiuspolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationradiuspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationradiuspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationradiuspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationradiuspolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationradiuspolicy_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-ADCDeleteVpnvserverauthenticationradiuspolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationradiuspolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationradiuspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationradiuspolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationradiuspolicy_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-ADCGetVpnvserverauthenticationradiuspolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationradiuspolicybinding -GetAll
        Get all vpnvserver_authenticationradiuspolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationradiuspolicybinding -Count
        Get the number of vpnvserver_authenticationradiuspolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationradiuspolicybinding -name <string>
        Get vpnvserver_authenticationradiuspolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationradiuspolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationradiuspolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationradiuspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationradiuspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationradiuspolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationradiuspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationradiuspolicy_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 vpnvserver_authenticationradiuspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationradiuspolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationradiuspolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationradiuspolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationradiuspolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationradiuspolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationradiuspolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationradiuspolicy_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-ADCGetVpnvserverauthenticationradiuspolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationsamlidppolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationsamlidppolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationsamlidppolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationsamlidppolicybinding -name <string>
        An example how to add vpnvserver_authenticationsamlidppolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationsamlidppolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationsamlidppolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationsamlidppolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationsamlidppolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationsamlidppolicy_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-ADCGetVpnvserverauthenticationsamlidppolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationsamlidppolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationsamlidppolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationsamlidppolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationsamlidppolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationsamlidppolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationsamlidppolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationsamlidppolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationsamlidppolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationsamlidppolicy_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-ADCDeleteVpnvserverauthenticationsamlidppolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationsamlidppolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationsamlidppolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationsamlidppolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationsamlidppolicy_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-ADCGetVpnvserverauthenticationsamlidppolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationsamlidppolicybinding -GetAll
        Get all vpnvserver_authenticationsamlidppolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationsamlidppolicybinding -Count
        Get the number of vpnvserver_authenticationsamlidppolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationsamlidppolicybinding -name <string>
        Get vpnvserver_authenticationsamlidppolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationsamlidppolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationsamlidppolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationsamlidppolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationsamlidppolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationsamlidppolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationsamlidppolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlidppolicy_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 vpnvserver_authenticationsamlidppolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlidppolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationsamlidppolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlidppolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationsamlidppolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlidppolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationsamlidppolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlidppolicy_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-ADCGetVpnvserverauthenticationsamlidppolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationsamlpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationsamlpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationsamlpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationsamlpolicybinding -name <string>
        An example how to add vpnvserver_authenticationsamlpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationsamlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationsamlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationsamlpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationsamlpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationsamlpolicy_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-ADCGetVpnvserverauthenticationsamlpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationsamlpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationsamlpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationsamlpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationsamlpolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationsamlpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationsamlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationsamlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationsamlpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationsamlpolicy_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-ADCDeleteVpnvserverauthenticationsamlpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationsamlpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationsamlpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationsamlpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationsamlpolicy_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-ADCGetVpnvserverauthenticationsamlpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationsamlpolicybinding -GetAll
        Get all vpnvserver_authenticationsamlpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationsamlpolicybinding -Count
        Get the number of vpnvserver_authenticationsamlpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationsamlpolicybinding -name <string>
        Get vpnvserver_authenticationsamlpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationsamlpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationsamlpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationsamlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationsamlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationsamlpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationsamlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlpolicy_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 vpnvserver_authenticationsamlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationsamlpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationsamlpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationsamlpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationsamlpolicy_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-ADCGetVpnvserverauthenticationsamlpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationtacacspolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationtacacspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationtacacspolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationtacacspolicybinding -name <string>
        An example how to add vpnvserver_authenticationtacacspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationtacacspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationtacacspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationtacacspolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationtacacspolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationtacacspolicy_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-ADCGetVpnvserverauthenticationtacacspolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationtacacspolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationtacacspolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationtacacspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationtacacspolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationtacacspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationtacacspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationtacacspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationtacacspolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationtacacspolicy_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-ADCDeleteVpnvserverauthenticationtacacspolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationtacacspolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationtacacspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationtacacspolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationtacacspolicy_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-ADCGetVpnvserverauthenticationtacacspolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationtacacspolicybinding -GetAll
        Get all vpnvserver_authenticationtacacspolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationtacacspolicybinding -Count
        Get the number of vpnvserver_authenticationtacacspolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationtacacspolicybinding -name <string>
        Get vpnvserver_authenticationtacacspolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationtacacspolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationtacacspolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationtacacspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationtacacspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationtacacspolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationtacacspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationtacacspolicy_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 vpnvserver_authenticationtacacspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationtacacspolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationtacacspolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationtacacspolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationtacacspolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationtacacspolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationtacacspolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationtacacspolicy_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-ADCGetVpnvserverauthenticationtacacspolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverauthenticationwebauthpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationwebauthpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_authenticationwebauthpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverauthenticationwebauthpolicybinding -name <string>
        An example how to add vpnvserver_authenticationwebauthpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverauthenticationwebauthpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationwebauthpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationwebauthpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_authenticationwebauthpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_authenticationwebauthpolicy_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-ADCGetVpnvserverauthenticationwebauthpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverauthenticationwebauthpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverauthenticationwebauthpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the authenticationwebauthpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverauthenticationwebauthpolicybinding -Name <string>
        An example how to delete vpnvserver_authenticationwebauthpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverauthenticationwebauthpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationwebauthpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverauthenticationwebauthpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_authenticationwebauthpolicy_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-ADCDeleteVpnvserverauthenticationwebauthpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverauthenticationwebauthpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the authenticationwebauthpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_authenticationwebauthpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_authenticationwebauthpolicy_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-ADCGetVpnvserverauthenticationwebauthpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationwebauthpolicybinding -GetAll
        Get all vpnvserver_authenticationwebauthpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationwebauthpolicybinding -Count
        Get the number of vpnvserver_authenticationwebauthpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationwebauthpolicybinding -name <string>
        Get vpnvserver_authenticationwebauthpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverauthenticationwebauthpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_authenticationwebauthpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverauthenticationwebauthpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_authenticationwebauthpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverauthenticationwebauthpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_authenticationwebauthpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationwebauthpolicy_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 vpnvserver_authenticationwebauthpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationwebauthpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationwebauthpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationwebauthpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_authenticationwebauthpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationwebauthpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_authenticationwebauthpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_authenticationwebauthpolicy_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-ADCGetVpnvserverauthenticationwebauthpolicybinding: Ended"
    }
}

function Invoke-ADCGetVpnvserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to vpnvserver.
    .PARAMETER Name
        Name of the Citrix Gateway virtual server for which to show detailed information.
    .PARAMETER GetAll
        Retrieve all vpnvserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_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-ADCGetVpnvserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverbinding -GetAll
        Get all vpnvserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverbinding -name <string>
        Get vpnvserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverbinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-ADCGetVpnvserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_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 vpnvserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_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-ADCGetVpnvserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnvservercachepolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the cachepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_cachepolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservercachepolicybinding -name <string>
        An example how to add vpnvserver_cachepolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservercachepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_cachepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservercachepolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_cachepolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_cachepolicy_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-ADCGetVpnvservercachepolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservercachepolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservercachepolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the cachepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservercachepolicybinding -Name <string>
        An example how to delete vpnvserver_cachepolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservercachepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_cachepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservercachepolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_cachepolicy_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-ADCDeleteVpnvservercachepolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvservercachepolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the cachepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_cachepolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_cachepolicy_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-ADCGetVpnvservercachepolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservercachepolicybinding -GetAll
        Get all vpnvserver_cachepolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservercachepolicybinding -Count
        Get the number of vpnvserver_cachepolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservercachepolicybinding -name <string>
        Get vpnvserver_cachepolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservercachepolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_cachepolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservercachepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_cachepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservercachepolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_cachepolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cachepolicy_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 vpnvserver_cachepolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cachepolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_cachepolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cachepolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_cachepolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cachepolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_cachepolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cachepolicy_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-ADCGetVpnvservercachepolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvservercspolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the cspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_cspolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservercspolicybinding -name <string>
        An example how to add vpnvserver_cspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservercspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_cspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservercspolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_cspolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_cspolicy_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-ADCGetVpnvservercspolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservercspolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservercspolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the cspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservercspolicybinding -Name <string>
        An example how to delete vpnvserver_cspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservercspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_cspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservercspolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_cspolicy_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-ADCDeleteVpnvservercspolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvservercspolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the cspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_cspolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_cspolicy_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-ADCGetVpnvservercspolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservercspolicybinding -GetAll
        Get all vpnvserver_cspolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservercspolicybinding -Count
        Get the number of vpnvserver_cspolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservercspolicybinding -name <string>
        Get vpnvserver_cspolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservercspolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_cspolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservercspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_cspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservercspolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_cspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cspolicy_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 vpnvserver_cspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cspolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_cspolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cspolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_cspolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cspolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_cspolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_cspolicy_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-ADCGetVpnvservercspolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverfeopolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the feopolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        Name of a policy to bind to the virtual server (for example, the name of an authentication, session, or endpoint analysis policy).
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_feopolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverfeopolicybinding -name <string>
        An example how to add vpnvserver_feopolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverfeopolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_feopolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverfeopolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_feopolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_feopolicy_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-ADCGetVpnvserverfeopolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverfeopolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverfeopolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the feopolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        Name of a policy to bind to the virtual server (for example, the name of an authentication, session, or endpoint analysis policy).
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverfeopolicybinding -Name <string>
        An example how to delete vpnvserver_feopolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverfeopolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_feopolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverfeopolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_feopolicy_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-ADCDeleteVpnvserverfeopolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverfeopolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the feopolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_feopolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_feopolicy_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-ADCGetVpnvserverfeopolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverfeopolicybinding -GetAll
        Get all vpnvserver_feopolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverfeopolicybinding -Count
        Get the number of vpnvserver_feopolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverfeopolicybinding -name <string>
        Get vpnvserver_feopolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverfeopolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_feopolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverfeopolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_feopolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverfeopolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_feopolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_feopolicy_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 vpnvserver_feopolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_feopolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_feopolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_feopolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_feopolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_feopolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_feopolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_feopolicy_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-ADCGetVpnvserverfeopolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvservericapolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the icapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_icapolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservericapolicybinding -name <string>
        An example how to add vpnvserver_icapolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservericapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_icapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservericapolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_icapolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_icapolicy_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-ADCGetVpnvservericapolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservericapolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservericapolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the icapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservericapolicybinding -Name <string>
        An example how to delete vpnvserver_icapolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservericapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_icapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservericapolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_icapolicy_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-ADCDeleteVpnvservericapolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvservericapolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the icapolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_icapolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_icapolicy_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-ADCGetVpnvservericapolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservericapolicybinding -GetAll
        Get all vpnvserver_icapolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservericapolicybinding -Count
        Get the number of vpnvserver_icapolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservericapolicybinding -name <string>
        Get vpnvserver_icapolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservericapolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_icapolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservericapolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_icapolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservericapolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_icapolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_icapolicy_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 vpnvserver_icapolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_icapolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_icapolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_icapolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_icapolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_icapolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_icapolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_icapolicy_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-ADCGetVpnvservericapolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverintranetip6binding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the intranetip6 that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Intranetip6
        The network id for the range of intranet IP6 addresses or individual intranet ip to be bound to the vserver.
    .PARAMETER Numaddr
        The number of ipv6 addresses.
    .PARAMETER PassThru
        Return details about the created vpnvserver_intranetip6_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverintranetip6binding -name <string>
        An example how to add vpnvserver_intranetip6_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverintranetip6binding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_intranetip6_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Intranetip6,

        [double]$Numaddr,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverintranetip6binding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('intranetip6') ) { $payload.Add('intranetip6', $intranetip6) }
            if ( $PSBoundParameters.ContainsKey('numaddr') ) { $payload.Add('numaddr', $numaddr) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_intranetip6_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_intranetip6_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-ADCGetVpnvserverintranetip6binding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverintranetip6binding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverintranetip6binding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the intranetip6 that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Intranetip6
        The network id for the range of intranet IP6 addresses or individual intranet ip to be bound to the vserver.
    .PARAMETER Numaddr
        The number of ipv6 addresses.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverintranetip6binding -Name <string>
        An example how to delete vpnvserver_intranetip6_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverintranetip6binding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_intranetip6_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Intranetip6,

        [double]$Numaddr 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverintranetip6binding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Intranetip6') ) { $arguments.Add('intranetip6', $Intranetip6) }
            if ( $PSBoundParameters.ContainsKey('Numaddr') ) { $arguments.Add('numaddr', $Numaddr) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_intranetip6_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-ADCDeleteVpnvserverintranetip6binding: Finished"
    }
}

function Invoke-ADCGetVpnvserverintranetip6binding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the intranetip6 that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_intranetip6_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_intranetip6_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-ADCGetVpnvserverintranetip6binding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverintranetip6binding -GetAll
        Get all vpnvserver_intranetip6_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverintranetip6binding -Count
        Get the number of vpnvserver_intranetip6_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverintranetip6binding -name <string>
        Get vpnvserver_intranetip6_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverintranetip6binding -Filter @{ 'name'='<value>' }
        Get vpnvserver_intranetip6_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverintranetip6binding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_intranetip6_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverintranetip6binding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_intranetip6_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip6_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 vpnvserver_intranetip6_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip6_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_intranetip6_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip6_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_intranetip6_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip6_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_intranetip6_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip6_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-ADCGetVpnvserverintranetip6binding: Ended"
    }
}

function Invoke-ADCAddVpnvserverintranetipbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the intranetip that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Intranetip
        The network ID for the range of intranet IP addresses or individual intranet IP addresses to be bound to the virtual server.
    .PARAMETER Netmask
        The netmask of the intranet IP address or range.
    .PARAMETER PassThru
        Return details about the created vpnvserver_intranetip_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverintranetipbinding -name <string>
        An example how to add vpnvserver_intranetip_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverintranetipbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_intranetip_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Intranetip,

        [string]$Netmask,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverintranetipbinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('intranetip') ) { $payload.Add('intranetip', $intranetip) }
            if ( $PSBoundParameters.ContainsKey('netmask') ) { $payload.Add('netmask', $netmask) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_intranetip_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_intranetip_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-ADCGetVpnvserverintranetipbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverintranetipbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverintranetipbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the intranetip that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Intranetip
        The network ID for the range of intranet IP addresses or individual intranet IP addresses to be bound to the virtual server.
    .PARAMETER Netmask
        The netmask of the intranet IP address or range.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverintranetipbinding -Name <string>
        An example how to delete vpnvserver_intranetip_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverintranetipbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_intranetip_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Intranetip,

        [string]$Netmask 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverintranetipbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Intranetip') ) { $arguments.Add('intranetip', $Intranetip) }
            if ( $PSBoundParameters.ContainsKey('Netmask') ) { $arguments.Add('netmask', $Netmask) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_intranetip_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-ADCDeleteVpnvserverintranetipbinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverintranetipbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the intranetip that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_intranetip_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_intranetip_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-ADCGetVpnvserverintranetipbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverintranetipbinding -GetAll
        Get all vpnvserver_intranetip_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverintranetipbinding -Count
        Get the number of vpnvserver_intranetip_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverintranetipbinding -name <string>
        Get vpnvserver_intranetip_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverintranetipbinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_intranetip_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverintranetipbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_intranetip_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverintranetipbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_intranetip_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip_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 vpnvserver_intranetip_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_intranetip_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_intranetip_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_intranetip_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_intranetip_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-ADCGetVpnvserverintranetipbinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverresponderpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the responderpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_responderpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverresponderpolicybinding -name <string>
        An example how to add vpnvserver_responderpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverresponderpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_responderpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverresponderpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_responderpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_responderpolicy_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-ADCGetVpnvserverresponderpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverresponderpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverresponderpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the responderpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverresponderpolicybinding -Name <string>
        An example how to delete vpnvserver_responderpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverresponderpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_responderpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverresponderpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_responderpolicy_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-ADCDeleteVpnvserverresponderpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverresponderpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the responderpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_responderpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_responderpolicy_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-ADCGetVpnvserverresponderpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverresponderpolicybinding -GetAll
        Get all vpnvserver_responderpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverresponderpolicybinding -Count
        Get the number of vpnvserver_responderpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverresponderpolicybinding -name <string>
        Get vpnvserver_responderpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverresponderpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_responderpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverresponderpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_responderpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverresponderpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_responderpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_responderpolicy_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 vpnvserver_responderpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_responderpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_responderpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_responderpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_responderpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_responderpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_responderpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_responderpolicy_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-ADCGetVpnvserverresponderpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverrewritepolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the rewritepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_rewritepolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverrewritepolicybinding -name <string>
        An example how to add vpnvserver_rewritepolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverrewritepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_rewritepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverrewritepolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_rewritepolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_rewritepolicy_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-ADCGetVpnvserverrewritepolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverrewritepolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverrewritepolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the rewritepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverrewritepolicybinding -Name <string>
        An example how to delete vpnvserver_rewritepolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverrewritepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_rewritepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverrewritepolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_rewritepolicy_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-ADCDeleteVpnvserverrewritepolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverrewritepolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the rewritepolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_rewritepolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_rewritepolicy_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-ADCGetVpnvserverrewritepolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverrewritepolicybinding -GetAll
        Get all vpnvserver_rewritepolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverrewritepolicybinding -Count
        Get the number of vpnvserver_rewritepolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverrewritepolicybinding -name <string>
        Get vpnvserver_rewritepolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverrewritepolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_rewritepolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverrewritepolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_rewritepolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverrewritepolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_rewritepolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_rewritepolicy_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 vpnvserver_rewritepolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_rewritepolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_rewritepolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_rewritepolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_rewritepolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_rewritepolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_rewritepolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_rewritepolicy_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-ADCGetVpnvserverrewritepolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvserversharefileserverbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the sharefileserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Sharefile
        Configured ShareFile server in XenMobile deployment. Format IP:PORT / FQDN:PORT.
    .PARAMETER PassThru
        Return details about the created vpnvserver_sharefileserver_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserversharefileserverbinding -name <string>
        An example how to add vpnvserver_sharefileserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserversharefileserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_sharefileserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Sharefile,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserversharefileserverbinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('sharefile') ) { $payload.Add('sharefile', $sharefile) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_sharefileserver_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_sharefileserver_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-ADCGetVpnvserversharefileserverbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserversharefileserverbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserversharefileserverbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the sharefileserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Sharefile
        Configured ShareFile server in XenMobile deployment. Format IP:PORT / FQDN:PORT.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserversharefileserverbinding -Name <string>
        An example how to delete vpnvserver_sharefileserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserversharefileserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_sharefileserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Sharefile 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserversharefileserverbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Sharefile') ) { $arguments.Add('sharefile', $Sharefile) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_sharefileserver_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-ADCDeleteVpnvserversharefileserverbinding: Finished"
    }
}

function Invoke-ADCGetVpnvserversharefileserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the sharefileserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_sharefileserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_sharefileserver_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-ADCGetVpnvserversharefileserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserversharefileserverbinding -GetAll
        Get all vpnvserver_sharefileserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserversharefileserverbinding -Count
        Get the number of vpnvserver_sharefileserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserversharefileserverbinding -name <string>
        Get vpnvserver_sharefileserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserversharefileserverbinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_sharefileserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserversharefileserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_sharefileserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserversharefileserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_sharefileserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_sharefileserver_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 vpnvserver_sharefileserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_sharefileserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_sharefileserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_sharefileserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_sharefileserver_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_sharefileserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_sharefileserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_sharefileserver_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-ADCGetVpnvserversharefileserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnvserverstaserverbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the staserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Staserver
        Configured Secure Ticketing Authority (STA) server.
    .PARAMETER Staaddresstype
        Type of the STA server address(ipv4/v6).
        Possible values = IPV4, IPV6
    .PARAMETER PassThru
        Return details about the created vpnvserver_staserver_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvserverstaserverbinding -name <string>
        An example how to add vpnvserver_staserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvserverstaserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_staserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Staserver,

        [ValidateSet('IPV4', 'IPV6')]
        [string]$Staaddresstype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvserverstaserverbinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('staserver') ) { $payload.Add('staserver', $staserver) }
            if ( $PSBoundParameters.ContainsKey('staaddresstype') ) { $payload.Add('staaddresstype', $staaddresstype) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_staserver_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_staserver_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-ADCGetVpnvserverstaserverbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvserverstaserverbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvserverstaserverbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the staserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Staserver
        Configured Secure Ticketing Authority (STA) server.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvserverstaserverbinding -Name <string>
        An example how to delete vpnvserver_staserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvserverstaserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_staserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Staserver 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvserverstaserverbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Staserver') ) { $arguments.Add('staserver', $Staserver) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_staserver_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-ADCDeleteVpnvserverstaserverbinding: Finished"
    }
}

function Invoke-ADCGetVpnvserverstaserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the staserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_staserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_staserver_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-ADCGetVpnvserverstaserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverstaserverbinding -GetAll
        Get all vpnvserver_staserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverstaserverbinding -Count
        Get the number of vpnvserver_staserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverstaserverbinding -name <string>
        Get vpnvserver_staserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvserverstaserverbinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_staserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvserverstaserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_staserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvserverstaserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_staserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_staserver_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 vpnvserver_staserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_staserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_staserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_staserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_staserver_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_staserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_staserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_staserver_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-ADCGetVpnvserverstaserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpnclientlessaccesspolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnclientlessaccesspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpnclientlessaccesspolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpnclientlessaccesspolicybinding -name <string>
        An example how to add vpnvserver_vpnclientlessaccesspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpnclientlessaccesspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnclientlessaccesspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpnclientlessaccesspolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpnclientlessaccesspolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpnclientlessaccesspolicy_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-ADCGetVpnvservervpnclientlessaccesspolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpnclientlessaccesspolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpnclientlessaccesspolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnclientlessaccesspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bindpoint to which the policy is bound.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpnclientlessaccesspolicybinding -Name <string>
        An example how to delete vpnvserver_vpnclientlessaccesspolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpnclientlessaccesspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnclientlessaccesspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpnclientlessaccesspolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpnclientlessaccesspolicy_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-ADCDeleteVpnvservervpnclientlessaccesspolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpnclientlessaccesspolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnclientlessaccesspolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpnclientlessaccesspolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpnclientlessaccesspolicy_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-ADCGetVpnvservervpnclientlessaccesspolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnclientlessaccesspolicybinding -GetAll
        Get all vpnvserver_vpnclientlessaccesspolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnclientlessaccesspolicybinding -Count
        Get the number of vpnvserver_vpnclientlessaccesspolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnclientlessaccesspolicybinding -name <string>
        Get vpnvserver_vpnclientlessaccesspolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnclientlessaccesspolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpnclientlessaccesspolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpnclientlessaccesspolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnclientlessaccesspolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpnclientlessaccesspolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpnclientlessaccesspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnclientlessaccesspolicy_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 vpnvserver_vpnclientlessaccesspolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnclientlessaccesspolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpnclientlessaccesspolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnclientlessaccesspolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpnclientlessaccesspolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnclientlessaccesspolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpnclientlessaccesspolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnclientlessaccesspolicy_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-ADCGetVpnvservervpnclientlessaccesspolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpnepaprofilebinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnepaprofile that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Epaprofile
        Advanced EPA profile to bind.
    .PARAMETER Epaprofileoptional
        Mark the EPA profile optional for preauthentication EPA profile. User would be shown a logon page even if the EPA profile fails to evaluate.
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpnepaprofile_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpnepaprofilebinding -name <string>
        An example how to add vpnvserver_vpnepaprofile_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpnepaprofilebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnepaprofile_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Epaprofile,

        [boolean]$Epaprofileoptional,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpnepaprofilebinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('epaprofile') ) { $payload.Add('epaprofile', $epaprofile) }
            if ( $PSBoundParameters.ContainsKey('epaprofileoptional') ) { $payload.Add('epaprofileoptional', $epaprofileoptional) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpnepaprofile_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpnepaprofile_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-ADCGetVpnvservervpnepaprofilebinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpnepaprofilebinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpnepaprofilebinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnepaprofile that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Epaprofile
        Advanced EPA profile to bind.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpnepaprofilebinding -Name <string>
        An example how to delete vpnvserver_vpnepaprofile_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpnepaprofilebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnepaprofile_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Epaprofile 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpnepaprofilebinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Epaprofile') ) { $arguments.Add('epaprofile', $Epaprofile) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpnepaprofile_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-ADCDeleteVpnvservervpnepaprofilebinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpnepaprofilebinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnepaprofile that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpnepaprofile_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpnepaprofile_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-ADCGetVpnvservervpnepaprofilebinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnepaprofilebinding -GetAll
        Get all vpnvserver_vpnepaprofile_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnepaprofilebinding -Count
        Get the number of vpnvserver_vpnepaprofile_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnepaprofilebinding -name <string>
        Get vpnvserver_vpnepaprofile_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnepaprofilebinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpnepaprofile_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpnepaprofilebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnepaprofile_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpnepaprofilebinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpnepaprofile_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnepaprofile_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 vpnvserver_vpnepaprofile_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnepaprofile_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpnepaprofile_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnepaprofile_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpnepaprofile_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnepaprofile_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpnepaprofile_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnepaprofile_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-ADCGetVpnvservervpnepaprofilebinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpneulabinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpneula that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Eula
        Name of the EULA bound to VPN vserver.
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpneula_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpneulabinding -name <string>
        An example how to add vpnvserver_vpneula_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpneulabinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpneula_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Eula,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpneulabinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('eula') ) { $payload.Add('eula', $eula) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpneula_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpneula_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-ADCGetVpnvservervpneulabinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpneulabinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpneulabinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpneula that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Eula
        Name of the EULA bound to VPN vserver.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpneulabinding -Name <string>
        An example how to delete vpnvserver_vpneula_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpneulabinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpneula_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Eula 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpneulabinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Eula') ) { $arguments.Add('eula', $Eula) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpneula_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-ADCDeleteVpnvservervpneulabinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpneulabinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpneula that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpneula_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpneula_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-ADCGetVpnvservervpneulabinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpneulabinding -GetAll
        Get all vpnvserver_vpneula_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpneulabinding -Count
        Get the number of vpnvserver_vpneula_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpneulabinding -name <string>
        Get vpnvserver_vpneula_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpneulabinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpneula_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpneulabinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpneula_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpneulabinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpneula_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpneula_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 vpnvserver_vpneula_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpneula_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpneula_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpneula_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpneula_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpneula_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpneula_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpneula_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-ADCGetVpnvservervpneulabinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpnintranetapplicationbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnintranetapplication that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Intranetapplication
        The intranet VPN application.
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpnintranetapplication_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpnintranetapplicationbinding -name <string>
        An example how to add vpnvserver_vpnintranetapplication_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpnintranetapplicationbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnintranetapplication_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Intranetapplication,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpnintranetapplicationbinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('intranetapplication') ) { $payload.Add('intranetapplication', $intranetapplication) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpnintranetapplication_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpnintranetapplication_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-ADCGetVpnvservervpnintranetapplicationbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpnintranetapplicationbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpnintranetapplicationbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnintranetapplication that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Intranetapplication
        The intranet VPN application.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpnintranetapplicationbinding -Name <string>
        An example how to delete vpnvserver_vpnintranetapplication_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpnintranetapplicationbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnintranetapplication_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Intranetapplication 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpnintranetapplicationbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Intranetapplication') ) { $arguments.Add('intranetapplication', $Intranetapplication) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpnintranetapplication_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-ADCDeleteVpnvservervpnintranetapplicationbinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpnintranetapplicationbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnintranetapplication that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpnintranetapplication_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpnintranetapplication_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-ADCGetVpnvservervpnintranetapplicationbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnintranetapplicationbinding -GetAll
        Get all vpnvserver_vpnintranetapplication_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnintranetapplicationbinding -Count
        Get the number of vpnvserver_vpnintranetapplication_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnintranetapplicationbinding -name <string>
        Get vpnvserver_vpnintranetapplication_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnintranetapplicationbinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpnintranetapplication_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpnintranetapplicationbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnintranetapplication_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpnintranetapplicationbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpnintranetapplication_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnintranetapplication_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 vpnvserver_vpnintranetapplication_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnintranetapplication_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpnintranetapplication_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnintranetapplication_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpnintranetapplication_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnintranetapplication_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpnintranetapplication_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnintranetapplication_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-ADCGetVpnvservervpnintranetapplicationbinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpnnexthopserverbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnnexthopserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Nexthopserver
        The name of the next hop server bound to the VPN virtual server.
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpnnexthopserver_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpnnexthopserverbinding -name <string>
        An example how to add vpnvserver_vpnnexthopserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpnnexthopserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnnexthopserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Nexthopserver,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpnnexthopserverbinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('nexthopserver') ) { $payload.Add('nexthopserver', $nexthopserver) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpnnexthopserver_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpnnexthopserver_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-ADCGetVpnvservervpnnexthopserverbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpnnexthopserverbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpnnexthopserverbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnnexthopserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Nexthopserver
        The name of the next hop server bound to the VPN virtual server.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpnnexthopserverbinding -Name <string>
        An example how to delete vpnvserver_vpnnexthopserver_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpnnexthopserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnnexthopserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Nexthopserver 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpnnexthopserverbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Nexthopserver') ) { $arguments.Add('nexthopserver', $Nexthopserver) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpnnexthopserver_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-ADCDeleteVpnvservervpnnexthopserverbinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpnnexthopserverbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnnexthopserver that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpnnexthopserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpnnexthopserver_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-ADCGetVpnvservervpnnexthopserverbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnnexthopserverbinding -GetAll
        Get all vpnvserver_vpnnexthopserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnnexthopserverbinding -Count
        Get the number of vpnvserver_vpnnexthopserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnnexthopserverbinding -name <string>
        Get vpnvserver_vpnnexthopserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnnexthopserverbinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpnnexthopserver_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpnnexthopserverbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnnexthopserver_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpnnexthopserverbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpnnexthopserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnnexthopserver_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 vpnvserver_vpnnexthopserver_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnnexthopserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpnnexthopserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnnexthopserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpnnexthopserver_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnnexthopserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpnnexthopserver_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnnexthopserver_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-ADCGetVpnvservervpnnexthopserverbinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpnportalthemebinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnportaltheme that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Portaltheme
        Name of the portal theme bound to VPN vserver.
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpnportaltheme_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpnportalthemebinding -name <string>
        An example how to add vpnvserver_vpnportaltheme_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpnportalthemebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnportaltheme_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Portaltheme,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpnportalthemebinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('portaltheme') ) { $payload.Add('portaltheme', $portaltheme) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpnportaltheme_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpnportaltheme_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-ADCGetVpnvservervpnportalthemebinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpnportalthemebinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpnportalthemebinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnportaltheme that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Portaltheme
        Name of the portal theme bound to VPN vserver.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpnportalthemebinding -Name <string>
        An example how to delete vpnvserver_vpnportaltheme_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpnportalthemebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnportaltheme_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Portaltheme 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpnportalthemebinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Portaltheme') ) { $arguments.Add('portaltheme', $Portaltheme) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpnportaltheme_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-ADCDeleteVpnvservervpnportalthemebinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpnportalthemebinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnportaltheme that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpnportaltheme_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpnportaltheme_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-ADCGetVpnvservervpnportalthemebinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnportalthemebinding -GetAll
        Get all vpnvserver_vpnportaltheme_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnportalthemebinding -Count
        Get the number of vpnvserver_vpnportaltheme_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnportalthemebinding -name <string>
        Get vpnvserver_vpnportaltheme_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnportalthemebinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpnportaltheme_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpnportalthemebinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnportaltheme_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpnportalthemebinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpnportaltheme_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnportaltheme_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 vpnvserver_vpnportaltheme_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnportaltheme_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpnportaltheme_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnportaltheme_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpnportaltheme_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnportaltheme_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpnportaltheme_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnportaltheme_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-ADCGetVpnvservervpnportalthemebinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpnsessionpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnsessionpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpnsessionpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpnsessionpolicybinding -name <string>
        An example how to add vpnvserver_vpnsessionpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpnsessionpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnsessionpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpnsessionpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpnsessionpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpnsessionpolicy_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-ADCGetVpnvservervpnsessionpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpnsessionpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpnsessionpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnsessionpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpnsessionpolicybinding -Name <string>
        An example how to delete vpnvserver_vpnsessionpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpnsessionpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnsessionpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpnsessionpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpnsessionpolicy_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-ADCDeleteVpnvservervpnsessionpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpnsessionpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnsessionpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpnsessionpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpnsessionpolicy_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-ADCGetVpnvservervpnsessionpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnsessionpolicybinding -GetAll
        Get all vpnvserver_vpnsessionpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnsessionpolicybinding -Count
        Get the number of vpnvserver_vpnsessionpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnsessionpolicybinding -name <string>
        Get vpnvserver_vpnsessionpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnsessionpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpnsessionpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpnsessionpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnsessionpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpnsessionpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpnsessionpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnsessionpolicy_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 vpnvserver_vpnsessionpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnsessionpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpnsessionpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnsessionpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpnsessionpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnsessionpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpnsessionpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnsessionpolicy_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-ADCGetVpnvservervpnsessionpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpntrafficpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpntrafficpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Applicable only to advance vpn session policy. Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is numerically lower than the current policy's priority. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpntrafficpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpntrafficpolicybinding -name <string>
        An example how to add vpnvserver_vpntrafficpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpntrafficpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpntrafficpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpntrafficpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpntrafficpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpntrafficpolicy_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-ADCGetVpnvservervpntrafficpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpntrafficpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpntrafficpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpntrafficpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpntrafficpolicybinding -Name <string>
        An example how to delete vpnvserver_vpntrafficpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpntrafficpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpntrafficpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpntrafficpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpntrafficpolicy_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-ADCDeleteVpnvservervpntrafficpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpntrafficpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpntrafficpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpntrafficpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpntrafficpolicy_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-ADCGetVpnvservervpntrafficpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpntrafficpolicybinding -GetAll
        Get all vpnvserver_vpntrafficpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpntrafficpolicybinding -Count
        Get the number of vpnvserver_vpntrafficpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpntrafficpolicybinding -name <string>
        Get vpnvserver_vpntrafficpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpntrafficpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpntrafficpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpntrafficpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpntrafficpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpntrafficpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpntrafficpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpntrafficpolicy_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 vpnvserver_vpntrafficpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpntrafficpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpntrafficpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpntrafficpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpntrafficpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpntrafficpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpntrafficpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpntrafficpolicy_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-ADCGetVpnvservervpntrafficpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpnurlpolicybinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnurlpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Priority
        Integer specifying the policy's priority. The lower the number, the higher the priority. Policies are evaluated in the order of their priority numbers. Maximum value for default syntax policies is 2147483647 and for classic policies is 64000.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Gotopriorityexpression
        Next priority expression.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpnurlpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpnurlpolicybinding -name <string>
        An example how to add vpnvserver_vpnurlpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpnurlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnurlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Policy,

        [ValidateRange(0, 2147483647)]
        [double]$Priority,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQUEST', 'RESPONSE', 'ICA_REQUEST', 'OTHERTCP_REQUEST', 'AAA_REQUEST', 'AAA_RESPONSE')]
        [string]$Bindpoint,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpnurlpolicybinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('policy') ) { $payload.Add('policy', $policy) }
            if ( $PSBoundParameters.ContainsKey('priority') ) { $payload.Add('priority', $priority) }
            if ( $PSBoundParameters.ContainsKey('secondary') ) { $payload.Add('secondary', $secondary) }
            if ( $PSBoundParameters.ContainsKey('groupextraction') ) { $payload.Add('groupextraction', $groupextraction) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('bindpoint') ) { $payload.Add('bindpoint', $bindpoint) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpnurlpolicy_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpnurlpolicy_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-ADCGetVpnvservervpnurlpolicybinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpnurlpolicybinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpnurlpolicybinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnurlpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Policy
        The name of the policy, if any, bound to the VPN virtual server.
    .PARAMETER Secondary
        Binds the authentication policy as the secondary policy to use in a two-factor configuration. A user must then authenticate not only via a primary authentication method but also via a secondary authentication method. User groups are aggregated across both. The user name must be exactly the same for both authentication methods, but they can require different passwords.
    .PARAMETER Groupextraction
        Binds the authentication policy to a tertiary chain which will be used only for group extraction. The user will not authenticate against this server, and this will only be called if primary and/or secondary authentication has succeeded.
    .PARAMETER Bindpoint
        Bind point to which to bind the policy. Applies only to rewrite and cache policies. If you do not set this parameter, the policy is bound to REQ_DEFAULT or RES_DEFAULT, depending on whether the policy rule is a response-time or a request-time expression.
        Possible values = REQUEST, RESPONSE, ICA_REQUEST, OTHERTCP_REQUEST, AAA_REQUEST, AAA_RESPONSE
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpnurlpolicybinding -Name <string>
        An example how to delete vpnvserver_vpnurlpolicy_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpnurlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnurlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Policy,

        [boolean]$Secondary,

        [boolean]$Groupextraction,

        [string]$Bindpoint 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpnurlpolicybinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policy') ) { $arguments.Add('policy', $Policy) }
            if ( $PSBoundParameters.ContainsKey('Secondary') ) { $arguments.Add('secondary', $Secondary) }
            if ( $PSBoundParameters.ContainsKey('Groupextraction') ) { $arguments.Add('groupextraction', $Groupextraction) }
            if ( $PSBoundParameters.ContainsKey('Bindpoint') ) { $arguments.Add('bindpoint', $Bindpoint) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpnurlpolicy_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-ADCDeleteVpnvservervpnurlpolicybinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpnurlpolicybinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnurlpolicy that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpnurlpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpnurlpolicy_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-ADCGetVpnvservervpnurlpolicybinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnurlpolicybinding -GetAll
        Get all vpnvserver_vpnurlpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnurlpolicybinding -Count
        Get the number of vpnvserver_vpnurlpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnurlpolicybinding -name <string>
        Get vpnvserver_vpnurlpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnurlpolicybinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpnurlpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpnurlpolicybinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnurlpolicy_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpnurlpolicybinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpnurlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurlpolicy_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 vpnvserver_vpnurlpolicy_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurlpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpnurlpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurlpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpnurlpolicy_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurlpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpnurlpolicy_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurlpolicy_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-ADCGetVpnvservervpnurlpolicybinding: Ended"
    }
}

function Invoke-ADCAddVpnvservervpnurlbinding {
    <#
    .SYNOPSIS
        Add SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnurl that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Urlname
        The intranet URL.
    .PARAMETER PassThru
        Return details about the created vpnvserver_vpnurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-ADCAddVpnvservervpnurlbinding -name <string>
        An example how to add vpnvserver_vpnurl_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCAddVpnvservervpnurlbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnurl_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Urlname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-ADCAddVpnvservervpnurlbinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('urlname') ) { $payload.Add('urlname', $urlname) }
            if ( $PSCmdlet.ShouldProcess("vpnvserver_vpnurl_binding", "Add SSL VPN configuration Object") ) {
                $result = Invoke-ADCNitroApi -ADCSession $ADCSession -Method PUT -NitroPath nitro/v1/config -Type vpnvserver_vpnurl_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-ADCGetVpnvservervpnurlbinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-ADCAddVpnvservervpnurlbinding: Finished"
    }
}

function Invoke-ADCDeleteVpnvservervpnurlbinding {
    <#
    .SYNOPSIS
        Delete SSL VPN configuration Object.
    .DESCRIPTION
        Binding object showing the vpnurl that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER Urlname
        The intranet URL.
    .EXAMPLE
        PS C:\>Invoke-ADCDeleteVpnvservervpnurlbinding -Name <string>
        An example how to delete vpnvserver_vpnurl_binding configuration Object(s).
    .NOTES
        File Name : Invoke-ADCDeleteVpnvservervpnurlbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnurl_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Urlname 
    )
    begin {
        Write-Verbose "Invoke-ADCDeleteVpnvservervpnurlbinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Urlname') ) { $arguments.Add('urlname', $Urlname) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete SSL VPN configuration Object") ) {
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method DELETE -Type vpnvserver_vpnurl_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-ADCDeleteVpnvservervpnurlbinding: Finished"
    }
}

function Invoke-ADCGetVpnvservervpnurlbinding {
    <#
    .SYNOPSIS
        Get SSL VPN configuration object(s).
    .DESCRIPTION
        Binding object showing the vpnurl that can be bound to vpnvserver.
    .PARAMETER Name
        Name of the virtual server.
    .PARAMETER GetAll
        Retrieve all vpnvserver_vpnurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the vpnvserver_vpnurl_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-ADCGetVpnvservervpnurlbinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnurlbinding -GetAll
        Get all vpnvserver_vpnurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnurlbinding -Count
        Get the number of vpnvserver_vpnurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnurlbinding -name <string>
        Get vpnvserver_vpnurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-ADCGetVpnvservervpnurlbinding -Filter @{ 'name'='<value>' }
        Get vpnvserver_vpnurl_binding data with a filter.
    .NOTES
        File Name : Invoke-ADCGetVpnvservervpnurlbinding
        Version : v2210.2317
        Author : John Billekens
        Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/vpn/vpnvserver_vpnurl_binding/
        Requires : PowerShell v5.1 and up
                    ADC 13.x and up.
                    ADC 12 and lower may work, not guaranteed.
    .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]$ADCSession = (Get-ADCSession),

        [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-ADCGetVpnvservervpnurlbinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all vpnvserver_vpnurl_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurl_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 vpnvserver_vpnurl_binding objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving vpnvserver_vpnurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving vpnvserver_vpnurl_binding configuration for property 'name'"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving vpnvserver_vpnurl_binding configuration objects"
                $response = Invoke-ADCNitroApi -ADCSession $ADCSession -Method GET -Type vpnvserver_vpnurl_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-ADCGetVpnvservervpnurlbinding: Ended"
    }
}

# SIG # Begin signature block
# MIITYgYJKoZIhvcNAQcCoIITUzCCE08CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBqf6dPzOytbsCt
# 0PGlOrOXHSymjUjNaBcJkigM5acTBKCCEHUwggTzMIID26ADAgECAhAsJ03zZBC0
# 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
# LqPzW0sH3DJZ84enGm1YMYICQzCCAj8CAQEwgZAwfDELMAkGA1UEBhMCR0IxGzAZ
# BgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEYMBYG
# A1UEChMPU2VjdGlnbyBMaW1pdGVkMSQwIgYDVQQDExtTZWN0aWdvIFJTQSBDb2Rl
# IFNpZ25pbmcgQ0ECECwnTfNkELSL/bju5S9Y3lMwDQYJYIZIAWUDBAIBBQCggYQw
# GAYKKwYBBAGCNwIBDDEKMAigAoAAoQKAADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGC
# NwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkqhkiG9w0BCQQx
# IgQgP1XxF+3lMrbish0X5kEV7i4kJl9IWHdo6NJSAL9aVbgwDQYJKoZIhvcNAQEB
# BQAEggEAfkb6ggfHHAQf51CSKeepz6IYbd/eTK+TzMxkgLallK9D+hDqiZpNohns
# 3o2K/WPtQ1kXigBQeq7V08aIdsl1CbVoqsIISrqQfV+2eZt2ZjWnoKm72sSbXqiK
# xBGSuiiJ/DHYWYFmrtQ6LeGYytp6KnONgaBE05nRI7noZPoSaGSMX9ijyWS1noE7
# uSYPciVwaqp+Rs2tMPTeQtQuBzJrXX56N6pwIS7NWZammctNiT0a6TD8AFMj9X9q
# fJSFLydwva2y/MGDBZrEYlyIWNP8uWV0jnL5L+5qr1pijSN2kQysKXfuUN4LYKbR
# ksIORFFO+Gg9o7AWGXM0L04gumPtfg==
# SIG # End signature block