Advertisement
Guest User

Untitled

a guest
Oct 30th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Import-Module PSFTP
  2. $FTPServer = 'xx.xx.xx.xxx'
  3. $FTPUsername = 'user'
  4. $FTPPassword = 'pass'
  5. $FTPSecurePassword = ConvertTo-SecureString -String $FTPPassword -asPlainText -Force
  6. $FTPCredential = New-Object System.Management.Automation.PSCredential($FTPUsername,$FTPSecurePassword)
  7. $SignFile = 'g:DigitalSignagesignage.html'
  8. # Check for Signage file and transfer
  9. If (Test-Path $SignFile) {
  10. # Signage file exists
  11. #Open FTP connecion
  12. Set-FTPConnection -Credentials $FTPCredential -Server $FTPServer -Session MySession
  13. $Session = Get-FTPConnection -Session MySession
  14. #transfer File
  15. Add-FTPItem -Path "/" -LocalPath $SignFile -Session MySession -Verbose
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement