external help file | Module Name | online version | schema |
---|---|---|---|
Posh-SSH.psm1-Help.xml |
Posh-SSH |
2.0.0 |
Gets the content of the item at the specified location over SFTP.
Get-SFTPContent [-SessionId] <Int32[]> [-Path] <String> [[-ContentType] <String>] [-Encoding <String>]
[<CommonParameters>]
Get-SFTPContent [-SFTPSession] <SftpSession[]> [-Path] <String> [[-ContentType] <String>] [-Encoding <String>]
[<CommonParameters>]
Gets the content of the item at the specified location over SFTP.
Get-SFTPContent -SessionId 0 -Path /etc/system-release
CentOS Linux release 7.0.1406 (Core)
SFTP Session Id of an exiting session.
Type: Int32[]
Parameter Sets: Index
Aliases: Index
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Path to file to get content from.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
How should the content be retured for the file being read.
-
Byte - returns a byte array.
-
MultiLine - Retuns a string array where each element represents a line in the file.
-
String - returns a string with all the contents of the file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
What type of encoding to use when content type is String or MultiLine.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
SFTP Session Object of an exiting session.
Type: SftpSession[]
Parameter Sets: Session
Aliases: Session
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.