Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Register Managed Accounts
- $initialPass = ConvertTo-SecureString -AsPlainText "Pass@word1" -force
- $username = “contoso\sp2016_services”
- $cred = New-Object System.Management.Automation.PSCredential ($username, $initialPass)
- New-SPManagedAccount -Credential $cred
- $username = “contoso\sp2016_Content”
- $cred = New-Object System.Management.Automation.PSCredential ($username, $initialPass)
- New-SPManagedAccount -Credential $cred
- $username = “contoso\sp2016_UPSync”
- $cred = New-Object System.Management.Automation.PSCredential ($username, $initialPass)
- New-SPManagedAccount -Credential $cred
- #MySites WebApp
- $ap = Get-SPAuthenticationProvider -WebApplication http://intranet.contoso.com -Zone default
- New-SPServiceApplicationPool -Name MySites -Account contoso\sp2016_AppPool
- New-SPWebApplication -ApplicationPool MySites -Name MySites -Port 80 -HostHeader my.contoso.com -ApplicationPoolAccount contoso\sp2016_AppPool -AuthenticationProvider $ap
- New-SPSite -Url http://my.contoso.com -Template SPSMSITEHOST#0 -Name My_Site_Host -OwnerAlias contoso\sp2016_farm
- #Subscription Settings Service Application
- New-SPServiceApplicationPool -Name ServicesApplicationPool -Account contoso\sp2016_services
- $app = New-SPSubscriptionSettingsServiceApplication -ApplicationPool ServicesApplicationPool -Name "Microsoft SharePoint Foundation Subscription Settings Service Application" -DatabaseName SettingsServiceDB
- New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $App
- #Profile Service
- $app = New-SPProfileServiceApplication -ApplicationPool ServicesApplicationPool -Name "User Profile Service Application" -MySiteHostLocation http://my.contoso.com -SocialDBName Social_DB -ProfileDBName Profile_DB -ProfileSyncDBName Sync_DB
- New-SPProfileServiceApplicationProxy -Name "User Profile Service Application Proxy" -ServiceApplication $app -DefaultProxyGroup
- #app management
- $account = Get-SPManagedAccount contoso\sp2016_farm
- $appPool = Get-SPServiceApplicationPool -Identity ServicesApplicationPool
- $app = New-SPAppManagementServiceApplication -ApplicationPool $appPool -Name "App Management Service Application" -DatabaseName AppMgmt_DB
- New-SPAppManagementServiceApplicationProxy -ServiceApplication $app -name "App Management Service Application Proxy" -UseDefaultProxyGroup
- #managed metadata
- $account = Get-SPManagedAccount contoso\sp2016_services
- $appPool = Get-SPServiceApplicationPool -Identity ServicesApplicationPool
- $app = new-spmetadataserviceapplication -name "Managed Metadata Service Application" -applicationpool $apppool -Databasename MMS_DB
- $proxyApp = New-SPmetadataserviceapplicationProxy -ServiceApplication $app -name "Managed Metadata Service Application Proxy" -DefaultProxyGroup
- new-spuser -UserAlias "Contoso\SPUsers" -Web "Http://intranet.contoso.com" -PermissionLevel Contribute
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement