We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

BUG: Changing the Log File Directory in IIS 8 with PowerShellRSS

1 reply

Last post Nov 15, 2012 04:22 AM by Perkinsville

  • BUG: Changing the Log File Directory in IIS 8 with PowerShell

    Oct 19, 2012 09:58 AM|Tumerkan Tekdamar|LINK

    You must type first character of "directory" lowercase. If you type "LogFile.Directory", log file directory doesn't change and you don't receive any error.

    PS C:\Users\administrator> Set-ItemProperty IIS:\Sites\domain.com -Name LogFile.Directory -Value D:\WebSites\domain.com
    PS C:\Users\administrator> Get-ItemProperty IIS:\Sites\domain.com -Name LogFile.directory

    After these commands, log file directory is still same and no error!

    PS C:\Users\administrator> Set-ItemProperty IIS:\Sites\domain.com -Name LogFile.directory -Value D:\WebSites\domain.com
    PS C:\Users\administrator> Get-ItemProperty IIS:\Sites\domain.com -Name LogFile.directory

    Now, log file directory has been changed.

    logging logfile iis 8 directory powershell bug

  • Re: BUG: Changing the Log File Directory in IIS 8 with PowerShell

    Nov 15, 2012 04:22 AM|Perkinsville|LINK

    Hi,

    Have you tried using the get-webconfiguration and/or set-webconfigurationproperty cmdlets instead?

    HTH, Ben