The script ran fine until after three of the databases had been created a,t which point the script crashed with a user exception error. This simply turned out to be a missing password for the search application, however since then it's crashed with the following error and I've been unable to find a solution to it.
Please could someone help:
Here's the error:
System.IO.FileNotFoundException: Could not load file
or assembly 'Microsoft.IIS.PowerShell.Framework' or
one of its dependencies. The system cannot find the
file specified. File name: 'Microsoft.IIS.PowerShell.Framework'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName
fileName, String codeBase, Evidence assemblySecurity,
RuntimeAssembly locationHint, StackCrawlMark&stackMark,
IntPtr pPrivHostBinder, Boolean throwOnFileNotFound,
Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.LoadWithPartial
NameInternal(AssemblyName an, Evidence securityEvidence,
StackCrawlMark& stackMark) at
Microsoft.IIs.PowerShell.Framework.Interop.IAppHo
stElement.get_Properties()
at Microsoft.IIs.PowerShell.Framework.ConfigurationElement.get_Attributes()
at Microsoft.IIs.PowerShell.Framework.ConfigurationElement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Framework.ConfigurationElement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Framework.ConfigurationElement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Provider.GetWebsiteCommand.WriteSite(ConfigurationInfo o)
at Microsoft.IIs.PowerShell.Framework.Configuration.XPathQueryToStream(String query, PipelineStreamWriter
writer) at System.Management.Automation.CommandProcessor.ProcessRecord()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the
registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to
1. Note: There is some performance penalty associated
with assembly bind failure logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
targetObject :
CategoryInfo : NotSpecified: (:) [Get-Website], FileNotFoundException
fullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.IIs.PowerShel
l.Provider.GetWebsiteCommand
errorDetails :
vocationInfo : System.Management.Automation.InvocationInfo
riptStackTrace : at ConfigureFarm, C:\AutoSPInstaller\SP\AutoSPInstaller
\AutoSPInstallerFunctions.ps1: line 1480
at Setup-Farm, C:\AutoSPInstaller\SP\AutoSPInstaller\Au
toSPInstallerMain.ps1: line 185
at <ScriptBlock>, C:\AutoSPInstaller\SP\AutoSPInstaller
\AutoSPInstallerMain.ps1: line 358
at <ScriptBlock>, <No file>: line 1
Thanks
Comments: ** Comment from web user: DiaGeordie **
Found this suggestion by Anatoly Mironov and updated the AutoSPInstallerFunctions.ps1 file with the try/catch statement below and that seemed to resolve it:
#Region Stop Default Web Site
# Added to avoid conflicts with web apps that do not use a host header
# Thanks to Paul Stork per http://autospinstaller.codeplex.com/workitem/19318 for confirming the Stop-Website cmdlet
ImportWebAdministration
Try{
$defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.ID -eq 1 -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"} # Try different ways of identifying the Default Web Site, in case it has a different name (e.g. localized installs)
} Catch [System.IO.FileNotFoundException]{
$defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.ID -eq 1 -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"}
Break
}
It also appeared elsewhere as a solution under AutoSPInstaller, after I'd googled it, after going through all the issues listed for the app.
I've now got two site the Mysites and Portal both of which have failed to come up, both show unexpected errors.
Otherwise once all the "Bugs" (human and otherwise) are ironed out I'll be using it to build a production system, as it's quick, and provides a clear database build afterwards, making it easier to understand which is which.
Thanks