1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned Install-Module -Name Posh-SSH -RequiredVersion 2.0.2 New-SSHSession -ComputerName 192.168.1.157 -Credential (Get-Credential) Get-SSHSession (Invoke-SSHCommand -Index 0 "ls" | select output).output echo "hola" > fichero.html Set-SCPFile -LocalFile .\fichero.html -ComputerName 192.168.1.157 -RemotePath . -Credential (Get-Credential) Invoke-SSHCommand -Index 0 "ls fichero.html" Invoke-SSHCommand -Index 0 "ls -la index.html" |