我想找出所有用户目前可以访问日历。 我找遍了互联网和最接近的答案我是这样的:
(get-mailbox) | foreach{Get-Mailboxfolderpermission (($_.PrimarySmtpAddress)+":\calendar") -user happyboy -ErrorAction SilentlyContinue} |select identity, user, accessrights
但是,显示并没有真正表现出实际的身份是实际的邮箱这happyboy(上图)可以访问。 该显示器是这样的:
Identity User AccessRights
-------- ---- ------------
HappyBoy HappyBoy {Reviewer}
HappyBoy HappyBoy {LimitedDetails}
HappyBoy HappyBoy {Editor}
HappyBoy HappyBoy {Editor}
HappyBoy HappyBoy {Owner}
HappyBoy HappyBoy {Editor}
我期待这样的事情:
Identity User AccessRights
-------- ---- ------------
FunnyMan HappyBoy {Reviewer}
PrettyGirl HappyBoy {LimitedDetails}
BadBoy HappyBoy {Editor}
LuckyBoy HappyBoy {Editor}
SadGirl HappyBoy {Owner}
LovelyGirl HappyBoy {Editor}
我们可以通过修改脚本来实现这一目标?