Link to home
Start Free TrialLog in
Avatar of alisafia
alisafia

asked on

echo hostnames

@echo on
FOR /F %%w IN (C:\temp2\machines.txt) DO psexec \\%%w "netstat.exe" -na | find "1433" >> echo hostname %%w c:\temp2\sqlps.txt
)

I need port and hostnames into a single file.
ASKER CERTIFIED SOLUTION
Avatar of rushtoshankar
rushtoshankar
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial