add computers to security group
1 Topicadd computers to security group automatically
I would like to add computers in AD with names that start with desktop to a security group: testgroup. We would like to run this powershell command thru scheduled tasks to run every week so that if someone forgets to add the computer to the security group it will be done. Every computer with name desktop must be aded to that group. I have the following: Get-ADComputer -Filter 'Name -like "desktop*"' -properties displayname | add-adgroupmember -identity "testgroup" When i run this it asks for a members(0) How can we accomplish this? I would like to first test it with desktop1 in stead of *.Solved14KViews0likes12Comments