Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Why doesnt Add-AdGroupMember load User Accounts imported from my CSV file?

$
0
0

Hello,

Thought I was doing some real simple here.  I have a file named sdedot.csv formatted as follows:

ID,Name
Ha996622,Bobby
Ha224411,Mary

I tried running the following to load a Global Security group with the ID, or in our case, SamAccountNames specified in the sdedot.csv file, howerver no objects are loaded into the group.  The script runs and ends, producing no error messages but not loading the group with members. 

Import-Csv Sdedot.csv | Foreach-Object { Add-AdGroupMember -Identity MyGlobGroup -Member $_.ID }

Any ideas?  Thanks in advance.


Thanks for your help! SdeDot


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>