Trying to import a csv file with list of users and export a csv file with these users + the groups they are member of..
I tried the script from this Topic: Import list of users - Export List of users and Groups
But it didn't work.
Example of my user list file (test_alex.csv):
Name
----
Alex Alex
Test Test
You Me
That's the error i get:
Get-AdUser : The search filter cannot be recognized At line:2 char:29 + ForEach-Object -pv user { Get-AdUser -filter "displayname -eq '$($_.username)' ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-ADUser], ADException + FullyQualifiedErrorId : ActiveDirectoryServer:8254,Microsoft.ActiveDirectory.Management.Commands.GetADUser