Error while trying to create User Profile Service Application

May 3, 2013 at 5:19 PM
Edited May 3, 2013 at 5:27 PM
I'm running the autospinstaller script on a new SP2013 farm, running on a new build of Server 2008 R2. I'm using the GUI to configure the XML, and I've been making necessary changes along the way. I've gotten to the point where its trying to configure the User Profile Service Application, but it's running into an error. Any help would be greatly appreciated! I get a pop-up window, and here's what it says:

Creating User Profile Service Application as xxxxxx\stgsp2013setup...
New-SPProfileServiceApplication : Cannot find an SPSite object with Id or Url:
http://servername:8080.
At
C:\Users\stgsp2013setup\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1:3
char:25
  • $newProfileServiceApp = New-SPProfileServiceApplication -Name "User Profile
    Serv ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
    • CategoryInfo : InvalidData: (Microsoft.Offic...viceApplication:
      SPCmdletNewProfileServiceApplication) [New-SPProfileServiceApplication], S
      PCmdletPipeBindException
    • FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.
      SPCmdletNewProfileServiceApplication
C:\Users\stgsp2013setup\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1 :
  • Failed to create User Profile Service Application
    At line:1 char:1
  • C:\Users\STGSP2~1\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep
      tion
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
      n,AutoSPInstaller-ScriptBlock.ps1
Press any key to exit...


EDIT: So I noticed that when I hit any key, a new blob of Red text would display, but the pop-up would close before I could read it. I snagged a screenshot of it. Here's a transcript:

Add-SPShellAdmin :
 "Cannot add xxxxx\stgsp2013setup to the SharePoint_Shell_Access role of the database WSS_Test_Farm.  A possible cause of this error is that the account name was already added to the database as a login using a different user name than the account name."
At
C:\Users\stgsp2013setup\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1:6char:1
  • Add-SPShellAdmin -UserName "xxxx\stgsp2013setup" -database $profileDBId
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    +CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:
    SPCmdletAddSPShellAdmin) [Add-SPShellAdmin], ArgumentException
    • FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
Jan 9, 2014 at 5:25 AM
Hi All,

We are also facing the same issue at our end.
Anyone had face the same issue or may have got the resolution please help us.

Regards,
Aasif
May 5, 2014 at 7:47 PM
Workaround:
  • Log into the farm as your SP_Farm account
  • (Assuming you're installing as SP_Admin) - Go to C:\Users\SP_Admin\AppData\Local\Temp folder and open the AutoSPInstaller-ScriptBlock.ps1 file
  • Copy the content
  • Open a new SharePoint Power Shell session (right click Run As Administrator)..
  • Paste and execute all the lines
  • Go Back to your SP_Admin session
  • Open Central Admin
  • Go to Manage Services on Server
  • Start the User Profile Syncronization Service (this will take like 10 min)
  • Return to the AutoSPInstaller Power Shell screen that was halted on the error
  • Click any key to continue.. it should work now
Regards,
Yvan
Nov 20, 2014 at 11:50 AM
Hi Yvanh,

Is there another solution for the Problem? The executing for the "C:\Users\SP_Admin\AppData\Local\Temp folder and open the AutoSPInstaller-ScriptBlock.ps1 file" dont work because it giving other Errors in Powershell. Thank you in advance

New-SPProfileServiceApplication : Cannot find an SPPrefix object with Name: people/sites.
At C:\Users\sp_admin\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1:3 char:25
  • $newProfileServiceApp = New-SPProfileServiceApplication -Name "User Profile Serv ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidData: (Microsoft.Offic...viceApplication:SPCmdletNewProfileServiceApplication) [New-SPProfileServiceApp
      lication], SPCmdletPipeBindException
    • FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.SPCmdletNewProfileServiceApplication
C:\Users\sp_admin\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1 : - Failed to create User Profile Service Application
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,AutoSPInstaller-ScriptBlock.ps1
Press any key to exit...
Exception calling "ReadKey" with "1" argument(s): "The method or operation is not implemented."
At C:\Users\sp_admin\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1:4 char:122
  • ... y to exit..."; $null = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")}
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : NotImplementedException
Add-SPShellAdmin :
 "Cannot add CONTOSO\sp_admin to the SharePoint_Shell_Access role of the database SP_Config. A possible cause of this error is that the 
account name was already added to the database as a login using a different user name than the account name."
At C:\Users\sp_admin\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1:6 char:1
  • Add-SPShellAdmin -UserName "CONTOSO\sp_admin" -database $profileDBId
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:SPCmdletAddSPShellAdmin) [Add-SPShellAdmin], ArgumentException
    • FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
Add-SPShellAdmin :
 "Cannot add CONTOSO\sp_admin to the SharePoint_Shell_Access role of the database SP_Config. A possible cause of this error is that the 
account name was already added to the database as a login using a different user name than the account name."
At C:\Users\sp_admin\AppData\Local\Temp\2\AutoSPInstaller-ScriptBlock.ps1:8 char:1
  • Add-SPShellAdmin -UserName "CONTOSO\sp_admin" -database $socialDBId
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:SPCmdletAddSPShellAdmin) [Add-SPShellAdmin], ArgumentException
    • FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin