You can add an existing Tier-1 gateway to a specific Edge Cluster with the NSX Policy SDK for PowerShell by using the Invoke-PatchTier1LocaleServices cmdlet.

Prerequisites

  • Verify that you are connected to an NSX server system.

  • Verify that you know the Edge Cluster name of the Edge Cluster to which you want to add the Tier-1 gateway.

Procedure

  1. Retrieve the Edge Cluster information.
    $edgeClusters = Invoke-ListEdgeClustersForEnforcementPoint -SiteId default -EnforcementPointId default
    $edgeCluster = $edgeClusters.Results | where {$_.Displayname -eq $edgeClusterName}
  2. Create a client-side object for locale service with the Edge Cluster path.

    $localeService = Initialize-LocaleServices -EdgeClusterPath $edgeCluster.Path -DisplayName default -Id default

  3. Invoke the operation.
    Invoke-PatchTier1LocaleServices -Tier1Id $T1.Id -LocaleServices $localeService -LocaleServicesId default