Using Invoke-ListServiceEntries command in Powercli 13.2 with parameter -ServiceId , Unable to fetch L4 protocol and Destination-ports information
search cancel

Using Invoke-ListServiceEntries command in Powercli 13.2 with parameter -ServiceId , Unable to fetch L4 protocol and Destination-ports information

book

Article ID: 372538

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Using Invoke-ListServiceEntries command in Powercli 13.2 with parameter -ServiceId , Unable to see the L4 protocol and Destination-ports information, as shown below:

Invoke-ListServiceEntries -ServiceId "MS-SQL-S"

Result:
ResourceType: L4PortSetServiceEntry
Children: 
MarkedForDelete: False
Overridden: False
OriginSiteId: 
OwnerId: 
ParentPath: /infra/services/MS-SQL-S
Path: /infra/services/MS-SQL-S/service-entries/MS-SQL-S
RealizationId: 73ed9832-####-####-####-ceae4ca16fa2 
RelativePath: MS-SQL-S
RemotePath: 
UniqueId: 73ed9832-####-####-####-ceae4ca16fa2
CreateTime: 1686156514146
CreateUser: system
LastModifiedTime: 1686156514146
LastModifiedUser: system
Protection: NOT_PROTECTED
SystemOwned: True
Description: 
DisplayName: MS-SQL-S
Id: MS-SQL-S
Tags: 
Revision: 0
Links: 
Schema: 
Self: 

Environment

PowerCLI 13.2

VMware NSX-T Data Center 3.x
VMware NSX 4.x

Resolution

This is a known issue in the PowerCLI 13.2  cmdlet :

As a workaround :

Use NSX-T Rest API  policy/api/v1/infra/services/service-name/service-entries/,

L4 protocol and destination-ports information as below:

eg :


{
  "resource_type": "L4PortSetServiceEntry",
  "id": "https",
  "display_name": "MyHttps",
  "path": "/infra/services/my-http/service-entries/https",
  "parent_path": "/infra/services/my-http",
  "relative_path": "https",
  "destination_ports": [
    "7443"
  ],
  "l4_protocol": "TCP",
  "_create_user": "admin",
  "_create_time": 1517316057383,
  "_last_modified_user": "admin",
  "_last_modified_time": 1517316057383,
  "_system_owned": false,
  "_protection": "NOT_PROTECTED",
  "_revision": 0
}

Additional Information