< Back

New-nsrewritepolicy

Sat Jan 11, 2020 12:30 am

NAME New-nsrewritepolicy



SYNOPSIS

The new-NSrewritepolicy creates a rewrite policy.





SYNTAX

New-nsrewritepolicy -action <string> -name <string> -rule <string> [-comment <string>] [-returnobject

<SwitchParameter>] [-session <nitro_service>] [-undefaction <string>] [<CommonParameters>]





DESCRIPTION

Use to create a rewrite policy





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>

Name of the rewrite policy. Mandatory



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-action <string>

Name of the rewrite action to use. Mandatory



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-comment <string>

Specify a comment if desired.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-undefaction <string>

Action to perform if the rule evaluates to 'undefined'. Options are: "NOREWRITE","RESET","DROP".



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-rule <string>

The expression to evaluate when the policies should apply. Use 'true' to apply without a filter.



Required? true

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

Name of the rewrite policy. Mandatory



System.String

Name of the rewrite action to use. Mandatory



System.String

Specify a comment if desired.



System.String

Action to perform if the rule evaluates to 'undefined'. Options are: "NOREWRITE","RESET","DROP".



System.String

The expression to evaluate when the policies should apply. Use 'true' to apply without a filter.



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.rewritepolicy





---------- EXAMPLE 1 ----------



creating a rewrite policyadd-nsrewritepolicy -session $session -name "Enforce-STS-rwpol" -action

"Insert-STS-Header-rwact" -rule "true"





RELATED LINKS