We help IT Professionals succeed at work.

SharePoint 2010 Upgrade-spcontentdatabase

butte-y
butte-y asked
on
Medium Priority
1,094 Views
Last Modified: 2012-05-12
We have recently upgraded from MOSS 2007 the SharePoint 2010 enterprise.  When you run this commnad against a database that is not fully upgraded it tries to upgrade it.  When you run it again and upgraded database it confirms the database is upgraded.  We are looking fro a way to get this confirmation without it running though the upgrade.  test-spcontentdatabase just tells you issues with the database not whether it has been upgraded or not.  I know you can check the status in central admin but I need a programitic way to do it also.  any ideas?
Comment
Watch Question

Commented:
Try getting a handle on the content database you are after, and checking it's status. Here are some options for getting a handle on a content database:

TechNet: Get-SPContentDatabase
http://technet.microsoft.com/en-us/library/ff607828.aspx

See below for a simple example:
$contentdb = Get-SPContentDatabase -WebApplication "SharePoint - 80"
$contentdb.status

Open in new window

Commented:
Here is another option:

Get-SPContentDatabase | select Name, NeedsUpgrade

Author

Commented:
jessc7 - Thanks for your help and getting back to me.  I tested your first option and it jsut tells me the db is online.  The second one looked more promising.  When I run it even against a content db that says some sites are not upgraded it returns false for needs upgrade.  Any other otions?

Author

Commented:
great feedback.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.