Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell encrypt ftp login and run command

$
0
0

I am trying to automate ftp login to reboot a camera. I found exactly the same request but the password wasn't encrypted.

the ftp command is built into the camera.

I created a text file reboot.txt with:

open cameraIP

username

password

"quote"

"site reboot"

quit

and used the command

ftp -s:.\reboot.txt and it worked fine.

I encrypted the password and put it in the variable $Password. But if I put $Password in the text file, it will not work.

Is there any way to include all this in Powershell before reaching the text file? for ex: ftp CameraIP username $Password

Or is there a way to send the command "quote site reboot" to ftp from Powershell

Thank you

Cesar


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>