Wrap Test-SPContentDatabase with database name
While testing an upgrade to SharePoint 2013 I wanted to review missing server dependencies. Test-SPContentDatabase does a great job. However, it doesn’t output the SQL content database name. That makes it hard to read output on a large farm with many content databases. By leveraging a custom variable for database name we can augment output with an additional column showing the parent database name for each issue. Hope you find this helpful! ![]()
Code
Get-SPDatabase |? {$_.Type -like 'Content*'} |% {$n=$_.Name; $_} | Test-SPContentDatabase | Select *,{$n}

Excellent advice as always, Jeff! Do you have all of your “handy” script samples like this in one place, by any chance?
Thanks man! Sure do. Been keeping a collection of my favorites at https://splaunch.codeplex.com/SourceControl/latest#SPLaunchVerb.csv as part of that PowerShell remoting project. Lots of goodies here with “shortcut” names to make easier to type. Example : “GRPADMIN” does WMI stuff to show everyone with local admin rights.
Nice! So would it be accurate to say SPLaunch is useful to any admin? It looks like it provides a lot of shortcuts that would be handy. I’ve been working a bit with http://sharepointpowershell.codeplex.com/ lately to automate some things in SharePoint Online and I feel like it’s similar to what SPLaunch is, but focused on the cloud. All good stuff to have handy!
Awesome! I didn’t know about that CodePlex and bookmarked it. Yes, this will be really handy as more people move to the Office 365 cloud. I was actually looking for this two weeks ago when trying to activate a Site Feature remotely without the full SP server cmdlets.