Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. #Register Managed Accounts
  2. $initialPass = ConvertTo-SecureString -AsPlainText "Pass@word1" -force
  3. $username = “contoso\sp2016_services”
  4. $cred = New-Object System.Management.Automation.PSCredential ($username, $initialPass)
  5. New-SPManagedAccount -Credential $cred
  6. $username = “contoso\sp2016_Content”
  7. $cred = New-Object System.Management.Automation.PSCredential ($username, $initialPass)
  8. New-SPManagedAccount -Credential $cred
  9. $username = “contoso\sp2016_UPSync”
  10. $cred = New-Object System.Management.Automation.PSCredential ($username, $initialPass)
  11. New-SPManagedAccount -Credential $cred
  12.  
  13. #MySites WebApp
  14. $ap = Get-SPAuthenticationProvider -WebApplication http://intranet.contoso.com -Zone default
  15. New-SPServiceApplicationPool -Name MySites -Account contoso\sp2016_AppPool
  16. New-SPWebApplication -ApplicationPool MySites -Name MySites -Port 80 -HostHeader my.contoso.com -ApplicationPoolAccount contoso\sp2016_AppPool -AuthenticationProvider $ap
  17. New-SPSite -Url http://my.contoso.com -Template SPSMSITEHOST#0 -Name My_Site_Host -OwnerAlias contoso\sp2016_farm
  18.  
  19. #Subscription Settings Service Application
  20. New-SPServiceApplicationPool -Name ServicesApplicationPool -Account contoso\sp2016_services
  21. $app = New-SPSubscriptionSettingsServiceApplication -ApplicationPool ServicesApplicationPool -Name "Microsoft SharePoint Foundation Subscription Settings Service Application" -DatabaseName SettingsServiceDB
  22. New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $App
  23.  
  24. #Profile Service
  25. $app = New-SPProfileServiceApplication -ApplicationPool ServicesApplicationPool -Name "User Profile Service Application" -MySiteHostLocation http://my.contoso.com -SocialDBName Social_DB -ProfileDBName Profile_DB -ProfileSyncDBName Sync_DB
  26. New-SPProfileServiceApplicationProxy -Name "User Profile Service Application Proxy" -ServiceApplication $app -DefaultProxyGroup
  27.  
  28. #app management
  29. $account = Get-SPManagedAccount contoso\sp2016_farm
  30. $appPool = Get-SPServiceApplicationPool -Identity ServicesApplicationPool
  31. $app = New-SPAppManagementServiceApplication -ApplicationPool $appPool -Name "App Management Service Application" -DatabaseName AppMgmt_DB
  32. New-SPAppManagementServiceApplicationProxy -ServiceApplication $app -name "App Management Service Application Proxy" -UseDefaultProxyGroup
  33.  
  34. #managed metadata
  35. $account = Get-SPManagedAccount contoso\sp2016_services
  36. $appPool = Get-SPServiceApplicationPool -Identity ServicesApplicationPool
  37. $app = new-spmetadataserviceapplication -name "Managed Metadata Service Application" -applicationpool $apppool -Databasename MMS_DB
  38. $proxyApp = New-SPmetadataserviceapplicationProxy -ServiceApplication $app -name "Managed Metadata Service Application Proxy" -DefaultProxyGroup
  39. new-spuser -UserAlias "Contoso\SPUsers" -Web "Http://intranet.contoso.com" -PermissionLevel Contribute
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement