|
|
@@ -1,10 +1,15 @@
|
|
|
Param
|
|
|
(
|
|
|
[string]$DistinguishedName,
|
|
|
+ [string]$UserIdentity = "",
|
|
|
[array]$Groups = @(),
|
|
|
[switch]$Duplicates
|
|
|
)
|
|
|
|
|
|
+if ($UserIdentity -notin @($null, "")){
|
|
|
+ $DistinguishedName = (Get-ADUser -Identity $UserIdentity).distinguishedname
|
|
|
+}
|
|
|
+
|
|
|
#The user to check.
|
|
|
# $User = "max.mustermann@domain.com";
|
|
|
|