Monday, 13 June 2016

Powershell Command for use

1) To get the log file for a particular error.

Note down the correlation ID and Extract the logs for that particular correlation ID.

Merge-SPLogFile -Path "Drive:\path\filename.log" -correlation "correlation GUID from error
2) To get the Build Version for SP farm
(get-spfarm).buildversion 


3) To get the Size for Site Collection


 
$spsite = Get-SPSite “https://dksharepoint.dorfketal.com/”
$spsite.Usage
$spsite.Usage.Size
$spsite | select @{Name="Size"; Expression={"{0:N2} MB" -f ($_.Usage.Storage/1000000)}}

No comments:

Post a Comment