< Back
Push-NSfile
Post
NAME Push-NSfile
SYNOPSIS
Legacy command. Use Add-nsfile instead. The push-NSfile uploads a file to a NetScaler .
SYNTAX
Push-NSfile -destinationfilename <string> -destinationpath <string> [-overwrite <bool>] [-pkcs <byte[]>] [-session
<nitro_service>] [-sourcefiledata <string>] [<CommonParameters>]
DESCRIPTION
The push-NSfile cmdlet uploads a file to a NetScaler. It requires a nitro_session object as input, the actual file
name, the destination file name and destination path. All parameters are mandatory.
PARAMETERS
-sourcefiledata <string>
This specifies the file as a string. Due to a bug in .net, you need to first read the file into a variable.
See examples.
Required? false
Position? named
Default value
Accept pipeline input? true (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? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-destinationfilename <string>
This mandatory parameter specifies the filename of the destination file. Ex "cert.pem"
Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-pkcs <byte[]>
Use when passing PKCS data directly from keyvault. This field takes an array of bytes.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-overwrite <bool>
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
This specifies the file as a string. Due to a bug in .net, you need to first read the file into a variable.
See examples.
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.String
This mandatory parameter specifies the filename of the destination file. Ex "cert.pem"
System.Byte[]
Use when passing PKCS data directly from keyvault. This field takes an array of bytes.
System.Boolean
OUTPUTS
---------- EXAMPLE 1 ----------
Uploading a certificate$file = (get-content c:\\somefile.text" | Out-String )
RELATED LINKS
SYNOPSIS
Legacy command. Use Add-nsfile instead. The push-NSfile uploads a file to a NetScaler .
SYNTAX
Push-NSfile -destinationfilename <string> -destinationpath <string> [-overwrite <bool>] [-pkcs <byte[]>] [-session
<nitro_service>] [-sourcefiledata <string>] [<CommonParameters>]
DESCRIPTION
The push-NSfile cmdlet uploads a file to a NetScaler. It requires a nitro_session object as input, the actual file
name, the destination file name and destination path. All parameters are mandatory.
PARAMETERS
-sourcefiledata <string>
This specifies the file as a string. Due to a bug in .net, you need to first read the file into a variable.
See examples.
Required? false
Position? named
Default value
Accept pipeline input? true (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? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-destinationfilename <string>
This mandatory parameter specifies the filename of the destination file. Ex "cert.pem"
Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-pkcs <byte[]>
Use when passing PKCS data directly from keyvault. This field takes an array of bytes.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-overwrite <bool>
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
This specifies the file as a string. Due to a bug in .net, you need to first read the file into a variable.
See examples.
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.String
This mandatory parameter specifies the filename of the destination file. Ex "cert.pem"
System.Byte[]
Use when passing PKCS data directly from keyvault. This field takes an array of bytes.
System.Boolean
OUTPUTS
---------- EXAMPLE 1 ----------
Uploading a certificate$file = (get-content c:\\somefile.text" | Out-String )
RELATED LINKS