< Back

Add-NSFile

Fri Jan 10, 2020 9:36 pm

NAME Add-NSFile



SYNOPSIS





SYNTAX

Add-NSFile [-Path] <string[]> [-destinationpath] <string> [-overwrite <SwitchParameter>] [-recursive

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





DESCRIPTION





PARAMETERS

-Path <string[]>

Specify the source path. This can be a folder (c:\\files), a file .\\certificate.cer, or even all files in the

current path: .\\*.*, all files of a particular type .\\*.pfx



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-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 (ByValue, ByPropertyName)

Accept wildcard characters? false



-destinationpath <string>

This mandatory parameter specifies the destination path of the file on the NetScaler. Ex "/nsconfig/ssl"



Required? true

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-recursive <SwitchParameter>

The recusive parameter will also traverse the folder structure. Be aware however, that the nitro API does not

support the creation of folders so, all files will end-up in the same destination.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-overwrite <SwitchParameter>

If a file already exists, the upload will fail. By setting the overwrite switch, the file is first deleted

from the NetScaler before it's uploaded.



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

System.String[]

Specify the source path. This can be a folder (c:\\files), a file .\\certificate.cer, or even all files in the

current path: .\\*.*, all files of a particular type .\\*.pfx



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

This mandatory parameter specifies the destination path of the file on the NetScaler. Ex "/nsconfig/ssl"



System.Management.Automation.SwitchParameter

If a file already exists, the upload will fail. By setting the overwrite switch, the file is first deleted

from the NetScaler before it's uploaded.





OUTPUTS





RELATED LINKS