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.

Benjamin Jones
  • 326
  • 1
  • 9
  • 23

1 Answers1

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.

Unfundednut
  • 372
  • 4
  • 17