Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sharepoint 2010 creating sites using powershell code - cmdlet not recognized

Posted on 2011-09-05
2
Medium Priority
?
751 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 9

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 9

Accepted Solution

by:
vaderj earned 1500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

618 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