Invoke ADCAddService - j81blog/J81.ADCToolkit GitHub Wiki

Invoke-ADCAddService

SYNOPSIS

Add Basic configuration Object.

SYNTAX

Invoke-ADCAddService [-Name] <String> [[-Ip] <String>] [[-Servername] <String>] [-Servicetype] <String>
 [-Port] <Int32> [[-Cleartextport] <Int32>] [[-Cachetype] <String>] [[-Maxclient] <Double>]
 [[-Healthmonitor] <String>] [[-Maxreq] <Double>] [[-Cacheable] <String>] [[-Cip] <String>]
 [[-Cipheader] <String>] [[-Usip] <String>] [[-Pathmonitor] <String>] [[-Pathmonitorindv] <String>]
 [[-Useproxyport] <String>] [[-Sp] <String>] [[-Rtspsessionidremap] <String>] [[-Clttimeout] <Double>]
 [[-Svrtimeout] <Double>] [[-Customserverid] <String>] [[-Serverid] <Double>] [[-Cka] <String>]
 [[-Tcpb] <String>] [[-Cmp] <String>] [[-Maxbandwidth] <Double>] [[-Accessdown] <String>]
 [[-Monthreshold] <Double>] [[-State] <String>] [[-Downstateflush] <String>] [[-Tcpprofilename] <String>]
 [[-Httpprofilename] <String>] [[-Contentinspectionprofilename] <String>] [[-Hashid] <Double>]
 [[-Comment] <String>] [[-Appflowlog] <String>] [[-Netprofile] <String>] [[-Td] <Double>]
 [[-Processlocal] <String>] [[-Dnsprofilename] <String>] [[-Monconnectionclose] <String>] [-PassThru] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Configuration for service resource.

EXAMPLES

EXAMPLE 1

Invoke-ADCAddService -name <string> -servicetype <string> -port <int>

An example how to add service configuration Object(s).

PARAMETERS

-Name

Name for the service. 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 service has been created.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ip

IP to assign to the service.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Servername

Name of the server that hosts the service.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Servicetype

Protocol in which data is exchanged with the service. Possible values = HTTP, FTP, TCP, UDP, SSL, SSL_BRIDGE, SSL_TCP, DTLS, NNTP, RPCSVR, DNS, ADNS, SNMP, RTSP, DHCPRA, ANY, SIP_UDP, SIP_TCP, SIP_SSL, DNS_TCP, ADNS_TCP, MYSQL, MSSQL, ORACLE, MONGO, MONGO_TLS, RADIUS, RADIUSListener, RDP, DIAMETER, SSL_DIAMETER, TFTP, SMPP, PPTP, GRE, SYSLOGTCP, SYSLOGUDP, FIX, SSL_FIX, USER_TCP, USER_SSL_TCP, QUIC, IPFIX, LOGSTREAM, LOGSTREAM_SSL, MQTT, MQTT_TLS, QUIC_BRIDGE

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port

Port number of the service.

  • in CLI is represented as 65535 in NITRO API
Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: 6
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Cleartextport

Port to which clear text data must be sent after the appliance decrypts incoming SSL traffic. Applicable to transparent SSL services.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Cachetype

Cache type supported by the cache server. Possible values = TRANSPARENT, REVERSE, FORWARD

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Maxclient

Maximum number of simultaneous open connections to the service.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Healthmonitor

Monitor the health of this service. Available settings function as follows: YES - Send probes to check the health of the service. NO - Do not send probes to check the health of the service. With the NO option, the appliance shows the service as UP at all times. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 10
Default value: YES
Accept pipeline input: False
Accept wildcard characters: False

-Maxreq

Maximum number of requests that can be sent on a persistent connection to the service. Note: Connection requests beyond this value are rejected.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 11
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Cacheable

Use the transparent cache redirection virtual server to forward requests to the cache server. Note: Do not specify this parameter if you set the Cache Type parameter. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 12
Default value: NO
Accept pipeline input: False
Accept wildcard characters: False

-Cip

Before forwarding a request to the service, insert an HTTP header with the client's IPv4 or IPv6 address as its value. Used if the server needs the client's IP address for security, accounting, or other purposes, and setting the Use Source IP parameter is not a viable option. Possible values = ENABLED, DISABLED

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Cipheader

Name for the HTTP header whose value must be set to the IP address of the client. Used with the Client IP parameter. If you set the Client IP parameter, and you do not specify a name for the header, the appliance uses the header name specified for the global Client IP Header parameter (the cipHeader parameter in the set ns param CLI command or the Client IP Header parameter in the Configure HTTP Parameters dialog box at System > Settings > Change HTTP parameters). If the global Client IP Header parameter is not specified, the appliance inserts a header with the name "client-ip.".

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Usip

Use the client's IP address as the source IP address when initiating a connection to the server. When creating a service, if you do not set this parameter, the service inherits the global Use Source IP setting (available in the enable ns mode and disable ns mode CLI commands, or in the System > Settings > Configure modes > Configure Modes dialog box). However, you can override this setting after you create the service. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 15
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pathmonitor

Path monitoring for clustering. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pathmonitorindv

Individual Path monitoring decisions. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 17
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Useproxyport

Use the proxy port as the source port when initiating connections with the server. With the NO setting, the client-side connection port is used as the source port for the server-side connection. Note: This parameter is available only when the Use Source IP (USIP) parameter is set to YES. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 18
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sp

Enable surge protection for the service. Possible values = ON, OFF

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 19
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rtspsessionidremap

Enable RTSP session ID mapping for the service. Possible values = ON, OFF

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 20
Default value: OFF
Accept pipeline input: False
Accept wildcard characters: False

-Clttimeout

Time, in seconds, after which to terminate an idle client connection.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 21
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Svrtimeout

Time, in seconds, after which to terminate an idle server connection.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 22
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Customserverid

Unique identifier for the service. Used when the persistency type for the virtual server is set to Custom Server ID.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 23
Default value: "None"
Accept pipeline input: False
Accept wildcard characters: False

-Serverid

The identifier for the service. This is used when the persistency type is set to Custom Server ID.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 24
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Cka

Enable client keep-alive for the service. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 25
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tcpb

Enable TCP buffering for the service. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 26
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Cmp

Enable compression for the service. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 27
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Maxbandwidth

Maximum bandwidth, in Kbps, allocated to the service.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 28
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Accessdown

Use Layer 2 mode to bridge the packets sent to this service if it is marked as DOWN. If the service is DOWN, and this parameter is disabled, the packets are dropped. Possible values = YES, NO

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 29
Default value: NO
Accept pipeline input: False
Accept wildcard characters: False

-Monthreshold

Minimum sum of weights of the monitors that are bound to this service. Used to determine whether to mark a service as UP or DOWN.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 30
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-State

Initial state of the service. Possible values = ENABLED, DISABLED

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 31
Default value: ENABLED
Accept pipeline input: False
Accept wildcard characters: False

-Downstateflush

Flush all active transactions associated with a service whose state transitions from UP to DOWN. Do not enable this option for applications that must complete their transactions. Possible values = ENABLED, DISABLED

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 32
Default value: ENABLED
Accept pipeline input: False
Accept wildcard characters: False

-Tcpprofilename

Name of the TCP profile that contains TCP configuration settings for the service.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 33
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Httpprofilename

Name of the HTTP profile that contains HTTP configuration settings for the service.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 34
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Contentinspectionprofilename

Name of the ContentInspection profile that contains IPS/IDS communication related setting for the service.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 35
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Hashid

A numerical identifier that can be used by hash based load balancing methods. Must be unique for each service.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 36
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Comment

Any information about the service.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 37
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Appflowlog

Enable logging of AppFlow information. Possible values = ENABLED, DISABLED

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 38
Default value: ENABLED
Accept pipeline input: False
Accept wildcard characters: False

-Netprofile

Network profile to use for the service.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 39
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Td

Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 40
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Processlocal

By turning on this option packets destined to a service in a cluster will not under go any steering. Turn this option for single packet request response mode or when the upstream device is performing a proper RSS for connection based distribution. Possible values = ENABLED, DISABLED

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 41
Default value: DISABLED
Accept pipeline input: False
Accept wildcard characters: False

-Dnsprofilename

Name of the DNS profile to be associated with the service. DNS profile properties will applied to the transactions processed by a service. This parameter is valid only for ADNS and ADNS-TCP services.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 42
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Monconnectionclose

Close monitoring connections by sending the service a connection termination message with the specified bit set. Possible values = RESET, FIN

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 43
Default value: NONE
Accept pipeline input: False
Accept wildcard characters: False

-PassThru

Return details about the created service item.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

File Name : Invoke-ADCAddService Version : v2111.2521 Author : John Billekens Reference : https://developer-docs.citrix.com/projects/citrix-adc-nitro-api-reference/en/latest/configuration/basic/service/ Requires : PowerShell v5.1 and up ADC 13.x and up. ADC 12 and lower may work, not guaranteed.

RELATED LINKS

https://blog.j81.nl

⚠️ **GitHub.com Fallback** ⚠️