I am Trying to create the "New SP Profile Service Application" using Powershell command

New-SPProfileServiceApplication -Name SharedServicesMoss2007 –ApplicationPool "SharePoint Web Services Default" –ProfileDBName "WSS_Content_38216"

I identified it is showing error as "Missing expression after unary operator '-' "

at -Name key word .Can any one help me how can i solve the issue

  • Careful with that Profile DB Name. It looks like a content DB Aug 10, 2016 at 16:50

1 Answer 1


Are you using the SharePoint 2010 Management Shell?

If not, have you loaded the SharePoint Module?

Add-PSSnapin Microsoft.SharePoint.PowerShell 

Follow this link: http://technet.microsoft.com/en-us/library/ee806878.aspx

Also, quote all your parameters:

-Name "SharedServicesMoss2007"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.