WinSCP.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$paths = @(
    "Private",
    "Public"
)

foreach ($path in $paths) {
    "$(Split-Path -Path $MyInvocation.MyCommand.Path)\$path\*.ps1" | 
        Resolve-Path | 
            ForEach-Object { 
            . $_.ProviderPath 
            }
}

# Add aliases.
New-Alias -Name "Enter-WinSCPSession" -Value "New-WinSCPSession"
New-Alias -Name "Open-WinSCPSession" -Value "New-WinSCPSession"

New-ALias -Name "Close-WinSCPSession" -Value "Remove-WinSCPSession"
New-Alias -Name "Exit-WinSCPSession" -Value "Remove-WinSCPSession"