bsharath
asked on
Powershell script to check each Security group which are not mail enabled and remove an contacts from those groups.
Hi,
Powershell script to check each Security group which are not mail enabled and remove an contacts from those groups.
The query has to be specific to securit groups and Non mail enabled only.
if mail enabled do nothing.
Log the changes into a csv.
Regards
sharath
Powershell script to check each Security group which are not mail enabled and remove an contacts from those groups.
The query has to be specific to securit groups and Non mail enabled only.
if mail enabled do nothing.
Log the changes into a csv.
Regards
sharath
ASKER
ou want me to run this to test
Get-QADGroup -SearchRoot "OU=groups,DC=domain,DC=co m" -SizeLimit 0 `
-LdapFilter "(!(legacyExchangeDN=*))"
Hope it just check and does not changes
Get-QADGroup -SearchRoot "OU=groups,DC=domain,DC=co
-LdapFilter "(!(legacyExchangeDN=*))"
Hope it just check and does not changes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hope it querys just non Mail enabled Security groups. Even though the OU has Mail enabled Security groups
That's the intent. The version directly above is safe to run, no changes, just reporting.
Chris
ASKER
Ok now to actually run can i remove this
-WhatIf
will that be enough
-WhatIf
will that be enough
Yes, that's all :)
Chris
Chris
ASKER
Thank ou Chris worked perfect
any help with this
https://www.experts-exchange.com/questions/26295206/Script-To-check-All-The-Users-who-is-set-to-Change-The-Password-On-Next-Logon.html
any help with this
https://www.experts-exchange.com/questions/26295206/Script-To-check-All-The-Users-who-is-set-to-Change-The-Password-On-Next-Logon.html
Quest again will be the best bet for things that aren't mail enabled.
Can you check and see if this is returns the right groups please?
Get-QADGroup -SearchRoot "OU=groups,DC=domain,DC=co
-LdapFilter "(!(legacyExchangeDN=*))"
If it does, we can extende that to do away with the contacts with the script below.
Chris
Open in new window