Created
July 10, 2022 22:05
-
-
Save SweetAsNZ/01cd814ac4700e9d3758a196be8570c2 to your computer and use it in GitHub Desktop.
Get AD Users With Duplicate Mobile
This file contains hidden or 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
# Get Users With A Duplicated Property e.g. Mobile Number | |
$Property = 'Mobile' | |
$A = Get-ADUser -Filter {($Property -like "*")} -Property $Property | Group $Property | Where-Object {$_.Count -ge 2} | Select-Object -ExpandProperty group | | |
Select-Object Enabled, Name, SamAccountName, $Property |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment