Friday, January 29, 2016

Get all the site collection with content DB details using powershell commands

Get sites and content DB details using following power shell command

$rootSite=New-Object Microsoft.SharePoint.SPSite("http://weburl")
$spWebApp = $rootSite.WebApplication 
foreach($site in $spWebApp.Sites) {
    
    write-output "$($site.RootWeb.Url) - $($site.ContentDatabase)"     
  
    $site.Dispose() 

No comments:

Post a Comment