Script to copy specified IIS logs from multiple Servers


Need to copy a set of IIS logs from multiple servers for data analysis? Are you doing it manually?  If so, please check out this script as it will help expedite the process.

The Script:

What the Script Does

You only need to modify the inputs and create a server list. Then the script will do the following:

  1.  Use a list of servers to collect the data from.
  2.  Create a “logs” folder on the specified drive.
  3.  Create an “export” sub folder under “logs”.
  4.  Create a sub folder under “export” using  server name of each server.
  5.  Use the wild card file name you specified to target specific files.
  6.  Copy each targeted file to the correct serer name folder.


  •  If you want to collet 1 file from each server, just specify use the full date name in the search input (ie 190606).
  •  You can run this more than once if another file is needed and they will be added to the existing folders.
  •  The “export” folder will contain all the files needed. Just compress the folder and you’re ready to share.

Leave a Reply