Condividi tramite

Export command line output to text file

Anonimo
2012-08-08T16:29:02+00:00

Hi guys,

 sorry for this question but not before of this morning I didn't know nothing about vbs script, but it looks like very interesting. For my work I need to automatizate a script that connect to a ip address via telnet, insert automatically user and password, sumit some commands store all the output on file txt and close the connection.

In my opinion seems very easy but I don't know how to proceed..

I try to schematize what i want to do:

from a Win server I create a .vbs file and into it I will do:

 1) telnet to ip address 192.168.0.1

 2) insert automatically user: "Admin", when "insert user" will prompt on the command line

 3) insert automatically password "PASSWORD123", when "insert password" will prompt on the command line

 4) submit the 1st command for e.g.: "ping  address1.address.xxx.xxx"

 5) wait the display of above command will be displayed

 6)  submit the 2nd command for e.g.: "tracert  address1.address.xxx.xxx"

 7) wait the display of above command will be displayed

 8) submit the 3rd command for e.g.: "ipconfig"

 9) wait the display of above command will be displayed

  1. store all output in the file "output.txt" in "c:"

Probably point 10 will be as 1st point.

Win to use Windows 7 and Vista.

Could you kindly help me to traduce this points in VBS or something like that (.bat ??) script?

I just tried on this form and google also but the example are not so easy to convert into my case.. :-(

Thanks in advance for your help.

Best regards,

Paolo

Windows per utenti privati | Versioni precedenti di Windows | App

Domanda bloccata. Questa domanda è stata eseguita dalla community del supporto tecnico Microsoft. È possibile votare se è utile, ma non è possibile aggiungere commenti o risposte o seguire la domanda.

0 commenti Nessun commento

Risposta accettata dall'autore della domanda

Anonimo
2012-08-09T05:12:35+00:00

Forum italiano -> lingua italiana. Grazie.

Per una migliore assistenza chiedi supporto nel Microsoft MSDN Forum più appropriato.

Ovvero nel **Forum TechNet per Windows PowerShell** (Lingua inglese).

O, infine, anche nell'ottimo Forum (non Microsoft) in lingua italiana **powershell.it** (porta un saluto al mio collega MVP Efran Cobisi).

Saluti.

La risposta è stata utile?

0 commenti Nessun commento

0 risposte aggiuntive

Ordina per: Più utili