I have a Powershell script that creates three arrays One for OU’s and the other two for Security Groups.<\/p>\n
Advertisement
Then it adds the users it finds in certain OU’s to certain security groups. Problem is that it tries to add users who are already in the security group. Is there a way to check the user it is pulling from the array of OU’s and then check it against the users in the Security Group that is currently being checked in the iteration of the loop? I can provide the scipt I’m using if needed<\/p>","upvoteCount":2,"answerCount":7,"datePublished":"2018-08-01T17:25:37.000Z","author":{"@type":"Person","name":"anthonyowens3","url":"https://community.spiceworks.com/u/anthonyowens3"},"suggestedAnswer":[{"@type":"Answer","text":"
Advertisement
I have a Powershell script that creates three arrays One for OU’s and the other two for Security Groups.<\/p>\n
Then it adds the users it finds in certain OU’s to certain security groups. Problem is that it tries to add users who are already in the security group. Is there a way to check the user it is pulling from the array of OU’s and then check it against the users in the Security Group that is currently being checked in the iteration of the loop? I can provide the scipt I’m using if needed<\/p>","upvoteCount":2,"datePublished":"2018-08-01T17:25:37.000Z","url":"https://community.spiceworks.com/t/modifying-powershell-script-i-have/665468/1","author":{"@type":"Person","name":"anthonyowens3","url":"https://community.spiceworks.com/u/anthonyowens3"}},{"@type":"Answer","text":"