Download the COMPLETE Development Environment for SharePoint Server 2010 Farm

Microsoft has released two Virtual Machine for demonstrating SharePoint 2010:

These virtual machines contain:

  1. Windows Server 2008 SP2 Standard Edition x64, running as an Active Directory Domain Controller for the “CONTOSO.COM” domain with DNS and WINS
  2. Microsoft SQL Server 2008 SP2 Enterprise Edition with Analysis, Notification, and Reporting Services
  3. Microsoft Office Communication Server 2007 R2
  4. Visual Studio 2010 Beta 2 Ultimate Edition
  5. Microsoft SharePoint Server 2010 Enterprise Edition Beta 2
  6. Microsoft Office Web Applications Beta 2
  7. FAST Search for SharePoint 2010 Beta 2
  8. Microsoft Project Server 2010 Beta 2
  9. Microsoft Office 2010 Beta 2
  10. Microsoft Office Communicator 2007 R2 Virtual machine
  11. Windows Server 2008 R2 Standard Evaluation Edition x64, joined to the “CONTOSO.COM” domain
  12. Microsoft Exchange Server 2010 Active directory has been preconfigured over 200 “demo” users with metadata in an organizational structure.

In order to run this demo you will need the following:

  • Windows Server 2008 R2 with the Hyper-V role enabled
  • Drive Formatting: NTFS
  • Processor: Intel VT or AMD-V capable
  • RAM: 8 GB or more recommended
  • Hard disk space required for install: 50 GB

SharePoint 2010: PowerShell New-SPConfigurationDatabase : The user does not exist or is not unique.

When running a PowerShell workaround to get SP2010 installed on a standalone Server 2008 R2 machine [here.] I came across a new error.

New-SPConfigurationDatabase : The user does not exist or is not unique. At line:1 char:28 + New-SPConfigurationDatabase <<<< + CategoryInfo : InvalidData: (Microsoft.Share...urationDatabase: SPCmdletNewSPConfigurationDatabase) [New-SPConfigurationDatabase], SPCmdle tException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPCon figurationDatabase New-SPConfigurationDatabase : The user does not exist or is not unique. At line:1 char:28 + New-SPConfigurationDatabase <<<< + CategoryInfo : InvalidData: (Microsoft.Share...urationDatabase: SPCmdletNewSPConfigurationDatabase) [New-SPConfigurationDatabase], COMExce ption + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPCon figurationDatabase

A fewposts I found out there seemed to be focused on the particular version of the Geneva Framework installed. That was not the root cause for me. The solution I got to work was to:

  1. Create a new local user “svc_sharepoint”
  2. Add it to the Administrators group
  3. Delete the Config and AdminContent databases via SQL Server Management Studio
  4. Reopen PowerShell and run New-SPConfigurationDatabase with the following
  • DatabaseName: SharePoint2010_Config
  • DatabaseServer: [SERVERNAME]
  • FarmCredentials [SERVERNAMEACCOUNT]
  • PassPhrase: [PASSWORD]

Notes:

  • If anything fails close and reopen PowerShell
  • Use your servername in the FarmCrendtials section


Creating new SharePoint 2010 sites from templates with Powershell

Now that STSADM is gone it’s time to get one’s PowerShell skill(z) up to date…

Site templates in SharePoint 2010 are slightly different. To get a full listing of what you have access to use try the following:

Get-SPWebTemplate | select Name, Title

Note the name of each template…

Name Title
ACCSRV#0 Access Server Site
ACCSRV#2 Bugs
ACCSRV#3 Charitable Contributions
ACCSRV#5 Projects
BDR#0 Document Center
BLANKINTERNET#0 Publishing Site
BLANKINTERNET#1 Press Releases Site
BLANKINTERNET#2 Publishing Site with Workflow
BLANKINTERNETCONTAINER#0 Publishing Portal
BLOG#0 Blog
CENTRALADMIN#0 Central Admin Site
CMSPUBLISHING#0 Publishing Site
ENTERWIKI#0 Enterprise Wiki
GLOBAL#0 Global template
MPS#0 Basic Meeting Workspace
MPS#1 Blank Meeting Workspace
MPS#2 Decision Meeting Workspace
MPS#3 Social Meeting Workspace
MPS#4 Multipage Meeting Workspace
OFFILE#0 (obsolete) Records Center
OFFILE#1 Records Center
OSRV#0 Shared Services Administration Site
PROFILES#0 Profiles
SGS#0 GroupBoard Workspace
SPS#0 SharePoint Portal Server Site
SPSCOMMU#0 Community area template
SPSMSITE#0 Personalization Site
SPSMSITEHOST#0 My Site Host
SPSNEWS#0 News Site
SPSNHOME#0 News Site
SPSPERS#0 SharePoint Portal Server Personal Space
SPSPORTAL#0 Collaboration Portal
SPSREPORTCENTER#0 Report Center
SPSSITES#0 Site Directory
SPSTOC#0 Contents area Template
SPSTOPIC#0 Topic area template
SRCHCEN#0 Enterprise Search Center
SRCHCENTERFAST#0 FAST Search Center
SRCHCENTERLITE#0 Basic Search Center
SRCHCENTERLITE#1 Basic Search Center
STS#0 Team Site
STS#1 Blank Site
STS#2 Document Workspace
TENANTADMIN#0 Tenant Admin Site
vispr#0 Visio Process Repository
WIKI#0 Wiki Site

So with this knowledge you can do quite a bit. E.g. the below shows how to create a new site from template STS#0 which is a Team Site…

Write-Host
$SiteTitle = “My TeamSite (via PowerShell)”
$SiteUrl = “http://siteurl”
$SiteTemplate = “STS#0”
# make sure Microsoft.SharePoint.PowerShell is loaded
$snapin = Get-PSSnapin | Where-Object {$_.Name -eq ‘Microsoft.SharePoint.Powershell’}
if ($snapin -eq $null) {
Write-Host “SharePoint SnapIn was not present. Loading…”
Add-PSSnapin “Microsoft.SharePoint.Powershell”
}
# create new site at target URL
Write-Host “Creating new site at” $SiteUrl
$NewSite = New-SPSite -URL $SiteUrl -OwnerAlias Administrator -Template $SiteTemplate -Name $SiteTitle
$RootWeb = $NewSite.RootWeb
# display site info to user
Write-Host “————————————-“
Write-Host “Site created successfully”
Write-Host “Title:” $RootWeb.Title -foregroundcolor Green
Write-Host “URL:” $RootWeb.Url -foregroundcolor Red
Write-Host “ID:” $RootWeb.Id.ToString() -foregroundcolor Blue
Write-Host “————————————-“

Enabling anonymous access for a Web application in SharePoint Server 2010

Here’s how to enable anonymous access for a Web application in SharePoint Server 2010.

  1. In Central Administration, go to the Security section.
  2. Under Anonymous Access, select Enable Anonymous.
  3. Click Save.
  4. Go to the site for the Web application you are working with.
  5. Select Site Actions.
  6. Select Site Permissions.
  7. On the ribbon, select Anonymous Access.
  8. Select either Entire Web Site or Lists and Libraries, depending on how you want to scope anonymous access for this site.

SharePoint 2010 Installation Error – The specified user is a local account. Local accounts should only be used in stand alone mode.

So, you’re installing the beta (thanks for redefining that one Google…) and you’re trying to do a complete installation on a single server using a non-domain account. (As most have done because we’re using VirtualBox local VMs which are not connected to any domain…) All of a sudden, something most of us can do in our sleep with 2007 now suddenly gets complicated as it requires the use of domain accounts instead of local machine accounts.

Specifically you get something like this: SharePoint Products Configuration Wizard version 14.0.4514.1009. Copyright (C) Microsoft Corporation 2010. All rights reserved.
The specified user NNNNN is a local account.
Local accounts should only be used in stand alone mode.

Well don’t fret as Windows PowerShell is your savior here, as New-SPConfigurationDatabase allows you to specify non domain credentials for the farm.
To execute this command launch the SharePoint 2010 management shell (in the same location as the central admin link), type the New-SPConfigurationDatabase and press enter. It will ask you for stuff such as the database name e.g. “SharePoint2010_Config”, user, password etc. but overall is easy and interactive.

After it has completed you will find your brand new configuration database sitting next to an admin content database. (The fact that the GUID is existent almost feels like punishment.)

Just make sure you have SQL 2008 updated to at least CU2…

Note that often no matter how many CUs you apply to the RTM, if 2010 says it needs SP1, then it will continue to fail. You simply have to install up to SP1 (10.00.2531) and then install the SP1 CUs to roll forward the version to 10.00.2714. So you’re really going to be looking to run SQLServer2008-KB975977-x64.exe

Build numbers are structured like:

  • 1xxx is RTM
  • 2xxx is SP1
  • 3xxx will be SP2

and so on.

Useful reading: http://msdn.microsoft.com/en-us/library/ee554869%28office.14%29.aspx

“plumb” elements of a web UI together with jsPlumb

The jsPlumb jQuery plugin provides a way to “plumb” elements of a UI together.

It uses a HTML5 canvas element when supported and Google’s ExplorerCanvas script to support older browsers.

The styles, shapes of the wires and “the position of the connection” can be customized easily.

Virtualbox: the ‘correct’ way to clone machines.

I recently had to clone a virtual machine and did my usual copy and paste. Not the best idea. Virtualbox, my preferred virtualization solution, definitely did not like that approach as each machine image has its own uuid which is stored in the actual image… The right way to do it is with the clonehd tool. That said, if the uuid is ‘in’ the file in theory it should be editable and when I have time I intend to test that theory out.

The actual steps to clone a machine on a windows (concept is the same for FreeBSD and OS X) host are as follows.

  1. Open a Command Prompt window on the host machine.
  2. Change to the VirtualBox VDI directory (you do know where your images are…? and you know what spindle contention is…?)
  3. Run the VBoxManage command with clonevdi command option. The following example shows the creation of a copy of Server_2008.vdi named Server_2008_Base.vdi.


“C:Program FilesSunxVM VirtualBoxVBoxManage.exe” clonevdi “Server_2008.vdi”
Server_2008_Base.vdi”


Which then produces a not very informative dialogue box…

VirtualBox Command Line Management Interface Version 2.0.4 (C) 2005-2008 Sun Microsystems, Inc. All rights reserved.

0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

And that’s it.