I checked the XML file and it contains webapplication config
Exception : System.Management.Automation.RuntimeException: Method
invocation failed because [System.String] doesn't
contain a method named 'SelectSingleNode'.
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.EnterTry
CatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTry
CatchFinallyInstruction.Run(InterpretedFrame frame)
TargetObject :
CategoryInfo : InvalidOperation: (:) [], RuntimeException
FullyQualifiedErrorId : MethodNotFound
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at CreateWebApp, C:\Users\srvspsetup\Desktop\AutoInstal
ler\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:
line 2632
at CreateWebApplications, C:\Users\srvspsetup\Desktop\A
utoInstaller\SP\AutoSPInstaller\AutoSPInstallerFunction
s.ps1: line 2497
at Setup-Farm, C:\Users\srvspsetup\Desktop\AutoInstalle
r\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 204
at <ScriptBlock>, C:\Users\srvspsetup\Desktop\AutoInsta
ller\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line
397
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
Comments: ** Comment from web user: IvanJosipovic **
Exception : System.Management.Automation.RuntimeException: Method
invocation failed because [System.String] doesn't
contain a method named 'SelectSingleNode'.
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.EnterTry
CatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTry
CatchFinallyInstruction.Run(InterpretedFrame frame)
TargetObject :
CategoryInfo : InvalidOperation: (:) [], RuntimeException
FullyQualifiedErrorId : MethodNotFound
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at CreateWebApp, C:\Users\srvspsetup\Desktop\AutoInstal
ler\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:
line 2632
at CreateWebApplications, C:\Users\srvspsetup\Desktop\A
utoInstaller\SP\AutoSPInstaller\AutoSPInstallerFunction
s.ps1: line 2497
at Setup-Farm, C:\Users\srvspsetup\Desktop\AutoInstalle
r\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 204
at <ScriptBlock>, C:\Users\srvspsetup\Desktop\AutoInsta
ller\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line
397
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
Comments: ** Comment from web user: IvanJosipovic **
Hi Brian,
I just tested this with the latest build and it is not fixed.
the issue is line 2661:
Current: if ($webApp.SiteCollections.SelectSingleNode("SiteCollection"))
Fix: if ($webapp.SiteCollections -is [System.Xml.XmlElement] -and $webApp.SiteCollections.SelectSingleNode("SiteCollection"))
I also don't think this if statement is needed at all.
The previous logic works fine with no sitecollections.
ForEach ($siteCollection in $webApp.SiteCollections.SiteCollection)
{
site collection creation code.
}
Ivan