PowerShell::Get Content Database Size in SharePoint

Leave a Comment
Hi All,

In a following post we will see about a PowerShell Script which is used to get the Content Database Size in GB.

Code Snippet:

if(!(Get-PSSnapin Microsoft.SharePoint.PowerShell -ea 0))
{
Add-PSSnapin Microsoft.SharePoint.PowerShell
}

Get-SPSite -Limit All  -ContentDatabase WSS_Content_1212 | select url, @{label="Size";Expression={"{0:N2} GB" -f (($_.usage.storage/1000000)/1000)}}


Thanks.

Related Post

0 comments:

Post a Comment