Skip to content

Instantly share code, notes, and snippets.

@mtellin
Last active November 1, 2017 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtellin/6a782c02fa04d3b30288fff48ecc0339 to your computer and use it in GitHub Desktop.
Save mtellin/6a782c02fa04d3b30288fff48ecc0339 to your computer and use it in GitHub Desktop.
# This will return the list of NSX Security Groups that are backed by Active Directory Groups for you to review
Get-NsxSecurityGroup | Where {$_.InnerXml -like "*DirectoryGroup*"}
# Alternatively, to also remove the security groups as part of the command
# Note: you will be prompted to confirm the group(s) it finds
Get-NsxSecurityGroup | Where {$_.InnerXml -like "*DirectoryGroup*"} | Remove-NsxSecurityGroup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment