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
Post a Comment