Forum Discussion

RichMiles's avatar
RichMiles
Frequent Visitor
3 years ago
Solved

Can't Find Gateway ID

Hello,

 

I want to run some APIs against my Gateway using the Try Me pages on Microsoft's site. However I can't find out where my Gateway ID is in order to run them

 

Can anyone out there point me in the right direction to obtain this ID?

 

Thanks 

  •  

    Here's one way of doing it.

    #optional 
    Install-Module -Name OnPremisesDataGatewayHAMgmt -Scope CurrentUser
    Import-Module -Name OnPremisesDataGatewayHAMgmt
    # end optional
    Login-OnPremisesDataGateway
    foreach ($i in Get-OnPremisesDataGatewayClusters) {
        $i.gateways | ConvertFrom-Json | Format-Table gatewayName,isAnchorGateway,gatewayClusterStatus,gatewayVersion,gatewayMachine,gatewayObjectId -AutoSize
    }
    

     

    The gateway ID is the id of the anchor cluster member.

1 Reply

  •  

    Here's one way of doing it.

    #optional 
    Install-Module -Name OnPremisesDataGatewayHAMgmt -Scope CurrentUser
    Import-Module -Name OnPremisesDataGatewayHAMgmt
    # end optional
    Login-OnPremisesDataGateway
    foreach ($i in Get-OnPremisesDataGatewayClusters) {
        $i.gateways | ConvertFrom-Json | Format-Table gatewayName,isAnchorGateway,gatewayClusterStatus,gatewayVersion,gatewayMachine,gatewayObjectId -AutoSize
    }
    

     

    The gateway ID is the id of the anchor cluster member.