Skip to content

Get WinSCPItemChecksum

Thomas Malkewitz edited this page Sep 14, 2015 · 15 revisions

##Syntax

Get-WinSCPItemChecksum -WinSCPSession <WinSCP.Session> -Algorithm <String> -Path <String[]> [ <CommonParameters>]

##Comment Based Help

  • SYNOPSIS

    Calculates a checksum of a remote file.

  • DESCRIPTION

    Use IANA Algorithm to retrive the checksum of a remote file.

  • INPUTS

    WinSCP.Session.

    System.String.

  • OUTPUTS

    System.Array.

  • PARAMETER WinSCPSession

    A valid open WinSCP.Session, returned from New-WinSCPSession.

  • PARAMETER Algorithm

    A name of a checksum algorithm to use. Use IANA name of algorithm or use a name of any proprietary algorithm the server supports (with SFTP protocol only). Commonly supported algorithms are sha-1 and md5.

  • PARAMETER Path

    A full path to a remote file to calculate a checksum for.

  • EXAMPLE

    PS C:\> New-WinSCPSession -Credential (New-Object -TypeName System.Managemnet.Automation.PSCredential -ArgumentList $env:USERNAME, (New-Object -TypeName System.Security.SecureString)) -Hostname 'myftphost.org' -Protocol Ftp | Get-WinSCPItemChecksum -Algorithm 'sha-1' -Path '/rDir/file.txt'

Clone this wiki locally