Answers for "active directory user kopieren per powershell"

0

active directory user kopieren per powershell

[regex]$regex = "(?:,)(?'name'((CN|OU=).*))"

Get-ADUser -Filter * -SearchBase "OU=Benutzer,DC=ad2016,DC=faq-o-matic,DC=net" | ForEach-Object {
    $ou = $regex.Match($_.DistinguishedName).Groups['name']

    Write-Host($_.Name + ": $ou")
    $_ | Set-ADUser -Add @{info=$ou}
}
Posted by: Guest on February-19-2021

Code answers related to "active directory user kopieren per powershell"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language