Does anyone see the issue with my script? Using plink for cisco switches

130..140 | % {plink "172.16.15.$_" -l username -pw password} -m C:useradminaccountdesktopciscocmd.txt 

Without the ” -m C:useradminaccountdesktopciscocmd.txt” it works fine, automates my log in and allows me to go right through my range that I specify.

When I add the ” -m C:useradminaccountdesktopciscocmd.txt” I get a bunch of errors, but one that sticks out is “cannot be resolved to a method”

The goal for the “-m C:useradminaccountdesktopciscocmd.txt” is to have the cisco commands in a text file and have plink point to that text file and execute the commands. Anyone have any idea what I am doing wrong?

submitted by /u/hhhax7
[link] [comments]

Leave a Reply