Set-SPDefaultProfileConfig

變更 User Profile 應用程式 Proxy的 MySitesPublicEnabled 屬性。

Syntax

Set-SPDefaultProfileConfig
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   -MySitesPublicEnabled <Boolean>
   -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
   [-WhatIf]
   [<CommonParameters>]

Description

使用 Set-SPDefaultProfileConfig Cmdlet 將使用者設定檔的 MySitesPublicEnabled 屬性應用程式 Proxy從建立 Proxy 時設定的任何專案變更為使用此 Cmdlet 所定義的任何專案。

如需 SharePoint 產品Windows PowerShell的許可權和最新資訊,請參閱 SharePoint Server 2016 Windows PowerShell線上檔,SharePoint Server 2019參考。 https://go.microsoft.com/fwlink/p/?LinkId=671715)

範例

--------------------範例---------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}
Set-SPDefaultProfileConfig $proxy -MySitesPublicEnabled $true

此範例會變更指定之使用者設定檔服務應用程式的 MySitesPublicEnabled 屬性。

參數

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Confirm

執行 Cmdlet 之前提示您確認。

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-MySitesPublicEnabled

啟用或停用公用 MySites。

有效值$True或$False。

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-ProfileServiceApplicationProxy

指定包含要刪除之網站訂用帳戶的 User Profile Service 應用程式 Proxy。此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;服務應用程式 Proxy 的有效名稱 (例如 UserProfileSvcProxy1) ;或有效 SPServiceApplicationProxy 物件的實例。

Type:SPServiceApplicationProxyPipeBind
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

顯示執行 Cmdlet 時會發生什麼情況。 未執行 Cmdlet。

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

輸入

Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyPipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

輸出

系統.物件