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
Training Path
sharepoint foundation 2010 on 32 bit?
Game Development - Story Boarding a Game
How to access a Watchguard Firebox X750e Core
SSIS and variable issues
xml to array
Backup Exec 12 - can't install any updates - gives error 1324 "The path Program Files contains an invalid character"
How to program well
How to generate an HTML file if I've got the HTML body?
can't get iPhone to connect to Exchange 2010 from outside...