New-SPProfileServiceApplication
新增 User Profile Service 應用程式至伺服器陣列。
Syntax
New-SPProfileServiceApplication
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-Name <String>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-MySiteHostLocation <SPSitePipeBind>]
[-PartitionMode]
[-ProfileDBCredentials <PSCredential>]
[-ProfileDBName <String>]
[-ProfileDBServer <String>]
[-ProfileSyncDBCredentials <PSCredential>]
[-ProfileDBFailoverServer <String>]
[-ProfileSyncDBName <String>]
[-ProfileSyncDBServer <String>]
[-ProfileSyncDBFailoverServer <String>]
[-SocialDBCredentials <PSCredential>]
[-SocialDBName <String>]
[-SocialDBServer <String>]
[-SocialDBFailoverServer <String>]
[-WhatIf]
[-DeferUpgradeActions]
[<CommonParameters>]
New-SPProfileServiceApplication
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-Name <String>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-MySiteHostLocation <SPSitePipeBind>
[-MySiteManagedPath <SPPrefixPipeBind>]
[-PartitionMode]
[-ProfileDBCredentials <PSCredential>]
[-ProfileDBName <String>]
[-ProfileDBServer <String>]
[-ProfileSyncDBCredentials <PSCredential>]
[-ProfileDBFailoverServer <String>]
[-ProfileSyncDBName <String>]
[-ProfileSyncDBServer <String>]
[-ProfileSyncDBFailoverServer <String>]
[-SiteNamingConflictResolution <String>]
[-SocialDBCredentials <PSCredential>]
[-SocialDBName <String>]
[-SocialDBServer <String>]
[-SocialDBFailoverServer <String>]
[-WhatIf]
[-DeferUpgradeActions]
[<CommonParameters>]
Description
此 Cmdlet 包含一個以上的參數集。
您可能只會使用到一個參數集中的參數,而且您無法合併不同參數集中的參數。 如需如何使用參數集的詳細資訊,請參閱 Cmdlet 參數集。
New-SPProfileServiceApplication
Cmdlet 可新增及建立新的設定檔案服務應用程式,或建立設定檔服務的執行個體。
如需 SharePoint 產品和技術的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint 伺服器 Cmdlet。
範例
------------------範例------------------
New-SPProfileServiceApplication -Name 'User Profile Service Application' -ApplicationPool 'SharePoint Web Services Default' -ProfileDBName Profile -SocialDBName Social -ProfileSyncDBname Sync
此範例會建立新的 User Profile Service 應用程式。
參數
-ApplicationPool
指定在其中執行服務應用程式的 Web 服務的現有 IIS 應用程式集區。
此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;有效的應用程式集區名稱 (例如 AppPoolName1);或有效之 IISWebServiceApplicationPool 物件的執行個體。
Type: | SPIisWebServiceApplicationPoolPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-AssignmentCollection
管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。
使用 Global 參數時,所有物件會包含在全域儲存區內。
如果不立即使用物件,或使用 Stop-SPAssignment
命令加以捨棄,則可能會有記憶體不足的狀況發生。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Confirm
在執行命令之前,提示您確認操作。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DeferUpgradeActions
指定是否要延後並以手動方式完成升級程序。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-MySiteHostLocation
指定將在其中建立「我的網站」的網站集合。
此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;格式為 https://server_name 的有效 URL;或有效 SPSite 物件的執行個體。
Type: | SPSitePipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-MySiteManagedPath
指定將在其中建立個人網站的受管理路徑。
類型必須是有效的 URL,格式為 https://server_name.
Type: | SPPrefixPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Name
指定新 User Profile Service 應用程式的顯示名稱。 此名稱必須是此伺服器陣列中 User Profile Service 應用程式的唯一名稱。 名稱最多可以是 64 個字元。
此類型必須是服務應用程式的有效名稱,例如 UserProfileSvcApp1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-PartitionMode
指定服務應用程式依網站群組來限制資料。 設定 PartitionMode 參數並建立服務應用程式之後,就無法變更。
此屬性對 SharePoint Server 2019 沒有影響。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ProfileDBCredentials
指定安全性認證設定,例如此 cmdlet 所建立,用於連線至使用者設定檔資料庫的使用者名稱及密碼。
此類型必須是有效的 PSCredential 物件。
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ProfileDBFailoverServer
使內容資料庫與結合 SQL Server 資料庫鏡像一起使用的特定容錯移轉伺服器產生關聯。 伺服器名稱是必要值。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ProfileDBName
指定使用者設定檔資料庫建立所在之資料庫的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ProfileDBServer
指定將建立 User Profile 資料庫的資料庫伺服器。
此類型必須是SQL Server資料庫伺服器的有效名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ProfileSyncDBCredentials
指定安全性認證設定,例如 ProfileSyncDBName 參數所指定,用於連線至 Profile Sync 資料庫的使用者名稱及密碼。
此類型必須是有效的 PSCredential 物件。
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ProfileSyncDBFailoverServer
使 Profile Sync 資料庫與結合 SQL Server 資料庫鏡像一起使用的特定容錯移轉伺服器產生關聯。 伺服器名稱是必要值。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ProfileSyncDBName
指定 Profile Sync 資料庫建立所在的資料庫。
此類型必須是有效的 SQL Server 資料庫名稱,例如 ProfileSyncAppDB1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ProfileSyncDBServer
指定 ProfileSyncDBName 參數中所指定用於主控 Profile Sync 資料庫的資料庫伺服器。
此類型必須是有效的 SQL Server 主機名稱,例如 SQLServerProfileSyncHost1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SiteNamingConflictResolution
指定要用來命名個人網站的格式。
使用下列其中一個整數值:
1 個人網站集合是以使用者名稱為基礎,而不需解決任何衝突。 例如,https://portal_site/location/username/
2 個人網站集合是以使用功能變數名稱解決衝突的使用者名稱為基礎。 例如 .../username/ 或 .../domain_username/
3 個人網站集合必須一律使用網域和使用者名稱來命名,以避免任何衝突。 例如,https://portal_site/location/domain_username/
預設值為 1 (不解決衝突)。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SocialDBCredentials
各種安全性認證設定,包括此 Cmdlet 所建立,用於連線至社交資料庫的使用者名稱及密碼。
此類型必須是有效的 PSCredential 物件。
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SocialDBFailoverServer
使社交資料庫與結合 SQL Server 資料庫鏡像一起使用的特定容錯移轉伺服器產生關聯。 伺服器名稱是必要值。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SocialDBName
指定 Social 資料庫建立所在的資料庫。
此類型必須是有效的 SQL Server 主機名稱,例如 SQLServerSocialHost1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SocialDBServer
指定資料庫伺服器,其將主控在 SocialDBName 中指定的社交資料庫。
此類型必須是有效的 SQL Server 主機名稱,例如 SQLServerSocialHost1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-WhatIf
顯示訊息會描述命令的功效而不執行命令。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |