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
Access Program Which Sends An Email
Delphi 6 not recompiling .pas files
datagrid question
How to parse XML string in Oracle procedure ?
installing a UCC certificate with local domains for Exchange 2010 - how does the certificate authority approve them?
Help setting up simple Isolated Wifi VLAN
How to create store procedures and pass values in SQL
Memory Advanced ECC Mode with Mixed DIMM Capacities on Dell R710 PowerEdge
Force Outlook 2003 to use encryption connection to Exchange
Getting own send e-mail in Blackberry