-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I only get first digit of IP address #6
Comments
Fixed an issue where the correct device count wasn't being established. This should work properly, now.
Thanks for bringing this to my attention. I fixed the error message you were getting with this latest commit: Please update when possible. As for your other issue, I had no problems with just specifying an IP address in the "device" field of my csv file. Are your fields comma-separated? They will need to be if not: device,user,password,sourceIP I'll work at specifying other separators as well (feature enhancement) :) |
Thanks for the fast reply! :) Gets these messeges on the switch from show log messeges. Seems like the program sends a exit directly after its accept password. Feb 26 09:59:35 sshd[1256]: Accepted password for root from 10.1.20.16 port 62350 ssh2 [08-29-2014 8:35:49] Starting configuration on 10.1.20.15... 2014-08-28 20:22 GMT+02:00 Scott Ware [email protected]:
|
Hmm, that's odd. I'll dig into it today and see if I can't try to re-create it. |
Did some debugging writing my own script and it seems like the Invoke-SSHCommand returns the errorcode 1. |
Hi, I've followed the tutorial step by step but when I try using the command "Invoke-Junosconfig -ConfigFile config.txt -Devicelist devices.csv" The log says
[08-28-2014 16:53:03] Starting configuration on 1...
[08-28-2014 16:53:03] ERROR: Couldn't establish a connection to 1.
[08-28-2014 16:53:03] Please verify your credentials, and that the device is reachable.
This is how the csv file looks like:
device user password sourceIP
10.1.20.15 root root123 10.1.20.15
Seems like the script only takes the first digit of the row and then obviously cant connect.
Here is output from Power shell when i run the command, I guess divide by zero etc is because there is no connection to calculate for or something.
PS C:\Scripts> Invoke-Junosconfig -ConfigFile config.txt -Devicelist devices.csv
Log file exists. Do you wish to overwrite? [y/n]: y
Starting configuration on a total of devices.
Results will be logged to 'C:\Scripts\junos-config.log'
Attempted to divide by zero.
At C:\windows\system32\windowspowershell\v1.0\Modules\Posh-Junos\Posh-Junos.psm1:131 char:9
Write-Progress : Cannot validate argument on parameter 'PercentComplete'. The argument is null, empty, or an element of
the argument collection contains a null value. Supply a collection that does not contain any null values and then try
the command again.
At C:\windows\system32\windowspowershell\v1.0\Modules\Posh-Junos\Posh-Junos.psm1:132 char:139
Configuration complete - 1 configuration errors!
Please check the log file 'C:\Scripts\junos-config.log' to review these errors.
PS C:\Scripts>
The text was updated successfully, but these errors were encountered: