cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
25775
Views
0
Helpful
32
Replies
Beginner

No worries, I just checked

No worries, I just checked mine and it's a CSR1000V with 15.5(2) IOS and it runs fine on this.
But the CSR runs on a VMware host. Looks like it depends on the HW and SW as well.

Beginner

This zombie thread keeps

This zombie thread keeps coming back to life but I worked out a solution that works...some of the time?

I hope this help someone else or if anyone finds a way to make it more consistent, please let me know!

#List of devices to connect to
$netdevices = "10.11.10.1", "10.10.10.1"

#temp file with commands
$commandfile = "c:\temp\commands.txt"

#put your commands here
$commands = 'show priv
show vlan
exit'

#export commands to the temp file
$commands | Out-File $commandfile -Encoding ascii

#login information for the devices
$credentials = Get-Credential

ForEach($netdevice in $netdevices){
#Execute the commands on each device
echo Y | cmd.exe /c plink.exe $netdevice -l $($credentials.UserName) -ssh -2 -pw $($credentials.GetNetworkCredential().password) `< $commandfile
}

#clear the temp command file in case anything is sensitive
$null | out-file $commandfile
Highlighted

Re: This zombie thread keeps

Not sure if anyone still needs this but I have been using this format on NXOS devices.
It's a little long winded but works for me.
plink.exe -ssh username@FQDN or IP -pw PASSW0RD "sh run ; echo ; sh flogi da ; echo ; sh port-channel summary ; echo ; sh lldp nei" >> "C:\Backups\hostname\""%time:~0,2%%time:~3,2% %date:~0,2%-%date:~3,2%-%date:~6,4%-hostname.txt"

I use this to turn CDP off
plink.exe -ssh username@FQDN or IP -pw PASSW0RD "conf t ; echo ; no cdp enable ; echo ; sh cdp nei ; echo ; sh run" >> "C:\Backups\hostname\""%time:~0,2%%time:~3,2% %date:~0,2%-%date:~3,2%-%date:~6,4%-hostname.txt"
CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards