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
error message for HP laserjet 4700 model
Jboss fails to start up with liferay portal application
Unable to access exchange webmail from a remote office
The future of VBA
INSTALL - SQUID getting "pam_auth.c:133: warning: initialization from incompatible pointer type"
asp.net javascript close windows without prompting.
Insert into MySQL Table from MSSQL Insert Trigger
Counting the Character Length of a Long Field - Error
Security Alert when Opening Outlook
HP-UNIX - compressing/zipping files that are 31GB