SharePoint SSS(Security Store Service)服务-PowerShell

简介: 1. 获取SSS应用程序的标识Get-SPServiceApplication2. 获取指定的SSS应用程序实例$sss = Get-SPServiceApplication-Identity bc4399ed-a2e0-4397-bf07-cd3d207e630e3.

1. 获取SSS应用程序的标识

Get-SPServiceApplication

2. 获取指定的SSS应用程序实例

$sss = Get-SPServiceApplication
-Identity bc4399ed-a2e0-4397-bf07-cd3d207e630e

3. 启用SSS审计

$sss = Get-SPServiceApplication
-Identity bc4399ed-a2e0-4397-bf07-cd3d207e630e
Set-SPSecureStoreServiceApplication
–Identity $sss –AuditingEnabled –AuditlogMaxSize 15

4. 配置安全存储数据库

$sss = Get-SPServiceApplication
-Identity bc4399ed-a2e0-4397-bf07-cd3d207e630e
Set-SPSecureStoreServiceApplication –Identity $sss
–DatabaseName SecureStoreDB

5. 生成新的主密钥

Update-SPSecureStoreMasterKey
–ServiceApplicationProxy da9247cb-9055-4024-817c-714ef98656e1
–PassPhrase SharePoint1

6. 刷新密钥

Update-SPSecureStoreApplicationServerKey –ServiceApplicationProxy
da9247cb-9055-4024-817c-714ef98656e1 –PassPhrase SharePoint1

7. 创建应用字段

$windowsUser = New-SPSecureStoreApplicationField
–Name "SP\AppSvcAccount" –Type WindowsUserName –Masked:$false
$windowsPass = New-SPSecureStoreApplicationField –Name "password"
–Type WindowsPassword –Masked:$true

8. 创建目标应用

$targetApp = New-SPSecureStoreTargetApplication
–Name "SSOApplication" –FriendlyName "SSO Application"
–ApplicationType Group

9. 创建新的应用程序入口

$windowsUser = New-SPSecureStoreApplicationField
–Name "SP\AppSvcAccount" –Type WindowsUserName –Masked:$false
$windowsPass = New-SPSecureStoreApplicationField –Name "password"
–Type WindowsPassword –Masked:$true
$appFields = $windowsUser, $windowsPass
$targetApp = New-SPSecureStoreTargetApplication
–Name "SSOApplication" –FriendlyName "SSO Application"
–ApplicationType Group
New-SPSecureStoreApplication –ServiceContext http://sp2010
–TargetApplication $targetApp –Fields $appFields
相关文章
|
1月前
【Azure App Service】PowerShell脚本批量添加IP地址到Web App允许访问IP列表中
Web App取消公网访问后,只允许特定IP能访问Web App。需要写一下段PowerShell脚本,批量添加IP到Web App的允许访问IP列表里!
|
4月前
|
Java
【Azure 应用服务】使用PowerShell脚本上传文件至App Service目录  
【Azure 应用服务】使用PowerShell脚本上传文件至App Service目录  
|
C# 数据安全/隐私保护 网络安全