< Back
New-NSrewriteaction
Post
NAME New-NSrewriteaction
SYNOPSIS
The new-NSrewriteaction creates a rewrite action.
SYNTAX
New-NSrewriteaction -name <string> -type <string> [-comment <string>] [-expression <string>] [-returnobject
<SwitchParameter>] [-session <nitro_service>] [-target <string>] [<CommonParameters>]
DESCRIPTION
The new-NSrewriteaction creates a rewrite action.
PARAMETERS
-session <nitro_service>
This mandatory parameter requires a nitro_service object. This can be requested using the get-nitrosession and
pipelined into this command.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-name <string>
Specify the name of the action
Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-comment <string>
Specify a comment
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-target <string>
Use target to specify the header in case of for example an INSERT_HTTP_HEADER action.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-type <string>
Specify the type of action. Possible values = noop, delete, insert_http_header, delete_http_header,
corrupt_http_header, insert_before, insert_after, replace, replace_http_res, delete_all, replace_all,
insert_before_all, insert_after_all, clientless_vpn_encode, clientless_vpn_encode_all, clientless_vpn_decode,
clientless_vpn_decode_all, insert_sip_header, delete_sip_header, corrupt_sip_header, replace_sip_res,
replace_diameter_header_field, replace_dns_header_field, replace_dns_answer_section
Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-expression <string>
Specify the expression for the rewrite policy.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-returnobject <SwitchParameter>
If set to true, the object that is created is returned. This is useful to testing purposes.
Required? false
Position? named
Default value False
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
com.citrix.netscaler.nitro.service.nitro_service
This mandatory parameter requires a nitro_service object. This can be requested using the get-nitrosession and
pipelined into this command.
System.String
Specify the name of the action
System.String
Specify a comment
System.String
Use target to specify the header in case of for example an INSERT_HTTP_HEADER action.
System.String
Specify the type of action. Possible values = noop, delete, insert_http_header, delete_http_header,
corrupt_http_header, insert_before, insert_after, replace, replace_http_res, delete_all, replace_all,
insert_before_all, insert_after_all, clientless_vpn_encode, clientless_vpn_encode_all, clientless_vpn_decode,
clientless_vpn_decode_all, insert_sip_header, delete_sip_header, corrupt_sip_header, replace_sip_res,
replace_diameter_header_field, replace_dns_header_field, replace_dns_answer_section
System.String
Specify the expression for the rewrite policy.
System.Management.Automation.SwitchParameter
If set to true, the object that is created is returned. This is useful to testing purposes.
OUTPUTS
com.citrix.netscaler.nitro.resource.config.rewrite.rewriteaction
---------- EXAMPLE 1 ----------
creating an action to insert a Strict-Transport-Security header with value.add-nsrewriteaction -session $session
-name "Insert-STS-Header-rwact" -type "INSERT_HTTP_HEADER" -target "Strict-Transport-Security" -expression
'"max-age=157680000"'
RELATED LINKS
SYNOPSIS
The new-NSrewriteaction creates a rewrite action.
SYNTAX
New-NSrewriteaction -name <string> -type <string> [-comment <string>] [-expression <string>] [-returnobject
<SwitchParameter>] [-session <nitro_service>] [-target <string>] [<CommonParameters>]
DESCRIPTION
The new-NSrewriteaction creates a rewrite action.
PARAMETERS
-session <nitro_service>
This mandatory parameter requires a nitro_service object. This can be requested using the get-nitrosession and
pipelined into this command.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-name <string>
Specify the name of the action
Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-comment <string>
Specify a comment
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-target <string>
Use target to specify the header in case of for example an INSERT_HTTP_HEADER action.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-type <string>
Specify the type of action. Possible values = noop, delete, insert_http_header, delete_http_header,
corrupt_http_header, insert_before, insert_after, replace, replace_http_res, delete_all, replace_all,
insert_before_all, insert_after_all, clientless_vpn_encode, clientless_vpn_encode_all, clientless_vpn_decode,
clientless_vpn_decode_all, insert_sip_header, delete_sip_header, corrupt_sip_header, replace_sip_res,
replace_diameter_header_field, replace_dns_header_field, replace_dns_answer_section
Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-expression <string>
Specify the expression for the rewrite policy.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-returnobject <SwitchParameter>
If set to true, the object that is created is returned. This is useful to testing purposes.
Required? false
Position? named
Default value False
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
com.citrix.netscaler.nitro.service.nitro_service
This mandatory parameter requires a nitro_service object. This can be requested using the get-nitrosession and
pipelined into this command.
System.String
Specify the name of the action
System.String
Specify a comment
System.String
Use target to specify the header in case of for example an INSERT_HTTP_HEADER action.
System.String
Specify the type of action. Possible values = noop, delete, insert_http_header, delete_http_header,
corrupt_http_header, insert_before, insert_after, replace, replace_http_res, delete_all, replace_all,
insert_before_all, insert_after_all, clientless_vpn_encode, clientless_vpn_encode_all, clientless_vpn_decode,
clientless_vpn_decode_all, insert_sip_header, delete_sip_header, corrupt_sip_header, replace_sip_res,
replace_diameter_header_field, replace_dns_header_field, replace_dns_answer_section
System.String
Specify the expression for the rewrite policy.
System.Management.Automation.SwitchParameter
If set to true, the object that is created is returned. This is useful to testing purposes.
OUTPUTS
com.citrix.netscaler.nitro.resource.config.rewrite.rewriteaction
---------- EXAMPLE 1 ----------
creating an action to insert a Strict-Transport-Security header with value.add-nsrewriteaction -session $session
-name "Insert-STS-Header-rwact" -type "INSERT_HTTP_HEADER" -target "Strict-Transport-Security" -expression
'"max-age=157680000"'
RELATED LINKS