Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

IIS 6 and IIS7 - Enable Logging (For ALL sites)

$
0
0

I've spent the whole day finding ways to automate the "enable logging" on all IIS sites. I found a lot of good stuff (both on this site and some others), but not quite what I need. I'm new to IIS, so feel free to correct my logic here.

I've found several ways to enable/disable logging on the default website but not a way to enumerate all sites and to enable/disable logging on all of them.

My target audience is Server 2003 with IIS 6 and Server 2008 with IIS 7. I'm aware of the adsutil.vbs for IIS6 and AppCmd.exe for IIS7, but I can't seem to get either of them to enumerate all sites. Ideally, I'd like to use WMI or a CmdLet method that will work on both versions. I feel like I'm missing something very obvious and I'm going to kick myself when I hear the solution. :)



Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>