How to monitor SharePoint 2010 databases with powershell and windows task scheduler
Hi , In this post i will explain the way for how can we monitor SharePoint 2010 content databases th rough some simple tricks... First of all you need to create a list Central Administration Site as i created in this scenario named ("Content_db_Size") with following columns Title, Content_db_Name Db_Size Now need to create a Powershell script that will pull the Content databases details in this list. Powershell Script:- if(-not(Get-PSSnapin | where { $_.Name -eq "Microsoft.SharePoint.PowerShell"})) { Add-PSSnapin Microsoft.SharePoint.PowerShell; } $adminwebapp = Get-spwebapplication -includecentraladministration | where { $siteUrl = $adminwebapp $listName = "Content_db_Size" $spSite = new-object Microsoft.SharePoint.SPSite($siteUrl) $spWeb = $spSite.OpenWeb() $spList = $spWeb.Lists[$listName] $webapps = Get-SPWebApplication foreach($webapp in $webapps) ...