Category Archives: NT Shell Scripts

Netsh command to dump firewall rules

A quick netsh command to dump out your firewall rules: netsh advfirewall firewall show rule name=all

Posted in NT Shell Scripts | 1 Comment

Netstat output showing process names for established connections

Feed: Scriptorlog Posted on: Friday, March 11, 2011 1:39 PM Author: iRobx Subject: Netstat output showing process names for established connections The -b switch on netstat is a great thing. It shows you which process is using which socket or … Continue reading

Posted in NT Shell Scripts | Leave a comment

Dump DHCP Client info for all hosts using netsh

Feed: Scriptorlog Posted on: Friday, April 29, 2011 2:57 PM Author: iRobx Subject: Dump DHCP Client info for all hosts using netsh for /f %i in (‘netsh dhcp server \\MYDHCPSERVERNAME show scope ^|findstr "255.0"’) do netsh dhcp server \\MYDHCPSERVERNAME scope … Continue reading

Posted in NT Shell Scripts | Leave a comment

Use Logparser to send IIS logs to Syslog

Feed: Scriptorlog Posted on: Thursday, February 17, 2011 2:26 PM Author: iRobx Subject: Use Logparser to send IIS logs to Syslog Logparser is a very powerful framework for slicing and dicing various windows eventlogs as well as IIS and other … Continue reading

Posted in NT Shell Scripts | Leave a comment

Identify USB Flash drive by volume ID

Feed: Scriptorlog Posted on: Thursday, November 25, 2010 12:00 PM Author: iRobx Subject: Identify USB Flash drive by volume ID I backup my data folder to a flash drive. The problem is that the flash drive may have an arbitrary … Continue reading

Posted in NT Shell Scripts | 5 Comments

Count TCP connections for each IP address

Feed: Scriptorlog Posted on: Thursday, November 25, 2010 9:32 AM Author: iRobx Subject: Count TCP connections for each IP address This script will use netstat and sort and uniq from the unixutils collection ( http://sourceforge.net/projects/unxutils/ ) to count the number … Continue reading

Posted in NT Shell Scripts | Leave a comment

Disable and Enable Windows 2008 firewall with netsh

Feed: Scriptorlog Posted on: Tuesday, October 26, 2010 9:58 AM Author: iRobx Subject: Disable and Enable Windows 2008 firewall with netsh This is a quick way to turn off the firewall for all profiles: netsh advfirewall set allprofiles state off … Continue reading

Posted in NT Shell Scripts | Leave a comment