Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Import-Module PSFTP
- $FTPServer = 'xx.xx.xx.xxx'
- $FTPUsername = 'user'
- $FTPPassword = 'pass'
- $FTPSecurePassword = ConvertTo-SecureString -String $FTPPassword -asPlainText -Force
- $FTPCredential = New-Object System.Management.Automation.PSCredential($FTPUsername,$FTPSecurePassword)
- $SignFile = 'g:DigitalSignagesignage.html'
- # Check for Signage file and transfer
- If (Test-Path $SignFile) {
- # Signage file exists
- #Open FTP connecion
- Set-FTPConnection -Credentials $FTPCredential -Server $FTPServer -Session MySession
- $Session = Get-FTPConnection -Session MySession
- #transfer File
- Add-FTPItem -Path "/" -LocalPath $SignFile -Session MySession -Verbose
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement