0

If I had a txt file with a bunch of names:

Dan Smith Jim Bob Ryan Jones etc,etc

using a VBscript could I convert the displaynames to AD Usernames?

If Powershell is only options, could you please let me know how I could format my text file for it to run. I would rather use VBscript, but Powershell will work.

1 Answer 1

1

If your text file is 1 name per line and you know they show up exactly like they do in AD.

Get-Content Names.txt | Get-Aduser -filter {Name -eq '$_'} | select Name,Samaccountname

At least thats a way to do it in PowerShell.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .