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
How do display number as KB, MB, or GB?
CSS Bullets
Setting up DNS records for a small business with a new domain
Mounting Exchange Information Store Freezes Server
Windows Service crashing on one machine, not on the other
2003 terminal server user's have multiple profiles stored on the server
how to enable java in ipad sfari
Whats wrong with my css?
Perl script taking too long
Can I define a document root in html for all the anchors on a page?