Created
September 26, 2017 19:34
-
-
Save bobfrankly/073c80e9a747916adbcfe7bf743ed49e to your computer and use it in GitHub Desktop.
Hi WEQ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-ADUserWithGroups{ | |
param ($user) | |
get-aduser $User -Properties memberof | select *, @{name="Groups";expression = {$_.memberof | foreach {([regex]"[^CN=]{3}([^,]*)").match($_).value}}} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment