Office 365 では各ユーザーに追加のメールアドレス (メールエイリアス) を割り当てることができます。ユーザーアカウントではではないので、ライセンス追加の必要もありません。気軽に試すことができますね。
管理センターで追加してみる
Office 365 管理センターの 「ユーザー」-「アクティブなユーザー」 からアドレスを追加したいユーザーを選択して編集します。
左欄から「電子メールアドレス」を開いて「その他の電子メールアドレス」の部分からメールエイリアスを追加することができます。
相変わらず「その他の電子メールアドレス」だったり「セカンダリ メール アドレス」だったり「メール エイリアス」だったりと なかなか用語が統一されていませんね...。
ともかく、追加したアドレスは Outlook の連絡先なんかでも確認することができます。
PowerShell で確認する
Office 365 管理センターだけで事足りるのですが、PowerShell でも内容を確認しておきます。PowerShell での Exchange Online への接続は以前の記事を参照してください。
Exchange Online への接続
いつもの手順です。
PS C:\> $credential = Get-Credential コマンド パイプライン位置 1 のコマンドレット Get-Credential 次のパラメーターに値を指定してください: Credential PS C:\> $exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps .outlook.com/powershell -Credential $credential -Authentication "Basic" -AllowRedirection 警告: 接続は次の URI にリダイレクトされました。"https://pod51054psh.outlook.com/powershell-liveid?PSVersion=4.0 PS C:\> Import-PSSession $exchangeSession
メールボックス情報の取得
Get-Mailbox コマンドレットでメールボックスの状態が取得できます。
PS C:\> Get-Mailbox kazuaki Name Alias ServerName ProhibitSendQuota ---- ----- ---------- ----------------- kazuaki kazuaki sinpr03mb473 49.5 GB (53,150,220,288 bytes)
取得されるメールボックス オブジェクトにはたくさんのメンバがあります。
PS C:\> Get-Mailbox kazuaki | Get-Member TypeName: Deserialized.Microsoft.Exchange.Data.Directory.Management.Mailbox Name MemberType Definition ---- ---------- ---------- GetType Method type GetType() ToString Method string ToString(), string ToString(string format, System.IFormat... PSComputerName NoteProperty System.String PSComputerName=pod51054psh.outlook.com PSShowComputerName NoteProperty System.Boolean PSShowComputerName=False RunspaceId NoteProperty System.Guid RunspaceId=a672f176-9f1c-4832-a3a3-27dd67836a37 AcceptMessagesOnlyFrom Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... AcceptMessagesOnlyFromDLMembers Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... AcceptMessagesOnlyFromSendersOrMembers Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... AccountDisabled Property System.Boolean {get;set;} AddressBookPolicy Property {get;set;} AddressListMembership Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... AdminDisplayVersion Property System.String {get;set;} AggregatedMailboxGuids Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... Alias Property System.String {get;set;} AntispamBypassEnabled Property System.Boolean {get;set;} ArbitrationMailbox Property {get;set;} ArchiveDatabase Property {get;set;} ArchiveDomain Property {get;set;} ArchiveGuid Property System.Guid {get;set;} ArchiveName Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ArchiveQuota Property System.String {get;set;} ArchiveRelease Property System.String {get;set;} ArchiveState Property System.String {get;set;} ArchiveStatus Property System.String {get;set;} ArchiveWarningQuota Property System.String {get;set;} AuditAdmin Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... AuditDelegate Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... AuditEnabled Property System.Boolean {get;set;} AuditLogAgeLimit Property System.String {get;set;} AuditOwner Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... AuxMailboxParentObjectId Property {get;set;} BypassModerationFromSendersOrMembers Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... CalendarLoggingQuota Property System.String {get;set;} CalendarRepairDisabled Property System.Boolean {get;set;} CalendarVersionStoreDisabled Property System.Boolean {get;set;} ChildAuxMailboxObjectIds Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... CustomAttribute1 Property System.String {get;set;} CustomAttribute10 Property System.String {get;set;} CustomAttribute11 Property System.String {get;set;} CustomAttribute12 Property System.String {get;set;} CustomAttribute13 Property System.String {get;set;} CustomAttribute14 Property System.String {get;set;} CustomAttribute15 Property System.String {get;set;} CustomAttribute2 Property System.String {get;set;} CustomAttribute3 Property System.String {get;set;} CustomAttribute4 Property System.String {get;set;} CustomAttribute5 Property System.String {get;set;} CustomAttribute6 Property System.String {get;set;} CustomAttribute7 Property System.String {get;set;} CustomAttribute8 Property System.String {get;set;} CustomAttribute9 Property System.String {get;set;} Database Property System.String {get;set;} DefaultPublicFolderMailbox Property {get;set;} DeliverToMailboxAndForward Property System.Boolean {get;set;} DisabledArchiveDatabase Property {get;set;} DisabledArchiveGuid Property System.Guid {get;set;} DisplayName Property System.String {get;set;} DistinguishedName Property System.String {get;set;} DowngradeHighPriorityMessagesEnabled Property System.Boolean {get;set;} EmailAddresses Property Deserialized.Microsoft.Exchange.Data.ProxyAddressCollection {get... EmailAddressPolicyEnabled Property System.Boolean {get;set;} EndDateForRetentionHold Property {get;set;} ExchangeGuid Property System.Guid {get;set;} ExchangeSecurityDescriptor Property System.String {get;set;} ExchangeUserAccountControl Property System.String {get;set;} ExchangeVersion Property System.String {get;set;} ExtensionCustomAttribute1 Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ExtensionCustomAttribute2 Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ExtensionCustomAttribute3 Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ExtensionCustomAttribute4 Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ExtensionCustomAttribute5 Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... Extensions Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ExternalDirectoryObjectId Property System.String {get;set;} ExternalOofOptions Property System.String {get;set;} ForwardingAddress Property {get;set;} ForwardingSmtpAddress Property {get;set;} GeneratedOfflineAddressBooks Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... GrantSendOnBehalfTo Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... Guid Property System.Guid {get;set;} HasPicture Property System.Boolean {get;set;} HasSnackyAppData Property System.Boolean {get;set;} HasSpokenName Property System.Boolean {get;set;} HiddenFromAddressListsEnabled Property System.Boolean {get;set;} Id Property System.String {get;set;} Identity Property System.String {get;set;} ImListMigrationCompleted Property System.Boolean {get;set;} ImmutableId Property System.String {get;set;} IncludeInGarbageCollection Property System.Boolean {get;set;} InPlaceHolds Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... IsAuxMailbox Property System.Boolean {get;set;} IsExcludedFromServingHierarchy Property System.Boolean {get;set;} IsHierarchyReady Property System.Boolean {get;set;} IsInactiveMailbox Property System.Boolean {get;set;} IsLinked Property System.Boolean {get;set;} IsMachineToPersonTextMessagingEnabled Property System.Boolean {get;set;} IsMailboxEnabled Property System.Boolean {get;set;} IsPersonToPersonTextMessagingEnabled Property System.Boolean {get;set;} IsResource Property System.Boolean {get;set;} IsRootPublicFolderMailbox Property System.Boolean {get;set;} IsShared Property System.Boolean {get;set;} IsSoftDeletedByDisable Property System.Boolean {get;set;} IsSoftDeletedByRemove Property System.Boolean {get;set;} IssueWarningQuota Property System.String {get;set;} IsValid Property System.Boolean {get;set;} JournalArchiveAddress Property System.String {get;set;} Languages Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... LastExchangeChangedTime Property {get;set;} LegacyExchangeDN Property System.String {get;set;} LinkedMasterAccount Property System.String {get;set;} LitigationHoldDate Property {get;set;} LitigationHoldDuration Property System.String {get;set;} LitigationHoldEnabled Property System.Boolean {get;set;} LitigationHoldOwner Property System.String {get;set;} MailboxContainerGuid Property {get;set;} MailboxLocations Property Deserialized.System.Collections.Generic.List`1[[Microsoft.Exchan... MailboxMoveBatchName Property System.String {get;set;} MailboxMoveFlags Property System.String {get;set;} MailboxMoveRemoteHostName Property System.String {get;set;} MailboxMoveSourceMDB Property {get;set;} MailboxMoveStatus Property System.String {get;set;} MailboxMoveTargetMDB Property {get;set;} MailboxPlan Property System.String {get;set;} MailboxProvisioningConstraint Property {get;set;} MailboxProvisioningPreferences Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... MailboxRelationType Property System.String {get;set;} MailboxRelease Property System.String {get;set;} MailTip Property {get;set;} MailTipTranslations Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ManagedFolderMailboxPolicy Property {get;set;} MaxBlockedSenders Property {get;set;} MaxReceiveSize Property System.String {get;set;} MaxSafeSenders Property {get;set;} MaxSendSize Property System.String {get;set;} MessageTrackingReadStatusEnabled Property System.Boolean {get;set;} MicrosoftOnlineServicesID Property System.String {get;set;} ModeratedBy Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... ModerationEnabled Property System.Boolean {get;set;} Name Property System.String {get;set;} NetID Property System.String {get;set;} ObjectCategory Property System.String {get;set;} ObjectClass Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ObjectState Property System.String {get;set;} Office Property System.String {get;set;} OfflineAddressBook Property {get;set;} OrganizationalUnit Property System.String {get;set;} OrganizationId Property System.String {get;set;} OriginatingServer Property System.String {get;set;} PersistedCapabilities Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... PoliciesExcluded Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... PoliciesIncluded Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... PrimarySmtpAddress Property System.String {get;set;} ProhibitSendQuota Property System.String {get;set;} ProhibitSendReceiveQuota Property System.String {get;set;} ProtocolSettings Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... QueryBaseDN Property {get;set;} QueryBaseDNRestrictionEnabled Property System.Boolean {get;set;} RecipientLimits Property System.String {get;set;} RecipientType Property System.String {get;set;} RecipientTypeDetails Property System.String {get;set;} ReconciliationId Property {get;set;} RecoverableItemsQuota Property System.String {get;set;} RecoverableItemsWarningQuota Property System.String {get;set;} RejectMessagesFrom Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... RejectMessagesFromDLMembers Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... RejectMessagesFromSendersOrMembers Property Deserialized.Microsoft.Exchange.Data.Directory.ADMultiValuedProp... RemoteAccountPolicy Property {get;set;} RemoteRecipientType Property System.String {get;set;} RequireSenderAuthenticationEnabled Property System.Boolean {get;set;} ResetPasswordOnNextLogon Property System.Boolean {get;set;} ResourceCapacity Property {get;set;} ResourceCustom Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... ResourceType Property {get;set;} RetainDeletedItemsFor Property System.String {get;set;} RetainDeletedItemsUntilBackup Property System.Boolean {get;set;} RetentionComment Property System.String {get;set;} RetentionHoldEnabled Property System.Boolean {get;set;} RetentionPolicy Property System.String {get;set;} RetentionUrl Property System.String {get;set;} RoleAssignmentPolicy Property System.String {get;set;} RoomMailboxAccountEnabled Property {get;set;} RulesQuota Property System.String {get;set;} SamAccountName Property System.String {get;set;} SCLDeleteEnabled Property {get;set;} SCLDeleteThreshold Property {get;set;} SCLJunkEnabled Property {get;set;} SCLJunkThreshold Property {get;set;} SCLQuarantineEnabled Property {get;set;} SCLQuarantineThreshold Property {get;set;} SCLRejectEnabled Property {get;set;} SCLRejectThreshold Property {get;set;} SendModerationNotifications Property System.String {get;set;} ServerLegacyDN Property System.String {get;set;} ServerName Property System.String {get;set;} SharingPolicy Property System.String {get;set;} SimpleDisplayName Property System.String {get;set;} SingleItemRecoveryEnabled Property System.Boolean {get;set;} SKUAssigned Property System.Boolean {get;set;} SourceAnchor Property System.String {get;set;} StartDateForRetentionHold Property {get;set;} StsRefreshTokensValidFrom Property {get;set;} ThrottlingPolicy Property {get;set;} UMDtmfMap Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... UMEnabled Property System.Boolean {get;set;} UnifiedMailbox Property {get;set;} UsageLocation Property System.String {get;set;} UseDatabaseQuotaDefaults Property System.Boolean {get;set;} UseDatabaseRetentionDefaults Property System.Boolean {get;set;} UserCertificate Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... UserPrincipalName Property System.String {get;set;} UserSMimeCertificate Property Deserialized.Microsoft.Exchange.Data.MultiValuedProperty`1[[Syst... WhenChanged Property System.DateTime {get;set;} WhenChangedUTC Property System.DateTime {get;set;} WhenCreated Property System.DateTime {get;set;} WhenCreatedUTC Property System.DateTime {get;set;} WhenMailboxCreated Property System.DateTime {get;set;} WhenSoftDeleted Property {get;set;} WindowsEmailAddress Property System.String {get;set;} WindowsLiveID Property System.String {get;set;}
ちょっと多すぎますね。
プライマリ電子メールアドレスの確認
PrimarySmtpAddress プロパティで確認することができます。
PS C:\> (Get-Mailbox kazuaki).PrimarySmtpAddress kazuaki@**********
すべての電子メールアドレスの確認
同じく EmailAddresses プロパティで確認できます。
PS C:\> (Get-Mailbox kazuaki).EmailAddresses smtp:kazuakix@********** SIP:kazuaki@********** SMTP:kazuaki@********** smtp:kazuaki@********.onmicrosoft.com
先ほど追加したメール エイリアスも表示されていました。
メール エイリアスを削除する
Set-Mailbox コマンドレットでメールエイリアスの追加・削除や、プライマリ電子メールアドレスの変更ができます。
試しに追加したメール エイリアスを削除してみます。
Set-Mailbox kazuaki -EmailAddresses @{Remove="kazuakix@**********"}
特に何のメッセージも出てきませんが、再度 Get-Mailbox を実行するとメール エイリアスが削除されている事がわかります。
後始末
いつものように後始末をして終了します。
PS C:\> Remove-PSSession $exchangeSession