inetpub\logs\logfiles\w3svc1 getting very large
We have recently built up an SCCM server and our "c drive" is filling up due to this directory, can we delete these files and if not how do we get this directory under control.We are running windows server 2008WSUS SCCM inetpub\logs\logfiles\w3svc1
December 28th, 2009 2:11pm

You can absolutely delete these log files or zip them or turn on NTFS compression. These log files are mainly for troubleshooting and reviewing security. If neither are of immediate interest to you, then turn off logging altogether or write a script to delete them periodically. It's not like ConfigMgr is actually hosting any critical business information and you should have other safe guards in place anyway.Jason | http://myitforum.com/cs2/blogs/jsandys | http://blogs.catapultsystems.com/jsandys/default.aspx | Twitter @JasonSandys
Free Windows Admin Tool Kit Click here and download it now
December 28th, 2009 3:02pm

I trim mine with the following command which creates a scheduled task to do it :- at 12:00 /EVERY:Su Forfiles.exe -p C:\WINDOWS\system32\LogFiles\W3SVC1 -m *.log -d -30 -c \"Cmd.exe /C del @path\" This will run every Sunday, and will trim files in that folder older than 30 days. Adjust to suit. Regards, Tom Watson, E-Mail: Tom_... @... Blog: http://myitforum.com/cs2/blogs/tom_watson
December 29th, 2009 4:56am

Where can I disable this LOG? Is it necessary, I never use it... Thanks
Free Windows Admin Tool Kit Click here and download it now
April 24th, 2010 6:50am

IIS logging is is enabled by default in IIs& ad IIS7.5 so I assume that you mean one of those: http://technet.microsoft.com/en-us/library/cc754631(WS.10).aspx.Jason | http://myitforum.com/cs2/blogs/jsandys | http://blogs.catapultsystems.com/jsandys/default.aspx | Twitter @JasonSandys
April 24th, 2010 10:14am

Hey Tom, Just wanted to thank you for that handy little command there. Nicely done!
Free Windows Admin Tool Kit Click here and download it now
July 22nd, 2010 1:22pm

Here we can disable the IIS log files Go To IIS console -> and Right click WebSite Property and click web site TAB find the Enable logging Next Step ->Uncheck the Enable Logging and restart the IISADMIN services after restart the service IIS log files are disbled
August 7th, 2010 12:42am

This was a great help. I've created a post at http://www.itbangbang.net/2011/10/are-w3svc1-log-files-getting-very-large.html to pass on your information. Thanks!
Free Windows Admin Tool Kit Click here and download it now
October 31st, 2011 2:03pm

I trim mine with the following command which creates a scheduled task to do it :- at 12:00 /EVERY:Su Forfiles.exe -p C:\WINDOWS\system32\LogFiles\W3SVC1 -m *.log -d -30 -c \"Cmd.exe /C del @path\" This will run every Sunday, and will trim files in that folder older than 30 days. Adjust to suit. Regards, Tom Watson, E-Mail: Tom_... @... Blog: http://myitforum.com/cs2/blogs/tom_watson This was a great thread. Cleared over 50 GB from a server today! Thanks, http://www.nickshertzer.com/wordpress/?p=906
December 11th, 2011 11:37pm

You suggest writing a script to delete or trim these unneeded inetpub log files. What would that script look like?Jan Vanderpool
Free Windows Admin Tool Kit Click here and download it now
March 30th, 2012 1:17am

Read the second answer.Regards, Tom Watson, E-Mail: Tom_...@... Blog: http://myitforum.com/cs2/blogs/tom_watson
March 30th, 2012 3:04am

i copied and pasted your forfiles.exe command on a 2008 windows server R2 and got the following error: C:\IISSEPM\W3SVC2>Forfiles.exe -p C:\IISSEPM\W3SVC2 -m *.log -d -30 -c \"Cmd.exe /C del @path\" ERROR: Invalid syntax. '/C' option is not allowed more than '1' time(s). Type "FORFILES /?" for usage. any ideas? thx in advance, pat
Free Windows Admin Tool Kit Click here and download it now
April 9th, 2012 2:27pm

Make sure when you copy and paste that the double quotes aren't being replaced by smart quotes.Jason | http://blog.configmgrftw.com | Twitter @JasonSandys
April 9th, 2012 4:21pm

not sure what "smart quotes" are - i tried substituting the quotes i had copied and pasted w/ double quotes typed in manually - no luck. i then removed the back slashes (\) and viola, it worked - no idea why. thx for your assistance. pat
Free Windows Admin Tool Kit Click here and download it now
April 9th, 2012 4:37pm

The back slashes are required if you want to schedule the FORFILES.EXE command with AT. If you were just running the command on its own, as you've discovered, you don't need the backslashes.Regards, Tom Watson, E-Mail: Tom_...@... Blog: http://myitforum.com/cs2/blogs/tom_watson
April 10th, 2012 5:18am

thx tom
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2012 9:41am

Change the path. It is not the same on a 2008 server. This is what you should use for 2008. at 12:00 /EVERY:Su Forfiles.exe -p C:\inetpub\logs\LogFiles\W3SVC1 -m *.log -d -30 -c \"Cmd.exe /C del @path\"
April 19th, 2012 10:44am

Tom sorry to be a pain but how do you create this script?? Usually when i start ten tas it is asking for an application ! TKS
Free Windows Admin Tool Kit Click here and download it now
April 29th, 2012 7:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics