Hello,
New to PowerShell so forgive me if you see me here a lot asking a lot of questions...I need some help in tweaking this command...my list is of employee numbers, but if some numbers on my list is not in active directory, in the results those ids gets bypass so I do not know that was an incorrect number...can I get the bad ids to also show on my list?
get-content c:\temp\disable.txt |ForEach-Object { Get-ADUser -LDAPFilter "(samaccountname=$_)" | Select-Object -Property samaccountname,surname,givenname,enabled}