Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

User replication from OU to Security Group

$
0
0

Hi Guys,

 I want to add all my OU members to add into new security group.

Get-ADuser -SearchBase 'OU=India,DC=study,DC=com' -filter *| % {Add-ADGroupMember 'New_Group' -Members $_.DistinguishedName }

If I run this script in power shell, it automatically adding all OU=India users to Security group called 'New_Group'

But Unfortunately when i created a new user in OU=India, Its not replicating to Security group called 'New_Group'

I have to run the above script again to update the newly created OU users to add New_Group.

Is there any script that automate the process when i create the user in OU it should also automatically replicate to security group.

Please Help..Thank you


Ram


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>