Solved

Sharepoint 2010 creating sites using powershell code - cmdlet not recognized

Posted on 2011-09-05
2
721 Views
Last Modified: 2013-06-07
I am trying to set Sharepoint 2010 up on a test server. when I run powershell to create the application the code I am using comes back with 'The term 'New-SPSStateserviceDatabase' is not recognized as the name of the cmdlet.........

I am using http://www.harbar.net/articles/sp2010mt5.aspx

I am trying to set up a SP as a hosted environemt and have Win 2008 R2 with SQL Express installed and Sharepoint install without running the wizard. the code creates the Farm but will not go any further.

I fail when I try to run the code  - see attached. Error returned after running code
Write-Host "Creating $stateName Application and Proxy..."
$stateDB = New-SPStateServiceDatabase -Name $stateDBName
$state = New-SPStateServiceApplication -Name $stateName -Database $stateDB
New-SPServiceApplicationProxy -Name "$stateName Proxy" -ServiceApplication $state -DefaultProxyGroup

Open in new window

0
Comment
Question by:pflook
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Expert Comment

by:vaderj
ID: 37064753
It sounds like you need to register the sharepoint module with powershell:

http://www.sharepointedutech.com/2010/02/13/the-first-steps-to-sharepoint-2010-powershell-heaven/

Get-Command  –PSSnapin “Microsoft.SharePoint.PowerShell”
0
 
LVL 8

Accepted Solution

by:
vaderj earned 500 total points
ID: 37064765
hmm, here it says another command:
http://technet.microsoft.com/en-us/library/ee806878.aspx#section2

Add-PSSnapin Microsoft.SharePoint.PowerShell

I just did this the other day in my own SPF'10 instance, but cant remember the exact one
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question