Portal Home

May 24, 2013 at 11:17 AM
Hi guys, I am getting stuck at a strange part of the script, it is at the area where the web application is being configured, it kicks out an error at the granting of rights area, but there is nothing outstanding in the config document.

The account I put into the config was verified at the beginning of the script run, so it definitely exists.

- Granting rights to "Portal Home"...-----------------------------------------

  • Script halted!
Exception : System.Management.Automation.MethodInvocationException:
                     Exception calling "GrantAccessToProcessIdentity" with
                    "1" argument(s): "String cannot be of zero length.
                    Parameter name: name" ---> System.ArgumentException:
                    String cannot be of zero length.
                    Parameter name: name
                       at System.Security.Principal.NTAccount..ctor(String
                    name)
                       at Microsoft.SharePoint.Administration.SPWebApplicat
                    ion.GrantAccessToProcessIdentity(String username,
                    SPPolicyRoleType policyRole)
                       at CallSite.Target(Closure , CallSite , Object ,
                    String )
                       --- End of inner exception stack trace ---
                       at System.Management.Automation.ExceptionHandlingOps
                    .CheckActionPreference(FunctionContext funcContext,
                    Exception exception)
                       at System.Management.Automation.Interpreter.ActionCa
                    llInstruction`2.Run(InterpretedFrame frame)
                       at System.Management.Automation.Interpreter.Interpre
                    ter.HandleException(InterpretedFrame frame, Exception
                    exception)
TargetObject :
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : ArgumentException
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at CreateWebApp,
                    C:\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:
                    line 2183
                    at CreateWebApplications,
                    C:\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:
                    line 2074
                    at Setup-Farm,
                    C:\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 190
                    at <ScriptBlock>,
                    C:\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 358
                    at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :


any ideas?
May 27, 2013 at 1:18 PM
for future reference: This issue came about while using the GUI to configure the input XML.

While setting up the managed accounts, be careful when removing any accounts that are standard to sharepoint and already existing within the GUI.

For instance:

If I remove the SP service account, the GUI will also remove the line that the primary script utilises to call that service account. If you add another service account, the GUI is not smart enough (at this point) to put that line back in, at which point the wheels fall off the wagon and you have to either start from scratch or add the line that matches your selected domain account to the "spservice" profile.
May 29, 2013 at 5:14 PM
Edited May 29, 2013 at 5:38 PM
Hi JGrobler,

I fixed the issue in the release I just posted. It will now prevent deletion of the "spservice" account. I had this in a previous release but forgot to migrate it over when I rewrote the app.

Thanks,
Ivan