Open DJTaz1975 opened 6 years ago
Similar issue is happening with latest commit. On first run, it will report error. Close the windows and re-run and the second run will pass without issue.
TerminatingError(New-SPSite): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Invalid field name. {cbb92da4-fd46-4c7d-af6c-3128c2a5576e} http://dummyteamsite.dummysite.com " TerminatingError(New-SPSite): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Invalid field name. {cbb92da4-fd46-4c7d-af6c-3128c2a5576e} http://dummyteamsite.dummysite.com " TerminatingError(New-SPSite): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Invalid field name. {cbb92da4-fd46-4c7d-af6c-3128c2a5576e} http://dummyteamsite.dummysite.com "
Exception : Microsoft.SharePoint.SPException: Invalid field name. {cbb92da4-fd46-4c7d-af6c-3128c2a5576e} http://dummyteamsite.dummysite.com ---> System.Runtime.InteropServices.COMException:
I get this error too occasionally. Haven't dug in to see if it's really an issue with the script, with SharePoint, or with overall timing.
Just to confirm, I get error as well and it seemed random. However, I think I may be narrowing in on the issue. When I create site using PowerShell command the site creation fails. However, if I run SharePoint Configuration Wizard and then run the exact PowerShell command it works. My hunch is the SharePoint Wizard is updating or repairing something.
Similar issue is happening with latest commit. On first run, it will report error. Close the windows and re-run and the second run will pass without issue.
Same issue and same fix. As a workaround I first run AutoSPInstaller with no site collections defined in the config, then run it again with the site collections defined.
same here with SP2K19 - will try the workaround
Make sure that the IIS site SharePoint Web Services
is running.
I got the same UnauthorizedAccessException when installing SharePoint 2016. After a few script rounds and restarts of the machine I tried to create the site manually using New-SPSite
. But I got the same problem with the Admin/Setup account as well as other admin accounts as well.
I checked the accounts for permissions, but they had more than should be needed. Eventually I started comparing with a SP2019 server that installed successfully using a very similar config XML file and noticed that the IIS Site wasn't running (and apparently hadn't started even after a reboot), so after starting that I could create the site. I removed it and ran AutoSPInstaller again and this time it finally completed.
Maybe there could be a check before creating the site collection, so that all IIS sites and app pools are running correctly, at least the SharePoint Web Services site.
same problem with SharePoint Server 2019
Second run working... That is no timing --> I added a 120 second sleep before New-SPSite, same failure with ...Invalid field name...
Here is a Workaround: https://github.com/dsccommunity/SharePointDsc/pull/1342
One problem here is that if you manually delete the "Default Web Site" before launching AutoSPInstaller, AutoSPInstaller creates the "SharePoint Web Services" site with the ID "1".
Then later, when AutoSPInstaller searches for the "Default Web Site" and tries to stop it, it also looks for a site with the ID "1" and therefore stops the "SharePoint Web Services" site.
Hi all!
When running the script it halts at creating the sitecollection for the Portal Site. If I do it trough Central Admin it works as it should. (Same account) Just cant figure out why I get this exception below.
Creating Site Collection "http://portal.contoso.com"...
Exception : System.UnauthorizedAccessException:0x80070005 A
ccess denied.
at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessExcepti
on ex)
at Microsoft.SharePoint.Library.SPRequest.CreateSite(Guid gApplicationId, String bstrUrl, In
t32 lZone, Guid gSiteId, Guid gDatabaseId, Guid gSiteSubscriptionId, String bstrDatabaseServer,
String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, String bstr
Title, String bstrDescription, UInt32 nLCID, String bstrOwnerLogin, String bstrOwnerUserKey, St
ring bstrOwnerName, String bstrOwnerEmail, String bstrSecondaryContactLogin, String bstrSeconda
ryContactUserKey, String bstrSecondaryContactName, String bstrSecondaryContactEmail, Boolean bA
DAccountMode, Boolean bHostHeaderIsSiteName, Int32 iDatabaseVersionMajor, Int32 iDatabaseVersio
nMinor, Int32 iDatabaseVersionBuild, Int32 iDatabaseVersionRevision, Int32 iSprocsVersionMajor,
Int32 iSprocsVersionMinor, Int32 iSprocsVersionBuild, Int32 iSprocsVersionRevision, String bst
rSiteSchemaVersion, Boolean bCreateFromMaster, String bstrDenyPermMaskGroupId)
at Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParam
eters param)
at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters pa
ram)
at Microsoft.SharePoint.PowerShell.SPCmdletNewSite.CreateDataObject()
at Microsoft.SharePoint.PowerShell.SPNewCmdletBase`1.InternalProcessRecord()
at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()
TargetObject : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
CategoryInfo : InvalidData: (Microsoft.Share...SPCmdletNewSite:SPCmdletNewSite) [New-SPSite], UnauthorizedAcce
ssException
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at CreateWebApp, D:\Setup\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1: line
2909
at CreateWebApplications, D:\Setup\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.
ps1: line 2690
at Setup-Farm, D:\Setup\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 228
at , D:\Setup\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 427
at , : line 1
PipelineIterationInfo : {}
PSMessageDetails :