Syntax
Get-NsxtPolicyService [[-Name] <String[]>] [-Server <CisServer[]>] [<CommonParameters>]Related Commands
Online VersionDetailed Description
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.Parameters
Return Type
One or more PSObject objectsNotes
Examples
-------------------------- Example 1 --------------------------
$service = Get-NsxtPolicyService com.vmware.nsx_policy.infra.domains.groups $service.list("domain_id")
Retrieves the binding for the specified service and invokes a service operation.
-------------------------- Example 2 --------------------------
# Retrieves the "com.vmware.nsx_policy.infra.domains.groups" service. $service = Get-NsxtPolicyService com.vmware.nsx_policy.infra.domains.groups # Creates string parameters. $domain_id = "vmc" $group_id = "webgroup" # Creates the "group" input parameter. $group = $service.Help.patch.group.Create() $group.display_name = "web group" $group.description = "web group" # Creates an empty list of expressions. $group.expression = $service.Help.patch.group.expression.Create() # Creates a single expression of type Condition. The resource_type field is prefilled with the correct value. $expression = $service.Help.patch.group.expression.Element.condition.Create() $expression.member_type = "VirtualMachine" $expression.value = "webvm" $expression.key = "Tag" $expression.operator = "EQUALS" [void]($group.expression.Add($expression)) # Creates or patches the group. $service.patch($domain_id, $group_id, $group)
Creates a domain workgroup.