Skip to content

Instantly share code, notes, and snippets.

@Christwiest Christwiest/Sync-ROID.ps1
Last active May 25, 2017

What would you like to do?
Function fill-roid-group
Param (
Write-Progress -Activity "Loading AD module"
Import-Module ActiveDirectory
Write-Progress -Activity "Getting group members"
$users = get-ADgroupmember -Identity "$group" -Recursive | get-aduser | Where { $_.Enabled -eq $True }
foreach ($user in $users)
Write-Progress -Activity "Filling extensionAttribute 10 for $user"
$usersam = $user.samaccountname
Set-ADUser -Identity $usersam -Replace @{ extensionAttribute10 = "IdentityDirector" }
fill-roid-group -Group "Enter-your-security-group"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.