This cmdlet is deprecated and will be removed in a future release. Use the NSX Policy SDK cmdlets from the VMware.Sdk.Nsx.Policy module instead.This cmdlet retrieves PSObject objects that represent a proxy to a NSX-T Policy API service and can be used to invoke the operations of the NSX-T Policy API service. The cmdlet returns one PSObject object for every policy service available on NSX-T server.Every service proxy has a top-level Help property that contains documentation about the service's methods, parameters, constants, and so on. The Help object is hierarchical and mirrors the service's methods, parameters, constants, and so on. The Help object can also be used for creation of parameters that the service methods accept through a method named "Create".The "Create" method is available for the following objects:- A parameter.- Inheritors of a parameter that accepts instances of types that derive the declared parameter type.- Elements of a parameter that is of type List, Set or Optional.- Key and Value of a parameter of type Map.- Fields of a parameter of type Structure.For more information, see Example 2.


[-Name  <String[]>]
[-Server  <CisServer[]>]


Required Parameter Name Type Position Features Description
String[] named
  • wildcards
  • Specifies the service type ID.
    CisServer[] named Specifies the NSX-T servers on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-NsxtServer cmdlet.




    Example 1

    $service = Get-NsxtPolicyService

    Retrieves the binding for the specified service and invokes a service operation.

    Example 2

    # Retrieves the "" service.
    $service = Get-NsxtPolicyService
    # Creates string parameters.
    $domain_id = "vmc"
    $group_id = "webgroup"
    # Creates the "group" input parameter.
    $group = $
    $group.display_name = "web group"
    $group.description = "web group"
    # Creates an empty list of expressions.
    $group.expression = $
    # Creates a single expression of type Condition. The resource_type field is prefilled with the correct value.
    $expression = $
    $expression.member_type = "VirtualMachine"
    $expression.value = "webvm"
    $expression.key = "Tag"
    $expression.operator = "EQUALS"
    # Creates or patches the group.
    $service.patch($domain_id, $group_id, $group)

    Creates a domain workgroup.

    Related Commands


    Was this page helpful?