< Back

Test-SFTPPath

Sat Jan 18, 2020 8:00 pm

NAME Test-SFTPPath



SYNOPSIS

Test if a File or Directory exists on Remote Server via SFTP





SYNTAX

Test-SFTPPath [-SessionId] <Int32[]> [-Path] <String> [<CommonParameters>]



Test-SFTPPath [-SFTPSession] <SftpSession[]> [-Path] <String> [<CommonParameters>]





DESCRIPTION

Test if a File or Directory exists on Remote Server via SFTP specified by Index or SFTP Session Object.





PARAMETERS

-SessionId <Int32[]>

SFTP Session Id of an exiting session.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Path <String>

Path on remote host to test.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SFTPSession <SftpSession[]>

SFTP Session Object of an exiting session.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

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.Int32[]





SSH.SftpSession[]







OUTPUTS



NOTES









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



Test-SFTPPath -SessionId 0 -Path "/tmp/temporaryfolder"





-------------------------- EXAMPLE 2 --------------------------



Test-SFTPPath -SessionId 0 -Path "/apps/myfile-1.0.0.ipa"







RELATED LINKS

Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs