Search code examples
iiscommandiis-7.5dos

Clearing down IIS 7.5 log files - access denied


I've been trying to run the command as per this post

IIS 7 Log Files Auto Delete?

IE:

forfiles /p "C:\inetpub\logs\LogFiles" /s /m *.* /c "cmd /c Del @path" /d -7

On Windows Server 2008 R2. I'm logged in as a user who is a member of the administrators group, and ran the command prompt as administrator, but all I'm getting is a load of "access denied" messages coming back.

Any ideas please?


Solution

  • Ok. To answer my own question. It seems that even though I belong to the administrators group I still needed to log in as the actual administrator in order to run this command.

    Hmmmm. That seems logical... I don't think.