Within an Hybrid environment , you can notice that a new accepted domain is in the Exchange portal Mail.onmicrosoft.com This domain is going to be used by the on premises to route mail of the account that has been migrated A quick way to view an objects Active Directory targetAddress attribute is through the Active … Continue reading Exchange AD Objects with an Incorrect Target Address Attribute
Category: Active Directory
Active directory automated cleaning Script for disabled users
Dear all ; I just got a little script that could be usefull if you plan to used towards an OU It will Strip the memebership groups, Addresslist exchange membership and ensure is disabled. You can schedule this script at the last time of the day , please make sure you change the OU to … Continue reading Active directory automated cleaning Script for disabled users
How to send messages via power shell to all users on AD
If you ever encounter a situation that you need to send A warning message to all users unprecedented this is a good quick trick! ( Import module activedirecory is required for this ) Code: (Get-ADComputer -Filter *).name | ForEach-Object {msg "*" /Server:$_ "**IMPORTANT NOTICE FROM IT *** Following on from the email sent earlier, please … Continue reading How to send messages via power shell to all users on AD
AD PowerShell Get all Security/ Distribution groups including email assigned
Script for quickly getting any security/distribution list group and if so, they have an email assigned ; #import-module activedirectory $user="Example" $array = Get-ADPrincipalGroupMembership $user | Get-ADGroup -Properties * | select name, description,mail,groupcategory echo "All DL groups and email groups for the user" foreach($i in $array.count){echo $array}
1 line Script to copy AD membership between users
Just copy and paste: It will copy all membership groups from 1 user to another import-Module ActiveDirectory;$copy = Read-host "Enter username to copy from: ";$paste = Read-host "Enter username to copy to: ";get-ADuser -identity $copy -properties memberof | select-object memberof -expandproperty memberof | Add-AdGroupMember -Members $paste;