Creating User Profile Service Appllication

Dec 11, 2012 at 10:37 PM

Hi Guys,

I am using AutoSPInstaller V3.2 and failing to create user profile application. Farm account is local admin and UAC has been disbled. Error:

Creating User Profile Service Application as EMP\SPPSEMPFRM01...

New-SPProfileServiceApplication : Cannot convert 'System.Object[]' to the type

'System.String' required by parameter 'ProfileDBServer'. Specified method is no

t supported.

At C:\Users\SPPSEM~1\AppData\Local\Temp\AutoSPInstaller-ScriptBlock.ps1:3 char:

160

+ $newProfileServiceApp = New-SPProfileServiceApplication -Name "User Profile S

ervice Application" -ApplicationPool "SharePoint Hosted Services" -ProfileDBSer

ver <<<< EMPDCSERVER\EMPSPP,14331 -ProfileDBName EMP_ProfileDB_01 -ProfileSync

DBServer EMPDCSERVER\EMPSPP,14331 -ProfileSyncDBName EMP_SyncDB_01 -SocialDBSer

ver EMPDCSERVER\EMPSPP,14331 -SocialDBName EMP_SocialDB_01 -MySiteHostLocation

"http://mysites.intranet.group:80"

   + CategoryInfo         : InvalidArgument: (:) [New-SPProfileServiceApplic

   ation], ParameterBindingException

   + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Office.Server.Us

   erProfiles.PowerShell.SPCmdletNewProfileServiceApplication

 

C:\Users\SPPSEM~1\AppData\Local\Temp\AutoSPInstaller-ScriptBlock.ps1 : - Faile

d to create User Profile Service Application

At line:1 char:69

+ C:\Users\SPPSEM~1\AppData\Local\Temp\AutoSPInstaller-ScriptBlock.ps1 <<<<

   + CategoryInfo         : NotSpecified: (:) [Write-Error], WriteErrorExcep

   tion

   + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio

   n,AutoSPInstaller-ScriptBlock.ps1

Dec 12, 2012 at 9:19 PM

Hi Guys,

 

Help guys l am still having this issue trying to create User Profile Service Application.

 

Macdee

Dec 17, 2012 at 11:06 PM

Hi Guys,

Still getting the same error when creating User Profile Service Application:

Below is the contents in AutoSpInstaller-ScriptBlock.ps1 in %temp%

Write-Host -ForegroundColor White "Creating User Profile Service Application as EMP\SPPSEMPFRM01..."
Add-PsSnapin Microsoft.SharePoint.PowerShell
$newProfileServiceApp = New-SPProfileServiceApplication -Name "User Profile Service Application" -ApplicationPool "SharePoint Hosted Services" -ProfileDBServer EMPDCSERVER\EMPSPP,14331 -ProfileDBName EMP_ProfileDB_01 -ProfileSyncDBServer EMPDCSERVER\EMPSPP,14331 -ProfileSyncDBName EMP_SyncDB_01 -SocialDBServer EMPDCSERVER\EMPSPP,14331 -SocialDBName EMP_SocialDB_01 -MySiteHostLocation "http://mysites.intranet.group:80"
If (-not $?) {Write-Error " - Failed to create User Profile Service Application"; Write-Host "Press any key to exit..."; $null = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")}
$profileDBId = Get-SPDatabase | ? {$_.Name -eq "EMP_ProfileDB_01"}
Add-SPShellAdmin -UserName "EMP\SPPSEMPINST01" -database $profileDBId
$socialDBId = Get-SPDatabase | ? {$_.Name -eq "EMP_SocialDB_01"}
Add-SPShellAdmin -UserName "EMP\SPPSEMPINST01" -database $socialDBId

Dec 18, 2012 at 12:20 AM

I strongly suggest that you use SQL aliases in general and more specifically with User Profile Service App.

Dec 18, 2012 at 10:41 AM

The organisation that l work for do not allow that there is a DBA team who creates the sql instances.

Dec 20, 2012 at 5:16 AM

I managed to provision the service application manually in central admin.

Dec 21, 2012 at 3:10 PM

a SQL Alias is created on your WFE or Apps server, the dba won't see how you connect to the database. I also suggest you use alias for db connections. Looking at the error message it complains that dbserver value is not a string - if you put your value  in quotation marks it should run: "EMPDCSERVER\EMPSPP,14331"

larbre

Dec 21, 2012 at 9:48 PM

Thanks so much the quotation marks did the trick.

 

Macdd

Jan 2, 2014 at 8:28 AM
larbre wrote:
a SQL Alias is created on your WFE or Apps server, the dba won't see how you connect to the database. I also suggest you use alias for db connections. Looking at the error message it complains that dbserver value is not a string - if you put your value  in quotation marks it should run: "EMPDCSERVER\EMPSPP,14331" larbre
As you mentioned that if we put the vaue in quot, do you wanna say when we enter the value SPAuto installer GUI? or in xml file if it is xml file the value is already in quot..
Can you please more clear for me.

Regards,
Aasif