Skip to content

Commit

Permalink
Update Utility.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Un1k0d3r authored Mar 21, 2019
1 parent b8c6663 commit dea28ca
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts/Utility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,32 @@ function DumpAll-UserInfo {
}
}

function Dump-UserGroup {
param(
[Parameter(Mandatory=$True, ValueFromPipeline=$True)]
[string]$UserName
)

BEGIN {

}

PROCESS {
ForEach($User in $UserName) {
Write-Output "Dumping $($User) Groups"
Write-Output "-----------------------------------------------"
$Groups = (Ldap-GetProperty -Filter "(&(objectCategory=User)(samaccountname=$($User)))" -Property memberOf)
ForEach($Group in $Groups) {
Write-Output $Group
}
}
}

END {
Write-Output "[+] Process completed..."
}
}

function Search-UserPassword {

param(
Expand Down

0 comments on commit dea28ca

Please sign in to comment.