Problem to call a PowerShell
Hi guys,
I'm trying tocall a powershell script with $session.ExecuteCommand but I'm having this error bellow:
Error: Connection has been unexpectedly closed. Server sent command exit status 1.
Could someone please help me with this?
Here is the command: $session.ExecuteCommand("G:\Scripts\Move.ps1").Check()
Here is the powershell script:
I'm trying tocall a powershell script with $session.ExecuteCommand but I'm having this error bellow:
Error: Connection has been unexpectedly closed. Server sent command exit status 1.
Could someone please help me with this?
Here is the command: $session.ExecuteCommand("G:\Scripts\Move.ps1").Check()
Here is the powershell script:
Start-Sleep -s 15 Get-Childitem -r -path "G:\SFTP\****\" | rename-item -newname { [io.path]::ChangeExtension($_.name, "gpg") } Start-Sleep -s 10 Get-ChildItem -Path "G:\SFTP\****\" -Recurse -Include *.gpg | Move-Item -Destination "G:\SFTP\****" -verbose