Tuesday, January 11, 2011

How to Change Diagnostic Log path in SharePoint 2010 by using PowerShell

Best Practice to change the path of Diagnostic Log to avoid disk run out of space C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS in SharePoint 2010 and this can be done by PowerShell so go to
Start >> All Programs >> Microsoft SharePoint 2010 Products >> SharePoint 2010 Management Shell

Create folder for example in D:\SharePointLog
then run this command

Set-SPDiagnosticConfig -LogLocation D:\SharePointLog\

to check if your changes applied just run this command

Get-SPDiagnosticConfig

and see the Log location path

Done

1 comment:

Fadi Ahmad Abdulwahab said...

you can also modify it by using User Interface from Central Administration >> Monitoring >> Configure diagnostic logging
,thanks Ismail for your notice