script - add member to a security group


we have domain controller

dc: adc.com

security group name: hr

ou: employees

user: hr01, hr02, , hr03 

i want create scenario on how add member security group in script , batch using above information

can please me , because need script in application need executed


robert

hi,

>>i want create scenario on how add member security group in script , batch using above information

you refer following sampes:

get security group:

get-adgroup -filter * -properties * |?{.groupcategory -eq 'security' -and .samaccountname -eq 'hr'} 

add members group:

help  add-adgroupmember  -examples 

best regards,

andy


please remember mark replies answers if help.
if have feedback technet subscriber support, contact tnmff@microsoft.com.



Windows Server  >  Directory Services



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file