Skip to content

Commit

Permalink
updated rrecipientDisplayType transform
Browse files Browse the repository at this point in the history
  • Loading branch information
jformacek committed Feb 9, 2022
1 parent 5360ed2 commit 0fb56c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion S.DS.P.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
# ReleaseNotes = ''

# Prerelease string of this module
Prerelease = 'beta2'
Prerelease = 'beta3'

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
RequireLicenseAcceptance = $false
Expand Down
23 changes: 17 additions & 6 deletions Transforms/msExchRecipientDisplayType.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param (

if($FullLoad)
{
# From https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_exchon-mso_o365b/recipient-type-values/7c2620e5-9870-48ba-b5c2-7772c739c651
# From http://blog.petersenit.co.uk/2017/07/msexchrecipientdisplaytype-and.html
Add-Type @'
using System;
public enum RecipientType
Expand All @@ -17,11 +17,22 @@ public enum RecipientType
MailContact = 0x6,
RoomMailbox = 0x7,
EquipmentMailbox = 0x8,
UserMailbox = 1073741824,
ACLableMailboxUser = 1073741824,
MailUniversalSecurityGroup = 1073741833,
RemoteUserMailbox = -2147483642,
RemoteRoomMailbox = -2147481850,
RemoteEquipmentMailbox = -2147481594
SyncedMailboxUser = -2147483642,
SyncedUDGasUDG = -2147483391,
SyncedUDGasContact = -2147483386,
SyncedPublicFolder = -2147483130,
SyncedDynamicDistributionGroup = -2147482874,
SyncedRemoteMailUser = -2147482106,
SyncedConferenceRoomMailbox = -2147481850,
SyncedEquipmentMailbox = -2147481594,
SyncedUSGasUDG = -2147481343,
SyncedUSGasContact = -2147481338,
ACLableSyncedMailboxUser = -1073741818,
ACLableSyncedRemoteMailUser = -1073740282,
ACLableSyncedUSGasContact = -1073739514,
SyncedUSGasUSG = -1073739511
}
'@
}
Expand All @@ -39,7 +50,7 @@ $codeBlock.OnLoad = {
{
foreach($Value in $Values)
{
[RecipientType].GetEnumValues().ForEach({if($Value -eq $_) {$_}})
[RecipientType].GetEnumValues().ForEach({if([int]$Value -eq $_) {$_}})
}
}
}
Expand Down

0 comments on commit 0fb56c7

Please sign in to comment.