Link to home
Start Free TrialLog in
Avatar of pflook
pflook

asked on

Sharepoint 2010 creating sites using powershell code - cmdlet not recognized

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. User generated image
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

Avatar of vaderj
vaderj
Flag of United States of America image

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”
ASKER CERTIFIED SOLUTION
Avatar of vaderj
vaderj
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial