-
Notifications
You must be signed in to change notification settings - Fork 30
Get WinSCPItem
Thomas Malkewitz edited this page Oct 30, 2019
·
19 revisions
Retrieves information about remote files.
Get-WinSCPItem [-Path] <String[]> [-Filter <String>] -WinSCPSession <Session> [<CommonParameters>]
Retrieves information about remote files.
PS C:\> Get-WinSCPItem -Path "ftpDir1"
Directory: ./
Mode LastWriteTime Length Name
---- ------------- ------ ----
--------- 6/30/2017 8:50:37 AM ftpDir1
PS C:\> $sessionOption = New-WinSCPSessionOption -HostName $env:COMPUTERNAME -Protocol Ftp
PS C:\> New-WinSCPSession -SessionOption $sessionOption
Opened Timeout HostName
------ ------- --------
True 00:01:00 ftp.dotps1.github.io
PS C:\> Get-WinSCPItem -Path "ftpDir1"
Directory: ./
Mode LastWriteTime Length Name
---- ------------- ------ ----
--------- 6/30/2017 8:50:37 AM ftpDir1
PS C:\> Remove-WinSCPSession
Windows wildcard to filter files. To select all files, use null.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseFull path to remote file.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseIt represents a session and provides methods for manipulating remote files over SFTP, SCP or FTP session.
Type: Session
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
System.String[]