You can do this a couple different ways.
Option 1 - One batch file
SET /P ComName=Input Computer Name:
CD \diag
PSEXEC \\%ComName% netsh interface ...<your parameters>...
PSEXEC \\%ComName% ipconfig
Option 2 - Two batch files
First.cmd
@ECHO OFF
SET /P ComName=Input Computer Name:
CD \diag
PSEXEC \\%ComName% -c Second.cmd
Note the -c
parameter. It tells PSEXEC
to copy the file to be run to the remote machine first.
Second.cmd
@ECHO OFF
netsh interface ...<your parameters>...
ipconfig