Re: Powershell advice - matching an AD user to a value in an array

2013-03-07 Thread Michael Leone
On Tue, Mar 5, 2013 at 11:39 AM, Michael B. Smith mich...@smithcons.com wrote: Ok, small enough to do a brute force search. Yeah, I did something pretty much similar: $AllCSVUsers = @(Import-CSV $InputFileName) | Sort $TotCntCSVUsers = $AllCSVUsers.count $All_AD_Users = Get-QADUser -Enabled

RE: Powershell advice - matching an AD user to a value in an array

2013-03-05 Thread Michael B. Smith
How many users do you have? How many users are in the CSV file? Approximate, in both cases, is fine. -Original Message- From: Michael Leone [mailto:oozerd...@gmail.com] Sent: Tuesday, March 5, 2013 10:54 AM To: NT System Admin Issues Subject: Powershell advice - matching an AD user to a

Re: Powershell advice - matching an AD user to a value in an array

2013-03-05 Thread Michael Leone
On Tue, Mar 5, 2013 at 11:05 AM, Michael B. Smith mich...@smithcons.com wrote: How many users do you have? How many users are in the CSV file? Approximate, in both cases, is fine. CSV users = 1300. AD users = 1100. What I am most interested in: AD users NOT in CSV file. There will always be

RE: Powershell advice - matching an AD user to a value in an array

2013-03-05 Thread Michael B. Smith
Ok, small enough to do a brute force search. In pseudo-code (I don't use QAD and I didn't test it) $AllCSVUsers = @(Import-CSV $InputFileName) $TotCntCSVUsers = $AllCSVUsers.count foreach( $row in $AllCSVUsers ) { $user = Get-AdUser -Filter { (