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
Multi-threading and row locking on selects
IIS - Host header Value basic question
The 5000n printer will only print to the manual feed tray
Repair exchange database on difference server ?
Cannot connect to database errors
How do I resolve this error "javax.xml.ws.WebServiceEx
ception .... Place the resource correctly in the classpath.?
Windows 7 dual boot after the fact
System Config utility opens at login everytime
how do you read a list of links from a sql database SP and print the list on a aspx .NET ASP page C#
Assigning a GPO to specific users and one Server only ?