< Back

Get-NsxSecurityPolicy

Sat Jan 18, 2020 9:11 pm

NAME Get-NsxSecurityPolicy



SYNOPSIS

Retrieves an NSX Security Policy.





SYNTAX

Get-NsxSecurityPolicy [[-Name] <String>] [-IncludeHidden] [-Connection <PSObject>] [<CommonParameters>]



Get-NsxSecurityPolicy -ObjectId <String> [-IncludeHidden] [-Connection <PSObject>] [<CommonParameters>]



Get-NsxSecurityPolicy -SecurityGroup <XmlElement> [-IncludeHidden] [-Connection <PSObject>] [<CommonParameters>]





DESCRIPTION

An NSX Security Policy is a set of Endpoint, firewall, and network

introspection services that can be applied to a security group.



This cmdlet returns Security Policy objects.





PARAMETERS

-ObjectId <String>

Set Security Policies by objectId



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <String>

Get Security Policies by name



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SecurityGroup <XmlElement>

Get Security Policies applied to the specified Security Group



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-IncludeHidden [<SwitchParameter>]

Include the readonly (system) Security Policies in results.



Required? false

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:\\>Get-NsxSecurityPolicy SecPolicy_WebServers



Retrieves the security policy called SecPolicy_WebServers









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-NsxSecurityGroup WebApp1WebServers | Get-NsxSecurityPolicy



Retrieves all security policies applied to the security Group WeApp1WebServers











RELATED LINKS