In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Douzi encountered a small problem today when he found that there was no email configured in the member group of an Office365 mail group, which led to individual users not receiving email. To prevent this from happening again, all mail groups need to be checked. The problem is that the mail group may have multiple groups nested. If you are too tired to read it manually, write a small script to scan it.
Because it is a nested group, it is natural to think of recursion. Specify a mail group and scan the member to see if the member is configured with an email address. If the member happens to be another group, call yourself and repeat the above steps
Function get-member {[CmdletBinding ()] [Alias ()] [OutputType ([int])] Param (# Param1 help description [Parameter (Mandatory=$true, ValueFromPipelineByPropertyName=$true, ValueFromPipeline=$true) Position=0)] [string] $name) Begin {} Process {$a=Get-DistributionGroupMember $name-ErrorAction SilentlyContinue if ($a-eq $null) {return} foreach ($b in $a) {if (($b.Recipienttype-eq'Usermailbox')-or ($b.Recipienttype-eq' MailContact')- Or ($b.Recipienttype-eq 'User') {write-host $b.name-ForegroundColor DarkYellow} else {if ($b.primarysmtpaddress-eq "") {write-host $b.name-ForegroundColor red} else { Write-host $b.name-ForegroundColor Cyan get-member $b.name}} End {}}
Briefly test my function, and the results are as follows: ordinary user (× × ×), group bound with mail (blue), group without bound message (red)
Success.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.