#安装PSFTP模块 Install-Module psftp Get-Module psftp -ListAvailable Import-Module psftp $UserName = "ftpuser" $Password = "ftppassword" $userPassword = ConvertTo-SecureString -String $Password -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential($UserName,$userPassword ) Set-FTPConnection -Credentials $cred -Server 10.0.1.7 -UsePassive Send-FTPItem -Path ftp://10.0.1.7/CAB -LocalPath D:\a.zip -Overwrite
标签:UserName,ftp,1.7,上传下载,Module,psftp From: https://www.cnblogs.com/dreamer-fish/p/17203502.html