powershell 为SharePoint 2013创建SharePoint服务帐户(最低)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 为SharePoint 2013创建SharePoint服务帐户(最低)相关的知识,希望对你有一定的参考价值。
# ----------------------------------------------
# Author: Romain Blanchard / Internet
# Date: 11.04.2014
# Description: Create SharePoint service account for SharePoint 2013 (minimum)
# To read: https://sp2013serviceaccount.codeplex.com/ or http://absolute-sharepoint.com/2013/01/sharepoint-2013-service-accounts-best-practices-explained.html
# ----------------------------------------------
# -- Initialize -- #
Import-Module ActiveDirectory
# -- Variables -- #
$option_rootlevel = "DC=DSIN,DC=COM"
$option_rootOU = "SharePoint Users"
$rawpwd = "Pass@word01"
$option_newuserpasswords = ConvertTo-SecureString -AsPlainText $rawpwd -force
# --Script -- #
write-host ""
write-host "-----------------------------------------------------------------------" -foregroundcolor "Green"
write-host ""
## Create main OU
write-host "Create 'SharePoint Users' Organization Unit... " -foregroundcolor "Yellow"
dsadd ou "OU=$option_rootOU,$option_rootlevel"
write-host ""
## Create Users
write-host "Create 'SPAdmin' user account... " -foregroundcolor "Red" -NoNewLine
New-ADUser -GivenName "SP Admin" –Name "SP Admin" –SamAccountName spadmin –DisplayName "SP Admin" –Enabled $true -AccountExpirationDate $null -PasswordNeverExpires $true -AccountPassword (ConvertTo-SecureString "Pass@word01" -AsPlainText -force) -Path "OU=$option_rootOU,$option_rootlevel" -UserPrincipalName "spadmin@DSIN.COM"
write-host "done!" -foregroundcolor "Red"
write-host "Create 'SPFarm' user account... " -foregroundcolor "Red" -NoNewLine
New-ADUser -GivenName "SP Farm" –Name "SP Farm" –SamAccountName spfarm –DisplayName "SP Farm" –Enabled $true -AccountExpirationDate $null -PasswordNeverExpires $true -AccountPassword (ConvertTo-SecureString "Pass@word01" -AsPlainText -force) -Path "OU=$option_rootOU,$option_rootlevel" -UserPrincipalName "spfarm@DSIN.COM"
write-host "done!" -foregroundcolor "Red"
write-host "Create 'SQLsvc' user account... " -foregroundcolor "Red" -NoNewLine
New-ADUser -GivenName "SQL Service" –Name "SQL svc" –SamAccountName sqlsvc –DisplayName "SQL Service" –Enabled $true -AccountExpirationDate $null -PasswordNeverExpires $true -AccountPassword (ConvertTo-SecureString "Pass@word01" -AsPlainText -force) -Path "OU=$option_rootOU,$option_rootlevel" -UserPrincipalName "sqlsvc@DSIN.COM"
write-host "done!" -foregroundcolor "Red"
write-host "Create 'SPAppPool' user account... " -foregroundcolor "Red" -NoNewLine
New-ADUser -GivenName "SP Application Pool" –Name "SP AppPool" –SamAccountName spapppool –DisplayName "SP Application Pool" –Enabled $true -AccountExpirationDate $null -PasswordNeverExpires $true -AccountPassword (ConvertTo-SecureString "Pass@word01" -AsPlainText -force) -Path "OU=$option_rootOU,$option_rootlevel" -UserPrincipalName "spapppool@DSIN.COM"
write-host "done!" -foregroundcolor "Red"
## Display useless informations
write-host ""
write-host "-----------------------------------------------------------------------" -foregroundcolor "Green"
write-host ""
write-host "Users has been created !" -foregroundcolor "Green"
write-host ""
write-host "-----------------------------------------------------------------------" -foregroundcolor "Green"
write-host ""
以上是关于powershell 为SharePoint 2013创建SharePoint服务帐户(最低)的主要内容,如果未能解决你的问题,请参考以下文章
powershell SharePoint PowerShell,它获取作为字符串的列表项并将其转换为数字,然后更新列表项。
powershell 将图片设置为SharePoint 2010用户配置文件(UPS),图片来自本地路径。
sharepoint 2013:活动目录迁移用户后,在sharepoint中move 用户 powershell
powershell SharePoint Powershell在SharePoint模式下测试Analysis服务。这用于解决SharePoin中的Analysis服务问题
powershell SharePoint网站权限。正在进行的PowerShell项目,以分解sharepoint网站集和所有部分的所有权限
powershell Powershell用于将Powershell与SharePoint 2007一起使用