Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Add-ADGroupMember

$
0
0

$users = Get-Content "c:\tools\PILOTUsers.txt"

foreach ($user in $users) { Add-ADGroupMember SSOPilot $users}

 

I run this on a .TXT file that has many users in it.   It says:  Add-ADGroupMember : The specified account name is already a member of the group  for each user yet none of the users in the .TXT file are in this group.  I manually created this SSOPilot group myself an hour ago so I know that no one is a member.  

So why would PS think the user is already a member when they are not?

 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles