Enable-SPProjectActiveDirectoryEnterpriseResourcePoolSync

啟用 Active Directory 企業資源資料庫同步處理的計時器工作執行作業。

Syntax

Enable-SPProjectActiveDirectoryEnterpriseResourcePoolSync
      [-Url] <Uri>
      [-GroupUids] <System.Collections.Generic.IEnumerable`1[System.Guid]>
      [-AssignmentCollection <SPAssignmentCollection>]
      [<CommonParameters>]

Description

Active Directory Enterprise 資源集區同步處理可用來同時建立或更新多個 Project Server 企業資源。 Project Server 企業資源還可以依 Active Directory 目錄服務的群組成員資格而自動啟用或停用。 例如,您只要在 Active Directory 群組選取部門新進員工進行同步處理,這些部門新進員工就會自動新增成 Project Server 企業資源。 相反地,員工一旦從 Active Directory 群組中移除,這些員工的 Project Server 帳戶就會在同步處理中停用。

企業資源資料庫同步處理也會依 Active Directory 提供的最新資料更新企業資源屬性。 例如,員工可能因為結婚而變更姓名及電子郵件地址。 只要此變更是在 Active Directory 中完成,且使用者位於連結的群組,便會在進行同步處理時,將變更反映在使用者的企業資源屬性中。

企業資源資料庫可對應至單一 Active Directory 群組進行同步處理。 不過,這個 Active Directory 群組可以包含其成員也已同步的巢狀群組。

在企業資源資料庫同步處理過程中會產生下列動作:

  • 根據 Active Directory 帳戶建立新的 Project Server 企業資源和對應的使用者帳戶。
  • 停用使用中的 Project Server 資源/使用者帳戶。
  • 現有的 Project Server 使用者帳戶中繼資料 (例如名稱、電子郵件地址等) 可以在 Active Directory 中變更時更新。
  • 重新啟用先前非使用中的 Project Server 資源/使用者。

如需 Project Server Windows PowerShell的許可權和最新資訊,請參閱 () https://go.microsoft.com/fwlink/p/?LinkId=251833 線上檔 https://go.microsoft.com/fwlink/p/?LinkId=251833

範例

------------ 範例 1 --------------------

$groupGuids = Get-ADGroup -Filter {Name -eq 'Domain Users' -or Name -eq 'Domain Admins'} | select ObjectGuid #Active Directory PowerShell Module required
[Guid[]]$groupUids = $groupGuids[0].ObjectGuid,$groupGuids[1].ObjectGuid
Enable-SPProjectActiveDirectoryEnterpriseResourcePoolSync -Url https://pwa_site -GroupUids $groupUids

擷取網域使用者和 Domain Admins Active Directory 群組的 ObjectGuid 值,並將其新增至專案Web Apps網站上的 Active Directory 企業資源集區同步處理。https://pwa_site.

參數

-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:Project Server 2013, Project Server 2016

-GroupUids

用來同步處理企業資源集區的 Active Directory 群組 GUID。

Type:System.Collections.Generic.IEnumerable`1[System.Guid]
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Project Server 2013, Project Server 2016, Project Server 2019

-Url

指定Project Web App實例的 URL,以啟用 Active Directory Enterprise 資源同步。

Type:Uri
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Project Server 2013, Project Server 2016, Project Server 2019