This question comes up often: How do I find out which version and edition of Microsoft SQL Server I am running? Is it Enterprise, Standard, or Developer?
It’s actually quite simple to get the answer:
1. Open SQL Server Management Studio (SSMS).
2. Click on the “New Query” button to open a new query window.
3. Enter the following query and click on “Execute”:
You should see a query result similar to the following:
Microsoft SQL Server 2008 R2 (RTM) – 10.50.1600.1 (X64)
Apr 2 2010 15:48:46
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
Let’s imagine this scenario:
You have an old SharePoint 2010 site and you need to copy its content to another SharePoint farm. The site is heavily customized and moving it using traditional methods (backup/restore, export/import, save site as a template) are not going to work well. Plus you only want content – no need to bring in all of that custom branding baggage.
You can copy the content using PowerShell and two scripts shown below.
Script # 1: Export all lists and libraries from the source site.
# specify the site URL to export
$web = Get-SPWeb "http://sharepointURL/sites/site1/web1"
# specify output folder to store exported lists
$path = "c:\admin\export\"
foreach($list in $web.lists)
"Exporting " + $list.RootFolder.URL
export-spweb $web.URL -ItemUrl $list.RootFolder.URL -IncludeUserSecurity -IncludeVersions All -path ($path + $list + ".cmp") -nologfile
The output of this script should be a number of CMP files in the output directory. Review these files and remove the lists that should not be imported (such as various Gallery lists).
Script # 2: Import CMP files into the destination site.
# specify target SharePoint site to import into
$site = "http://sharepoint/sites/test1"
# specify folder containing exported lists
$folder = "C:\Admin\Import\"
$Files = Get-ChildItem $folder
foreach ($file in $files)
$name = $file.Name
"Importing: " + "$folder$name"
import-spweb $site -path ("$folder$name") -includeusersecurity -nologfile