Microsoft
Software
Hardware
Network
Question : add-adgroupmember with a variable.
Hello,
I`m building script one of the things i have to do is the following:
$grpmembers = "user1,user2,user3"
$dataadgrp = "grdatatest"
add-adgroupmember -identity $dataadgrp -members $grpmembers
but it doenst work.
It only works when i do this:
add-adgroupmember -identity $dataadgrp -members user1,user2,user3
this is the error that i get:
Add-ADGroupMember : Cannot find an object with identity: 'user1,user2,user'
Thanks
Regards
Hans
Answer : add-adgroupmember with a variable.
$grpmembers = "user1,user2,user3" should be:
$grpmembers = "user1","user2","user3"
Random Solutions
convert c++ delegate parameters for managed code
Best way to "reimage" office computers so that they all have same OS
How to convert non ansi outer join =* to ansi outer join
can't change password through OWA 2010
How can I edit my Excel list to include only one entry from each domain name
dladm show-link -s -i output
Can WordPress be customized to some degree by manipulating files embeded in the WordPress file path
Can not get mysql to work with IIS7 Drupal and PHP
Should Sys Admins (Domain Admins) also have user accounts?
Outlook 2007 Tasks sending out automatic status reports (updates) when attachments are opened