Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

Managed accounts sharepoint setup - Powershell

$
0
0

Hi

SharePoint server 2013 standard version.

When creating service applications like the metadata service app. or the search service app. 

Im logged onto the server as spadmin (sharepoint setup admin) with securityadmin and dbcreator, local admin.

Running my scripts to make i also use the spadmin to create all application pools. For example setting up Metadata service application:

# ===================================================================================
# 1 Create App Pool for Service Applications
# ===================================================================================


New-SPServiceApplicationPool -name $AppPoolName -Account "domain\spadmin"

# ===================================================================================
# 1.1  Create Metadata Service Application
# ===================================================================================
Write-Host -ForegroundColor Green "Creating Metadata Service Application.."

New-SPMetadataServiceApplication -Name $MDSname -DatabaseServer $DBServer -DatabaseName $DBname -ApplicationPool $AppPoolName | Out-Null

#Creating proxy connection
New-SPMetadataServiceApplicationProxy -Name $MDSProxyName -ServiceApplication $MDSname -DefaultProxyGroup 

#Starting it..
Get-SPServiceInstance | where-object {$_.TypeName -eq "Managed Metadata Web Service"} | Start-SPServiceInstance > $null

So question 1)

Where do i input managed account for this service? :-)

Next creating WebApplication:

# ===================================================================================
  # 1.1 Create Application Pool for $fellessitecollectionname
# ===================================================================================
Write-Host -ForegroundColor Green "Creating Application Pool for $fellessitecollectionname.."

New-SPServiceApplicationPool -name $fellesomradeappPool -Account "domain\spadmin" -verbose


# ===================================================================================
  # 1.2 Create Web Application $fellessitecollectionname
# ===================================================================================
Write-Host -ForegroundColor Green "Creating Web Application for $fellessitecollectionname.."


New-SPWebApplication -Name $fellesomradeSitename -URL $fellesurl -ApplicationPool $fellesomradeappPool -Port $fellesomradeport -ApplicationPoolAccount (Get-SPManagedAccount $WebAppAccount) -DatabaseName $fellesomradedbName -DatabaseServer $dbServer -AuthenticationProvider $ap

Question 2.

Here i also used the domain\spadmin to create the applicationpool. But when creating the WebApplication im wondering about the "-ApplicationPoolAccount", must this be the spadmin user also? or is this the managed user? ?

I have noticed that when i dont use the domain\spadmin account here (using a common domain user domain\spweb), the site tends not to work properly, for example i cant follow this site. And in mysite - sitefeed i will not be shown the webpart "following" on the right side of the page.

Im having issues understanding how to set managed accounts in powershell, so far ive only been using spadmin and spfarm (farm account). But that is not good practice, but everything works with these two..

I have read that the applicationpoolaccount is supposely just a domain account that is given all the rights when creating applicationpools,but must i run the script as farmaccount (spfarm) to give the domain account the rights it needs??Ive been logging into windows with my spadmin for everything. So i guess the scripts have been running as spadmin.

This became a long post:-)

Im just trying to figure out these crucial bottom building blocks.

br

Bjorn


Viewing all articles
Browse latest Browse all 21070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>