< Back

New-NitroSession

Fri Jan 10, 2020 11:55 pm

NAME New-NitroSession



SYNOPSIS

The new-nitrosession command establishes a session with the NetScaler.





SYNTAX

New-NitroSession [-UserName] <string> [-Password] <string> [-NSIP] <string> [[-HTTPS] <bool>] [-Secure

<SwitchParameter>] [<CommonParameters>]



New-NitroSession [-credential] <PSCredential> [-NSIP] <string> [[-HTTPS] <bool>] [-Secure <SwitchParameter>]

[<CommonParameters>]





DESCRIPTION

The new-nitrosession is used to connect and authenticate with a NetScaler. It requires a username, password, NSIP,

as well as specifying whether you are connecting using HTTP or HTTPS. It returns a nitro_service object which is

the input for all other commands.





PARAMETERS

-UserName <string>



Required? true

Position? 0

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Password <string>



Required? true

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-credential <PSCredential>

The credential parameter allows the use of a PSCredential object rather than a username, password pair.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-NSIP <string>

The NSIP parameter specifies the destination IP adddress. This is usually the NSIP, however can be a SNIP

provided it has management access enabled



Required? true

Position? 3

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-HTTPS <bool>

The HTTPS parameter specifies whether HTTPS is used to connect. Defaults to HTTP. This parameter is optional.



Required? false

Position? 4

Default value False

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Secure <SwitchParameter>

Alternative to using -HTTPS:$true. This parameter enables a connection over HTTPS



Required? false

Position? named

Default value False

Accept pipeline input? false

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

System.String



System.String



System.Management.Automation.PSCredential

The credential parameter allows the use of a PSCredential object rather than a username, password pair.



System.String

The NSIP parameter specifies the destination IP adddress. This is usually the NSIP, however can be a SNIP

provided it has management access enabled



System.Boolean

The HTTPS parameter specifies whether HTTPS is used to connect. Defaults to HTTP. This parameter is optional.





OUTPUTS

com.citrix.netscaler.nitro.service.nitro_service





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



$session = new-nitrosession -username "citrix" -password "citrix123" -nsip "1.2.3.4" -https $true



Create a nitro session and store the output in a variable.



RELATED LINKS