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


hello,

thought doing real simple here.  have a file named sdedot.csv formatted follows:

id,name  ha996622,bobby  ha224411,mary

i tried running following load global security group id, or in our case, samaccountnames specified in sdedot.csv file, howerver no objects loaded group.  script runs , ends, producing no error messages not loading group members. 

import-csv sdedot.csv | foreach-object { add-adgroupmember -identity myglobgroup -member $_.id }

any ideas?  in advance.


thanks help! sdedot

well, figured out.  bonehead mistake on part.  executing following:

import-module activedirectory | import-csv sdedot.csv | % { get-adgroupmember -identity mygroup $_.id }

dropping 'import-module activedirectory' allowed rest of command work.

thanks contributions.


thanks help! sdedot



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file