< Back

Get-NsxService

Sat Jan 18, 2020 9:12 pm

NAME Get-NsxService



SYNOPSIS

Retrieves NSX Services (aka Applications).





SYNTAX

Get-NsxService [[-Name] <String>] [-scopeId <String[]>] [-IncludeReadOnly] [-Connection <PSObject>]

[<CommonParameters>]



Get-NsxService [-objectId <String>] [-scopeId <String[]>] [-IncludeReadOnly] [-Connection <PSObject>]

[<CommonParameters>]



Get-NsxService [[-Name] <String>] [-scopeId <String[]>] [-IncludeReadOnly] -LocalOnly [-Connection <PSObject>]

[<CommonParameters>]



Get-NsxService [[-Name] <String>] [-scopeId <String[]>] [-IncludeReadOnly] -UniversalOnly [-Connection <PSObject>]

[<CommonParameters>]



Get-NsxService [[-Port] <Int32>] [-scopeId <String[]>] [-IncludeReadOnly] [-Connection <PSObject>]

[<CommonParameters>]





DESCRIPTION

An NSX Service defines a service as configured in the NSX Distributed

Firewall.



This cmdlet retrieves existing services as defined within NSX.



It also supports searching for services by TCP/UDP port number and will

locate services that contain the specified port within a range definition

as well as those explicitly configured with the given port.





PARAMETERS

-objectId <String>

Return service by objectId



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <String>

Return service by name



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Port <Int32>

Return services that have a either a matching port, or are defiuned by a range into which the specified port

falls



Required? false

Position? 2

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-scopeId <String[]>

ScopeId of Service Group. Can define multiple scopeIds in a list to iterate accross scopes.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IncludeReadOnly [<SwitchParameter>]

Include services with readonly attribute



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-UniversalOnly [<SwitchParameter>]

Return only Universal objects



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LocalOnly [<SwitchParameter>]

Return only Locally scoped objects



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Connection <PSObject>

PowerNSX Connection object



Required? false

Position? named

Default value $defaultNSXConnection

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Example1: Get Service by name



PS C:\\> Get-NsxService -Name TestService



Example2: Get Service by port (will match services that include the

specified port within a range as well as those explicitly configured with

the given port.)

PS C:\\> Get-NsxService -port 1234











RELATED LINKS