brianlala / autospinstaller Goto Github PK
View Code? Open in Web Editor NEWAutomated SharePoint 2010/2013/2016/2019/SE PowerShell-based installation script.
Home Page: https://autospinstaller.com
License: MIT License
Automated SharePoint 2010/2013/2016/2019/SE PowerShell-based installation script.
Home Page: https://autospinstaller.com
License: MIT License
Is there a reason to use CU5 for AppFabric exclusively for SP2013?
It works way better performance wise with CU7 + backgroundGC patch (http://www.jeremytaylor.net/2015/09/17/how-to-patch-sharepoint-distributed-cache-the-proper-way/)
Prerequisites error window saying...
Setup Errors
Setup is unable to proceed due to the following error(s):
Windows Server Feature or Role Services required by this product are not enabled. For a complete list, refer to the link below.
https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server-2010/cc262485(v=office.14)
Correct the issue(s) listed above and re-run setup.
Closing the window brings up install logs. Relevant log lines are...
Catalyst ASP.NET web extension enable check passed
PowerShell check passed.
NET Framework Chart check passed.
Error: Catalyst intermediate PreReqCheck has failed Type: 66::PreReqCheckFailure.
Error: Catalyst intermediate PreReqCheck has failed Type: 66::PreReqCheckFailure.
Catalyst execution finished: 07/06/2019 13:16:09. Return code: 30066. Exception caught: PreReqCheckFailure.
PERF: TickCount=445562 Name=RunSetup Description=End function
Setup temp folder set to [C:\Users\SPInstall\AppData\Local\Temp\Setup00000da0].
Fix...
Remove SP install directory from local disk
Modify registry...
Change permissions by giving ownership to the administrators group and giving it full before modifying key "Version" to 4.5.50501 for these keys...
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Full
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Client
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client
Source:http://answers.flyppdevportal.com/MVC/Post/Thread/bbed58e1-4a80-4dde-91fd-c6fc95bf85ac?category=sharepointadmin
Reboot server
Copy SP install directory back to local disk
Config is for SharePoint 2016 using Windows Server 2016, SQL Server 2016 - Single-server Farm
New-SPMetadataServiceApplicationProxy : The topology service is not available in the farm.
At C:\Temp\SPAutoInstaller\AutoSPInstaller\AutoSPInstallerFunctions.ps1:2515 char:44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Creating Web App "Portal"
New-SPWebApplication : The directory C:\inetpub\wwwroot\wss\VirtualDirectories\Portal-443 is already being used by
another IIS Web Site. Choose a different root directory for your new Web application.
At C:\InstallScripts\SP\Automation\AutoSPInstallerModule.psm1:2886 char:9
New-SPWebApplication -Name $webAppName -ApplicationPool $appP ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidData: (Microsoft.Share...PWebApplication:SPCmdletNewSPWebApplication) [New-SPWebA
pplication], ArgumentException- FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPWebApplication
Line 2882 - AutoSPInstallerModule.psm1:
$getSPWebApplication = Get-SPWebApplication -Identity $fullUrl -ErrorAction SilentlyContinue
Should be:
$getSPWebApplication = Get-SPWebApplication -Identity $webAppName -ErrorAction SilentlyContinue
This way it will pick up the web application using the name instead of url, which for host named site collections is created using the machine name.
While in the initial step of validating all accounts used in my config XML, both of the object cache accounts (SuperUser and SuperReader) show "Invalid!" and the script halts. I've verified that the accounts exist, and are domain accounts.
I've tried adding them as managed accounts - which yields interesting results in that they're shown twice in validation, and show "Verified" for the managed account but "Invalid" for the object cache account.
Hello,
With "AddToLocalAdminsDuringSetup" and "LeaveInLocalAdmins" set to "false", farm account is added to farm administrators when provisionning some SA, like UserProfile or DistributedCache :
If (($xmlinput.Configuration.Farm.Account.AddToLocalAdminsDuringSetup -eq $true) -or (ShouldIProvision $xmlinput.Configuration.ServiceApps.UserProfileServiceApp -eq $true) -or (ShouldIProvision $xmlinput.Configuration.Farm.Services.DistributedCache -eq $true)) { ....
But in this case, it isn't removed of this group :
If (!($runningAsFarmAcct) -and ($xmlinput.Configuration.Farm.Account.AddToLocalAdminsDuringSetup -eq $true) -and ($xmlinput.Configuration.Farm.Account.LeaveInLocalAdmins -eq $false)) { ....
A workaround to this bug is to set "AddToLocalAdminsDuringSetup" to "true" (even if not wanted) and "LeaveInLocalAdmins" to "false"
I am using Windows Server 2016 and AutoSPInstaller 3.99.60 and have configured it for offline installation of .Net Framework 3.5. If the installation fails, AutoSPInstaller does not detect the failure and continues. For example:
--------------------------------------------------------------
--------------------------------------------------------------
- Installing Prerequisite Software:
- .Net Framework 3.5.1 from "C:\Install\2016\SharePoint\PrerequisiteInstallerFiles\sxs"...
Deployment Image Servicing and Management tool
Version: 10.0.14393.0
Image Version: 10.0.14393.0
Enabling feature(s)
[==========================100.0%==========================]
Error: 0x800f081f
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
Done.
- Running Prerequisite Installer (offline mode)......................
Would it be correct for AutoSPInstaller to stop on failure?
When installing SP2019 single server the script is failing when creating site collection. This does not occur with SP2016.
Creating Site Collection "http://"
Script halted!
Exception
Microsoft. SharePoint. SPException: Provisioning did not succeed. Details: The site template was
not provisioned successfully. Delete this site collection in Central Administration, and then
create a new site collection. OriginalException: Provisioning did not succeed. Details: Failed
to create the 'Cache Profiles' list. OriginalException: Invalid field name.
{d8f18167-7cff-4c4e-bdbe-e7bØfØ1678f3} /Cache Profiles
Not a show stopper but here is how its behaving and if some one can provide better work around that will be great.
Script will try to add managed accounts after provisioning CA and before creating any web applications and in case you don't have interactive logon enabled for those accounts it will fail to create local profiles. In my case accounts were not allowed interactive logon and were member of DenyInteractivelogon security policy.
- Adding Managed Accounts...
- Account "Domain\ServiceAccount:
- Creating local profile for Domain\ServiceAccount...
PS>TerminatingError(Start-Process): "This command cannot be run due to the error: Logon failure: the user has not been granted the requested logon type at this computer."
Start-Process : This command cannot be run due to the error: Logon failure: the user has not been granted the
requested logon type at this computer.
At C:\Automation\SP\Automation\AutoSPInstallerModule.psm1:2259 char:17
+ Start-Process -WorkingDirectory "$env:SYSTEMROOT\System32\" -Fil ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
.
WARNING: Could not create local user profile for Domain\ServiceAccount
- Done Adding Managed Accounts.
So after failed attempt to add first account in to the managed account script will not try to add rest of the accounts and continues to create web applications and failed as it cant find the app pool account because it was not was not read in the step mentioned above ( adding managed account )
you will see some thing like that
Exception : Microsoft.SharePoint.PowerShell.SPCmdletException: ApplicationPoolAccount is not found.
at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord
errorRecord)
TargetObject : Microsoft.SharePoint.PowerShell.SPCmdletNewSPWebApplication
CategoryInfo : InvalidArgument: (Microsoft.Share...PWebApplication:SPCmdletNewSPWebApplication)
[New-SPWebApplication], SPCmdletException
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPWebApplication
To avoid this I had to comment out the creation of local profile and it successfully added all the managed accounts and then was able to create web application with out any issues.
line #2259
Start-Process -WorkingDirectory "$env:SYSTEMROOT\System32\" -FilePath "cmd.exe" -ArgumentList "/C" -LoadUserProfile -NoNewWindow -Credential $credAccount
we cant have interactive log on for any accounts other then admin and farm which will go away soon as well. Any suggestions or better solution will help others in the same situation ?
Hi,
the script stalls at:
New-SPManagedAccount -Credential $credAccount | Out-N ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Exception : System.Management.Automation.RuntimeException: - Failed to create manag
ed account
TargetObject : - Failed to create managed account
CategoryInfo : OperationStopped: ( - Failed to create managed account:String) [], Runti
meException
FullyQualifiedErrorId : - Failed to create managed account
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at AddManagedAccounts, C:\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:
line 2237
at Setup-Farm, C:\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 212
at , C:\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 427
at , : line 1
PipelineIterationInfo : {}
PSMessageDetails :
any ideas?
regards Theis
Starting at line 679, we have the following:
<AdobePDF>
<!-- The iFilter element supports a comma- or space-delimited list of server names on which to install the PDF iFilter. Useful if you want to selectively install ONLY on crawl servers, for example. -->
<iFilter Install="false" />
<!-- Both the Icon and MIMEType elements support only "true" or "false"; you probably would want the icon on all farm servers, and MIMEType is a web app-wide setting anyhow, not bound to specific servers -->
<Icon Configure="true" />
<MIMEType Configure="true"/>
</AdobePDF>
Since I'm installing on 2016 (where the ifilter is not required), I set everything to disabled, but I suggest adding a comment about that, so others are aware that you only need to setup this for 2013.
Cheers!
Installing SP 2016 with Language Pack with AutoSPInstaller runs currently into a Reboot-Loop.
This is cause by a Script-Block within AutoSPInstallerMain.sp1 that checks for SPVersion and LanguagePacksInstalled:
if (($env:SPver -eq "16") -and ($languagePackInstalled))
Because the Re-Launch is not registered somewhere, the script will Re-Launch at this step over and over again.
I get error, seems there is hardcoded in powershell account named Portal that is not found. Same issue found on mainsite discussion http://disq.us/p/1moabci
"Portal" managed account not found! Check your XML.
At C:\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:3118 char:68
"Portal
" managed account not found! Check you ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We noticed that the installer still changes the files needed for PDF icon, and mimetype. Needed in SP2010, but for SP2013 and SP2016 that is not required. We are correcting this in our onprem scripts. Based on that we will create a proposal here to change the input file and the installer scripts to a new "per default".
We will also propose to add icons for music/MP3, video/MP4, avi,, Even in SP2016, these are "unknown" with icons ? Online is OK with modernUI but classic goes to blanc/default icons.
And, as a bonus, for PowerBI, we will set the icons PBIX, PBIT and the mimetypes in SP, and IIS). We will ask your help in due time ;-) to enable opening powerBI files direct from a library as it involves setting a proper undocumented protocol in docicons.xml.
#add to whitlist, keep handler as strict<Add filetypes mp3, mp4, avi, pbix, pbit for all versions>
- Creating web applications...
- Web app "Demo Portal Home" already provisioned.
- Setting up managed paths for "http://innkdi291dev:2812"
- Setting up explicit managed path "help" at "http://innkdi291dev:2812" and HNSCs...
- Done setting up managed paths at "http://innkdi291dev:2812"
- Granting i:0#.w|SOS\devadmin Full Control to http://innkdi291dev.kd.sos:2812/...
--------------------------------------------------------------
- Applying object cache accounts to "http://innkdi291dev:2812"...
- Granting i:0#.w|SOS\sSP16dev-CacheSU Full Control to http://innkdi291dev.kd.sos:2812/...
- Granting i:0#.w|SOS\sSP16dev-CacheSR Full Read to http://innkdi291dev.kd.sos:2812/...
- Done applying object cache accounts to "http://innkdi291dev:2812"
- Checking for Site Collection "http://innkdi291dev:2812"...
- Creating new content database "VCPSP2016Dev_291dev_PortalHomeSite"...
Get-SPWebApplication : Cannot find an SPWebApplication object with Name, Id, or Url: http://innkdi291dev.
The web application is http://innkdi291dev:2812, the port is not used for Get-SPWebapplication and tries to fetch http://innkdi291dev and errors out.
fix @ AutoSPInstallerFunctions.ps1
Replace:
New-SPContentDatabase -Name $siteDatabase -WebApplication (Get-SPWebApplication $webApp.url) | Out-Null
with:
New-SPContentDatabase -Name $siteDatabase -WebApplication (Get-SPWebApplication $webAppName) | Out-Null
at line 2906
Preinstaller gets error when trying to install IIS Last return code (0X3E8=1000), this can be fixed by copy pasting 2012r2 sxs folder to prereq folder and running iis install manually https://blog.tallan.com/2016/06/07/autospinstaller-error-the-tool-was-unable-to-install-application-server-role-web-server-iis-role/ . After this installer goes fine until prereqs have been installed and there is reboot pending, sharepoint installer will not start if reboot pending. After rebooting server and starting the installation again it will then start sharepoint install but ignores .xml set parameters and starts manual install, installer will hit error.
Tested this with Windows 2016 and Sharepoint 2016 standard.
WS2019 - Sharepoint 2013 Standard
Script is unable to pass the error, tried a few restarts, does not change anything
WARNING: 2019-12-18 11:57:17 - Error when enabling ASP.NET v4.0.30319
WARNING: 2019-12-18 11:57:17 - Error: The tool was unable to install Application Server Role, Web Server (IIS) Role.
WARNING: 2019-12-18 11:57:17 - Last return code (1)
Full log:
AutoSPInstaller-2019-12-18_11-31.log
Just in case anyone else is unfortunate enough to still need AutoSPInstaller and AutoSPSourceBuilder to work with SharePoint 2010 (I know that SharePoint 2010 is long unsupported, but your site still says AutoSPInstaller works with SharePoint 2010. I was using the latest version – checked in on the 1st Aug 2018.
When I attempted to install SharePoint 2010 on Windows 2008 R2, there was a type error related to secure string. (The syntax used works in Powershell 3, but SharePoint 2010 Management Shell requires Powershell 2)
Exception : System.Management.Automation.RuntimeException: Unable to find type [SecureString]: make sure that the assembly
containing this type is loaded.
It seems to relate to the argument to the $secPhrase argument to ‘CreateOfJoinFarm’ (line 1739 on AutoSPInstallerModule.psm1). I changed from
Function CreateOrJoinFarm ([xml]$xmlInput, [SecureString]$secPhrase, [System.Management.Automation.PsCredential]$farmCredential)
To
Function CreateOrJoinFarm ([xml]$xmlInput, [Security.SecureString]$secPhrase, [System.Management.Automation.PsCredential]$farmCredential)
and it worked fine.
Using v3.99.60 on Windows Server 2016 attempting to install SP2016.
Any help is appreciated. Used AutpSPInstaller back on 2010 and loved it.
I've recently setup SharePoint 2019 with limited database privilege (dbcreator
, securityadmin
) for setup account. During User Profile Service provision, I encountered the following error messages.
- Granting {WebAppPool Account} rights to {User Profile Database}... Add-SPShellAdmin : "Cannot add {WebAppPool Account} to the SharePoint_Shell_Access role of the database {User Profile Database}. 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 X:\SP\Automation\AutoSPInstallerModule.psm1:3371 char:78 + ... rofileDB} | Add-SPShellAdmin -UserName $($portalAppPoolAcct.username) ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:SPCmdletAddSPShellAdmin) [Add-SPShellAdmin], ArgumentException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin - Granting {WebAppPool Account} rights to {User Profile Database}_Social... Add-SPShellAdmin : "Cannot add {WebAppPool Account} to the SharePoint_Shell_Access role of the database {User Profile Database}_Social. 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 X:\SP\Automation\AutoSPInstallerModule.psm1:3373 char:77 + ... socialDB} | Add-SPShellAdmin -UserName $($portalAppPoolAcct.username) ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:SPCmdletAddSPShellAdmin) [Add-SPShellAdmin], ArgumentException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
There is one suggestion from Wouter Bleeker suggesting that the setup account should be granted to sysadmin
which is impossible for my situation. I resolved this problem by running that two commands (Line 3371 and 3373) within elevated Farm account privilege which the AutoSPInstaller had already used this technique during creating User Profile Service application (the CreateUpsAsAdmin
function).
Hope that this will be integrated to the master branch.
Someone at Microsoft just thought it was a good idea to translate the English roles in French in the FR version of Sharepoint.
So, you need to modify in AutoSPInstallerModule.psm1
Line 3402 3403 3404 3409 3415 etc "Full rights" to "Contrôle total" (yes, with ô)
Maybe the same one embedded a special char instead of space (twice) in the name of the Sharepoint 2013 Management Shell.lnk, namely: Microsoft SharePoint $spYear Products\SharePoint $spYear Management Shell.lnk
And in autoInstallerModule.psm1, line 2618, one more translation
"Full Access to Term Store" => "Magasin de termes avec accès total" (which means nothing in French BTW)
Additionally, Creating site Collection "http://portal" is failing everytime with accessdenied error. I have to create it by hand to go on.
regards
When the script goes through the steps on a remote system, it starts failing with the following error:
New-PSSession : [TEST-WORKFLOW] Connecting to remote server TEST-WORKFLOW failed with the following error message : The
WinRM client cannot process the request. A computer policy does not allow the delegation of the user credentials to the
target computer because the computer is not trusted. The identity of the target computer can be verified if you
configure the WSMAN service to use a valid certificate using the following command: winrm set winrm/config/service
'@{CertificateThumbprint=""}' Or you can check the Event Viewer for an event that specifies that the
following SPN could not be created: WSMAN/. If you find this event, you can manually create the SPN using
setspn.exe . If the SPN exists, but CredSSP cannot use Kerberos to validate the identity of the target computer and
you still want to allow the delegation of the user credentials to the target computer, use gpedit.msc and look at the
following policy: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Fresh
Credentials with NTLM-only Server Authentication. Verify that it is enabled and configured with an SPN appropriate for
the target computer. For example, for a target computer name "myserver.domain.com", the SPN can be one of the
following: WSMAN/myserver.domain.com or WSMAN/*.domain.com. Try the request again after these changes. For more
information, see the about_Remote_Troubleshooting Help topic.
At \staging\sp\Automation\AutoSPInstallerModule.psm1:6724 char:20
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is installing SharePoint 2016 on Windows 2016 servers. I'm attaching the log file for the remote system for assistance in resolving this issue. Maybe there are others that have also experienced this or can provide some input on items to test. I know I can run the items manually using PsExec, however unsure on why these are failing on all remote systems.
AutoSPInstaller-TEST-WORKFLOW-2018-12-28_8-16.log
I build couple SharePoint 2019 environments on windows server 2016 and notice one thing is common in all of them. Each environment is complaining about CRL.
Event viewer : A certificate validation operation took 15003.0019 milliseconds and has exceeded the execution ...........
The out put shows it was disabled :
- Disabling Certificate Revocation List (CRL) check...
- Registry...
- Machine.config files...
- v2.0.50727...
OK.
- v4.0.30319...
OK.
- Done.
Any one else seeing this same issue ?
Thanks.
Exception was:
- Activating Search Topology...
PS>TerminatingError(ForEach-Object): "Exception calling "Activate" with "0" argument(s): "Topology activation failed. No system manager locations set, search application might not be ready yet. (at at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.GetSystemClient(IList`1 systemManagerLocations)
Long story short after a investigation revealed the following ULS log error:
NodeRunnerAdmin ... Unexpected ... ComponentManager(Storage) : Storage: Microsoft.Ceres.CoreServices.Storage.StorageComponent[Configuring] Component failure: Failed to configure component Microsoft.Ceres.CoreServices.Services.Configuration.ComponentConfigurationException: Access to the path '/root' is denied. ---> System.UnauthorizedAccessException: Access to the path '/root' is denied.
Manuallay creating a folder in C:\root and assigning full control to the search service account and then restarting the autospinstaller script fixed it. Go figure hey.
I download the script yesterday and was having issues with the script if it was outputting an error (i didn't enter a PIDKey) or warning (for access services as only using a standard key). I did a quick find and replace for $inputFile and changed it to $script:inputFile in AutoSPInstallerModule.psm1 and all was working fine.
Here is the error Output.
Exception : System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to
parameter 'Path' because it is null.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
TargetObject :
CategoryInfo : InvalidData: (:) [Split-Path], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.SplitPathCommand
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at CreateAccess2010ServiceApp, C:\SP\Automation\AutoSPInstallerModule.psm1: line 5913
at Set-ServiceConfig, C:\SP\Automation\AutoSPInstallerMain.ps1: line 251
at , C:\SP\Automation\AutoSPInstallerMain.ps1: line 430
at , : line 1
PipelineIterationInfo : {}
PSMessageDetails :
App Fabric won't install on Server 2016 with SharePoint 2016:
Done.
TerminatingError(): " - Review the log file and try to correct any error conditions."
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.
Exception : System.UnauthorizedAccessException: 0x80070005A
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 :
Clean run fails to copy the config file to the local directory so never creates the XML files needed to start the binary installation
LINE 276 should use $env:TEMP and not $env:dp0
LINE 279 should use $env:TEMP and not $env:dp0
I am facing issue with installing SharePoint 2016 on a single server farm. I created configuration XML and trying to install, but its prompting for Key. The key is already specified in the config file. Am I doing anything wrong?
SP 2016, lastest updates: Says Secure Store service is "Online". But Creating Secure Store Service Application hangs for hours before erring out with a "New-SecureStoreService Application : The timer job did not complete running within the allotted time."
I had failure when creating central admin it would create databases just fine and accesses but then complain that it could not connect and error creating farm configuration database. Weird thing was that script worked fine in my development but time for production it kept failing.
Added sleep timer after New-SPConfigurationDatabase line 1803 Start-Sleep 10 after that deployment worked fine. There was already existing timer before that line but not after.
For several customers on different environments, we have the problem that the initial installation of SharePoint 2019 does not activate the Search Service Application. We install SharePoint 2019 with AutoSPInstaller and use a separate service account for the Search Service Application. Here is the error:
Exception : System.Management.Automation.MethodInvocationException: Exception calling "Activate" with "0"
argument(s): "Topology activation job died prematurely, the topology already is in Activating
state." --->
Microsoft.Office.Server.Search.Administration.Topology.SearchTopologyActivationException:
Topology activation job died prematurely, the topology already is in Activating state.
at Microsoft.Office.Server.Search.Administration.Topology.SearchTopology.ActivateSilently()
at CallSite.Target(Closure , CallSite , Object )
The problem can only be solved if the Search Service Application is created under the Farm account.
Are you aware of this problem and is there a solution that activates the Search Service Application under the Search Service Account?
Received this error "new-spwebapplication cannot bind argument be parameter applicationpool because it is null" after creating the my sites. Digged deeper, found out that the variable $mysiteAppPool on line 3298 is not initialized and is used in some scenario. I installed the web sites to non standard ports, not sure whether that caused the issue or not.
Anyway, I manually initialized the variable $mysiteAppPool to the applicationpool in order for the script to continue.
C:\SP\Automation\AutoSPInstallerConfigureRemoteTarget.ps1 : The term
'C:\SP\Automation\AutoSPInstallerConfigureRemoteTarget.ps1' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ CategoryInfo : ObjectNotFound: (C:\SP\Automatio...emoteTarget.ps1:String) [], Comm
andNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
powershell.exe exited on TESTWFE with error code 1.
Hello,
I've SSL Offloading subject has already been discussed previously here, but I am contronted with the same situation, and I think this additional information may be interesting to discuss.
As mongey said in previous thread, usually with SSL offloading, the SharePoint Web Application is fully configured as HTTP, and the Load Balancer change the URL to HTTPS.
But in this case, links in SharePoint content will be HTTP, not HTTPS. And if some reverse proxies can replace HTTP links to HTTP, many load balancers can't (Radware Alton, I think, for example).
We can still configure systematic HTTP to HTTPS redirection on LB, but technically, that's not a panacea, just a workaround with much useless redirection traffic.
As far as I know, the only "clean" solution to avoid this problem is to have this in SharePoint AAM :
Even if it may seem weird, it works : SharePoint redirects user to HTTPS at first connection to HTTP, and all links in content will be HTTPS.
Unluckily, this case isn't managed by AutoSPInstaller today (with 3.99.60)
The only workaround I've found is to create webapp on HTTP 80, and then make this change in AAM in GUI.
And even in this case, I wasn't able to use AutoSPInstaller later to re-create UserProfile, because it has crashed trying to re-create MySite Host site collection, .
I've made the customization to avoid that problem (in attachment).
A last word : many many thanks for this wonderful tool and the time it has made me save !! :)
Hey
I am having an issue with the installation of Sharepoint 2016 on Windows server 2016.
It Seems powershell randomly will lose the connection to Sharepoint, so the sharepoint Cmdlets dont return anything, not even an error.
PS C:\Windows\system32> Get-SPWebApplication PS C:\Windows\system32> Get-SPWebApplication -Verbose VERBOSE: Leaving BeginProcessing Method of Get-SPWebApplication. VERBOSE: Leaving ProcessRecord Method of Get-SPWebApplication. VERBOSE: Leaving EndProcessing Method of Get-SPWebApplication. PS C:\Windows\system32>
I can then launche a new Sharepoint powershell window, and do the same, and get the expected result.
removing and adding the pssnapin dont help.
is:
$spVer = Get-MajorVersionNumber $spYear
should be:
$spYear = $xmlInput.Configuration.Install.SPVersion
$spVer = Get-MajorVersionNumber $spYear
I got this error, to fix this error do not have spaces in App Site Subscription name, so name it AppSiteSubscription.
Error:
Set-SPAppSiteSubscriptionName : "App Site Subscription" contains invalid character ' '.
At C:\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:6013 char:9
Set-SPAppSiteSubscriptionName -Name $serviceConfig.AppSiteSub ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SharePoint 2013 Foundation is not being detected as installed.
In the Function CheckConfigFiles([xml]$xmlinput please update
if ($pidKeyProjectServer -notlike "?????-?????-?????-?????-?????")
to
if ($pidKey -notlike "?????-?????-?????-?????-?????" -and $xmlinput.Configuration.Install.SKU -ne "Foundation" )
Also in the Function Get-SharePointInstall
if ((Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*) | Where-Object {$_.DisplayName -like "Microsoft SharePoint Server*"})
to
if ((Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*) | Where-Object {$_.DisplayName -like "Microsoft SharePoint Server*" -or $_.DisplayName -like "Microsoft SharePoint Foundation*"})
Hey Brian,
Just to let everybody know, I am in the process to convert this into a module.
I made a new brance Module.
Done so far:
Missing:
The prerequisitesinstaller always fails at installing the webserver role.
I found out that it want's to install xps-viewer feature. In Windows 2019 this is a removed feature. We would need to provide the Microsoft-Windows-Xps-Xps-Viewer-Opt-Package31bf3856ad364e35amd64~~.cab File, but it's not on the Windows 2019 installation media.
It should be in the FOD (Feature on demand) ISO, but I can't find the cab file there eighter.
This also happens if I run the prerequisitesinstaller manually.
How did you solve this problem to make AutoSPInstaller work correctly?
If your config XML contains invalid XML (in my case, my passwords had unescaped ampersands, but I was able to reproduce with other XML errors), you receive an error SharePoint version (year) was not specified in...
, instead of a more helpful message like "Unable to parse the XML".
Hello,
When i use AutoSpInstaller to install SharePoint 2016 i have this ISSUE.
i use : Windows serveur 2019 and Powerhsell 5.1.17763.592
im executing script as administrateur.
i dowland last version of AutoSpInstaller.
Need help please.
- Registering managed account `test\s-SPservices...`
New-SPManagedAccount : Account test\s-SPservices has already been registered.
At E:\SP\Automation\AutoSPInstallerModule.psm1:2296 char:17
+ New-SPManagedAccount -Credential $credAccount | Out-N ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Share...wManagedAccount:SPCmdletNewManagedAccount) [New-SPManage
dAccount], InvalidOperationException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewManagedAccount
--------------------------------------------------------------
- Script halted!
Exception : System.Management.Automation.RuntimeException: - Failed to create managed account
TargetObject : - Failed to create managed account
CategoryInfo : OperationStopped: ( - Failed to create managed account:String) [], RuntimeException
FullyQualifiedErrorId : - Failed to create managed account
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at AddManagedAccounts, E:\SP\Automation\AutoSPInstallerModule.psm1: line 2297
at Set-FarmConfig, E:\SP\Automation\AutoSPInstallerMain.ps1: line 223
at <ScriptBlock>, E:\SP\Automation\AutoSPInstallerMain.ps1: line 438
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
Can someone assist?
Exception : System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on
parameter 'DatabaseServer'. The argument is null or empty. Provide an argument that is not
null or empty, and then try the command again. --->
System.Management.Automation.ValidationMetadataException: The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
at System.Management.Automation.ValidateNotNullOrEmptyAttribute.Validate(Object arguments,
EngineIntrinsics engineIntrinsics)
at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal
parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
TargetObject :
CategoryInfo : InvalidData: (:) [Connect-SPConfigurationDatabase], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.SharePoint.PowerShell.SPCmdletConnectSPConfiguration
Database
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at CreateOrJoinFarm,
D:\Install\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1: line 1794
at Setup-Farm, D:\Install\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 205
at , D:\Install\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line
427
at , : line 1
PipelineIterationInfo : {}
PSMessageDetails :
Get the following when provisioning user profile service
~~~~~~~~~~~~~~
Have previously created mysite host web app and site collection earlier in the process using the appropriate managed path. followed instruction not to include mysite host in the user profile service provision section as it was created earlier in the process. Carry out the process by dragging the install xml onto AutoSPInstallerLaunch.
The script is working fine till it reaches the point to create a site collection inside the portal web application , with the following error :
Exception : System.UnauthorizedAccessException:
0x80070005Access denied.
at
Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
at Microsoft.SharePoint.Library.SPRequest.CreateSite(Guid gApplicationId, String bstrUrl,
Int32 lZone, Guid gSiteId, Guid gDatabaseId, Guid gSiteSubscriptionId, String
bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String
bstrDatabasePassword, String bstrTitle, String bstrDescription, UInt32 nLCID, String
bstrOwnerLogin, String bstrOwnerUserKey, String bstrOwnerName, String bstrOwnerEmail, String
bstrSecondaryContactLogin, String bstrSecondaryContactUserKey, String
bstrSecondaryContactName, String bstrSecondaryContactEmail, Boolean bADAccountMode, Boolean
bHostHeaderIsSiteName, Int32 iDatabaseVersionMajor, Int32 iDatabaseVersionMinor, Int32
iDatabaseVersionBuild, Int32 iDatabaseVersionRevision, Int32 iSprocsVersionMajor, Int32
iSprocsVersionMinor, Int32 iSprocsVersionBuild, Int32 iSprocsVersionRevision, String
bstrSiteSchemaVersion, Boolean bCreateFromMaster, String bstrDenyPermMaskGroupId)
at
Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParameters
param)
at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters
param)
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],
UnauthorizedAccessException
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at CreateWebApp, D:\install\SP\AutoSPInstaller\Automation\AutoSPInstallerModule.psm1: line 2997
at CreateWebApplications, D:\install\SP\AutoSPInstaller\Automation\AutoSPInstallerModule.psm1:
line 2763
at Set-FarmConfig, D:\install\SP\AutoSPInstaller\Automation\AutoSPInstallerMain.ps1: line 239
at , D:\install\SP\AutoSPInstaller\Automation\AutoSPInstallerMain.ps1: line 438
at , : line 1
PipelineIterationInfo : {}
PSMessageDetails :
A PIDKEY is not required for Foundation but the script expects it anyway. The PIDKEY should be skipped if Foundation is the SKU used for the input file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.