1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
@'
"ITS-Number", "sAMAccountName-Group"
"ITS590002", "R-LOGA"
"ITS590002", "Smart Vision"
"ITS590002", "R-PS3"
"ITS590002", "P-RGP"
"ITS591001", "R-NETKALK"
"ITS591001", "SHILL"
"ITS591001", "R-PS4"
"ITS591001", "Smart Vision"
"ITS591001", "R-LOGA"
'@ > c:\temp\datas.csv
$g=import-csv c:\temp\datas.csv| Group-Object sAMAccountName-Group
$g|Where {$_.count -gt 1 }
#Count Name Group
#----- ---- -----
# 2 R-LOGA {@{ITS-Number=ITS590002; sAMAccountName-Group=R-LOGA}, @{ITS-Number=ITS591001; sAMAc...
# 2 Smart Vision {@{ITS-Number=ITS590002; sAMAccountName-Group=Smart Vision}, @{ITS-Number=ITS591001;...
($g|Where {$_.count -gt 1 }).Name
#R-LOGA
#Smart Vision
($g|Where {$_.count -gt 1 }).Name > c:\temp\Result.txt |
Partager