ADMT CrossForest 2003-2010 Part2 – Bulk Mail Enable MailUser

 

 

Part1 – ADMT Account & Group

Part2

1. Bulk Disable MailUser
image

image

2. Get-User

image

3. Get-User –OrganizationalUnit “Test_OU” –RecipientTypeDetails user

image

4.
[PS] C:\Windows\system32>Get-User -OrganizationalUnit "Tests_Import" -RecipientTypeDetails user | foreach ($_.SAMAccountName) {$Email = $_.SAMAccountName+"@Test.com.tw"; Enable-MailUser -Identity $_ -ExternalEmailAddress $Email -WhatIf}

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User5@Test.com.tw" 的郵件使用者 "Test.com.tw/Test_Import/JS.User5"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User6@Test.com.tw" 的郵件使用者 "Test.com.tw/Test_Import/JS.User6"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User7@Test.com.tw" 的郵件使用者 "Test.com.tw/Test_Import/JS.User7"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User8@Test.com.tw" 的郵件使用者 "Test.com.tw/Test_Import/JS.User8"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User9@Test.com.tw" 的郵件使用者 "Test.com.tw/Test_Import/JS.User9"。

P.S. 管線未執行,因為已經有個管線正在執行。管線不可並行執行。

http://help.outlook.com/zh-tw/140/cc875890.aspx 

image

image

image

5. [PS] C:\Windows\system32>Get-User -OrganizationalUnit "Tests_Import" -RecipientTypeDetails user | foreach ($_.SAMAccountName) {$Email = $_.SAMAccountName+"@Test.com.tw"; Enable-MailUser -Identity $_ -ExternalEmailAddress $Email }

Name                                     RecipientType
----                                     -------------
JS.User4                                 MailUser
JS.User5                                 MailUser
JS.User6                                 MailUser
JS.User7                                 MailUser
JS.User8                                 MailUser
JS.User9                                 MailUser


image


=============*****============
[PS] C:\Windows\system32>$User = Get-User -OrganizationalUnit "Test_Import" -RecipientTypeDetails user

[PS] C:\Windows\system32>$User | foreach ($_.SAMAccountName) {$Email = $_.SAMAccountName+"@Test.com.tw"; Enable-MailUs
er -Identity $_ -ExternalEmailAddress $Email -WhatIf}
WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User10@Test.com.tw" 的郵件使用者 "TestS.com.tw/Tests_Import/JS.User10"

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User3@Test.com.tw" 的郵件使用者 "TestS.com.tw/Tests_Import/JS.User3"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User4@Test.com.tw" 的郵件使用者 "TestS.com.tw/Tests_Import/JS.User4"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User5@Test.com.tw" 的郵件使用者 "TestS.com.tw/Tests_Import/JS.User5"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User6@Test.com.tw" 的郵件使用者 "TestS.com.tw/Tests_Import/JS.User6"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User7@Test.com.tw" 的郵件使用者 "TestS.com.tw/Tests_Import/JS.User7"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User8@Test.com.tw" 的郵件使用者 "TestS.com.tw/Tests_Import/JS.User8"。

WhatIf: 正在啟用外部電子郵件地址為 "smtp:JS.User9@Test.com.tw" 的郵件使用者 "TestS.com.tw/Tests_Import/JS.User9"。

[PS] C:\Windows\system32>$User | foreach ($_.SAMAccountName) {$Email = $_.SAMAccountName+"@Test.com.tw"; Enable-MailUser -Identity $_ -ExternalEmailAddress $Email}

image

6.
[PS] C:\Windows\system32>Get-MailUser -OrganizationalUnit "Tests_Import"

Name                                     RecipientType
----                                     -------------
JS.User4                                 MailUser
JS.User5                                 MailUser
JS.User6                                 MailUser
JS.User7                                 MailUser
JS.User8                                 MailUser
JS.User9                                 MailUser

 

image

Get-User & Get-MailUser

[PS] C:\Windows\system32>Get -User -Identity JS.User10  | fl


RunspaceId               : f76d0203-ca9e-4579-b578-23842539ffe1
IsSecurityPrincipal      : True
SamAccountName           : JS.User10
Sid                      : S-1-5-21-3280115619-3012524529-1380902707-1163
SidHistory               : {S-1-5-21-387562510-2723945668-297530758-1616}
UserPrincipalName        : JS.User10@TestS.com.tw
ResetPasswordOnNextLogon : False
CertificateSubject       : {}
RemotePowerShellEnabled  : True
WindowsLiveID            :
NetID                    :
UserAccountControl       : NormalAccount
OrganizationalUnit       : Tests.com.tw/Tests_Import
IsLinked                 : False
LinkedMasterAccount      :
AssistantName            :
City                     :
Company                  :
CountryOrRegion          :
Department               :
DirectReports            : {}
DisplayName              : JS.User10
Fax                      :
FirstName                :
HomePhone                :
Initials                 :
LastName                 :
Manager                  :
MobilePhone              :
Notes                    :
Office                   :
OtherFax                 : {}
OtherHomePhone           : {}
OtherTelephone           : {}
Pager                    :
Phone                    :
PhoneticDisplayName      :
PostalCode               :
PostOfficeBox            : {}
RecipientType            : User
RecipientTypeDetails     : User
SimpleDisplayName        :
StateOrProvince          :
StreetAddress            :
Title                    :
UMDialPlan               :
UMDtmfMap                : {}
AllowUMCallsFromNonUsers : SearchEnabled
WebPage                  :
TelephoneAssistant       :
WindowsEmailAddress      :
UMCallingLineIds         : {}
SeniorityIndex           :
VoiceMailSettings        : {}
IsValid                  : True
ExchangeVersion          : 0.0 (6.5.6500.0)
Name                     : JS.User10
DistinguishedName        : CN=JS.User10,OU=Tests_Import,DC=TestS,DC=com,
Identity                 : TestS.com.tw/Tests_Import/JS.User10
Guid                     : f6ece772-e9ad-4e0a-98dc-cc7e368b7374
ObjectCategory           : TestS.com.tw/Configuration/Schema/Person
ObjectClass              : {top, person, organizationalPerson, user}
WhenChanged              : 2011/10/12 下午 04:48:10
WhenCreated              : 2011/10/12 下午 02:24:17
WhenChangedUTC           : 2011/10/12 上午 08:48:10
WhenCreatedUTC           : 2011/10/12 上午 06:24:17
OrganizationId           :
OriginatingServer        : NewDC1.TestS.com.tw

=====================================================

[PS] C:\Windows\system32>Get-User -Identity JS.User6 | fl


RunspaceId               : f76d0203-ca9e-4579-b578-23842539ffe1
IsSecurityPrincipal      : True
SamAccountName           : JS.User6
Sid                      : S-1-5-21-3280115619-3012524529-1380902707-1167
SidHistory               : {S-1-5-21-387562510-2723945668-297530758-1612}
UserPrincipalName        : JS.User6@TestS.com.tw
ResetPasswordOnNextLogon : True
CertificateSubject       : {}
RemotePowerShellEnabled  : True
WindowsLiveID            :
NetID                    :
UserAccountControl       : NormalAccount
OrganizationalUnit       : Tests.com.tw/Tests_Import
IsLinked                 : False
LinkedMasterAccount      :
AssistantName            :
City                     :
Company                  :
CountryOrRegion          :
Department               :
DirectReports            : {}
DisplayName              : JS.User6
Fax                      :
FirstName                :
HomePhone                :
Initials                 :
LastName                 :
Manager                  :
MobilePhone              :
Notes                    :
Office                   :
OtherFax                 : {}
OtherHomePhone           : {}
OtherTelephone           : {}
Pager                    :
Phone                    :
PhoneticDisplayName      :
PostalCode               :
PostOfficeBox            : {}
RecipientType            : MailUser
RecipientTypeDetails     : MailUser
SimpleDisplayName        :
StateOrProvince          :
StreetAddress            :
Title                    :
UMDialPlan               :
UMDtmfMap                : {emailAddress:5787376, lastNameFirstName:5787376, firstNameLastName:5787376}
AllowUMCallsFromNonUsers : SearchEnabled
WebPage                  :
TelephoneAssistant       :
WindowsEmailAddress      : JS.User6@Test.com.tw
UMCallingLineIds         : {}
SeniorityIndex           :
VoiceMailSettings        : {}
IsValid                  : True
ExchangeVersion          : 0.10 (14.0.100.0)
Name                     : JS.User6
DistinguishedName        : CN=JS.User6,OU=Tests_Import,DC=TestS,DC=com,DC=tw
Identity                 : TestS.com.tw/Tests_Import/JS.User6
Guid                     : 5b85dbcd-59d5-4cfd-9077-8f1ee0eca2e4
ObjectCategory           : TestS.com.tw/Configuration/Schema/Person
ObjectClass              : {top, person, organizationalPerson, user}
WhenChanged              : 2011/10/12 下午 04:43:45
WhenCreated              : 2011/10/12 下午 02:25:29
WhenChangedUTC           : 2011/10/12 上午 08:43:45
WhenCreatedUTC           : 2011/10/12 上午 06:25:29
OrganizationId           :
OriginatingServer        : NewDC1.TestS.com.tw

========================================

[PS] C:\Windows\system32>Get-MailUser -Identity js.user6 | fl


RunspaceId                             : f76d0203-ca9e-4579-b578-23842539ffe1
DeliverToMailboxAndForward             : False
ExchangeGuid                           : 00000000-0000-0000-0000-000000000000
ArchiveGuid                            : 00000000-0000-0000-0000-000000000000
ArchiveName                            : {}
ArchiveQuota                           : unlimited
ArchiveWarningQuota                    : unlimited
ForwardingAddress                      :
ArchiveDatabase                        :
ArchiveStatus                          : None
DisabledArchiveDatabase                :
DisabledArchiveGuid                    : 00000000-0000-0000-0000-000000000000
ExchangeUserAccountControl             : None
ExternalEmailAddress                   : SMTP:JS.User6@JSFund.com.tw
UsePreferMessageFormat                 : False
MessageFormat                          : Mime
MessageBodyFormat                      : TextAndHtml
MacAttachmentFormat                    : BinHex
ProtocolSettings                       : {}
RecipientLimits                        : unlimited
SamAccountName                         : JS.User6
UseMapiRichTextFormat                  : UseDefaultSettings
UserPrincipalName                      : JS.User6@JSFUNDS.com.tw
WindowsLiveID                          :
MailboxMoveTargetMDB                   :
MailboxMoveSourceMDB                   :
MailboxMoveFlags                       : None
MailboxMoveRemoteHostName              :
MailboxMoveBatchName                   :
MailboxMoveStatus                      : None
ImmutableId                            :
PersistedCapabilities                  : {}
SKUAssigned                            : False
WhenMailboxCreated                     :
LitigationHoldEnabled                  : False
SingleItemRecoveryEnabled              : False
RetentionHoldEnabled                   : False
EndDateForRetentionHold                :
StartDateForRetentionHold              :
RetentionComment                       :
RetentionUrl                           :
LitigationHoldDate                     :
LitigationHoldOwner                    :
RetainDeletedItemsFor                  : 14.00:00:00
CalendarVersionStoreDisabled           : False
UsageLocation                          :
Extensions                             : {}
HasPicture                             : False
HasSpokenName                          : False
AcceptMessagesOnlyFrom                 : {}
AcceptMessagesOnlyFromDLMembers        : {}
AcceptMessagesOnlyFromSendersOrMembers : {}
AddressListMembership                  : {\All Mail Users(VLV), \All Recipients(VLV), \預設全域通訊清單, \所有使用者}
Alias                                  : JS.User6
ArbitrationMailbox                     :
BypassModerationFromSendersOrMembers   : {}
OrganizationalUnit                     : jsfunds.com.tw/JSFunds_Import
CustomAttribute1                       :
CustomAttribute10                      :
CustomAttribute11                      :
CustomAttribute12                      :
CustomAttribute13                      :
CustomAttribute14                      :
CustomAttribute15                      :
CustomAttribute2                       :
CustomAttribute3                       :
CustomAttribute4                       :
CustomAttribute5                       :
CustomAttribute6                       :
CustomAttribute7                       :
CustomAttribute8                       :
CustomAttribute9                       :
DisplayName                            : JS.User6
EmailAddresses                         : {SMTP:JS.User6@JSFund.com.tw}
GrantSendOnBehalfTo                    : {}
ExternalDirectoryObjectId              :
HiddenFromAddressListsEnabled          : False
LastExchangeChangedTime                :
LegacyExchangeDN                       : /o=JSFunds/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/
                                         =JS.User6f9d
MaxSendSize                            : unlimited
MaxReceiveSize                         : unlimited
ModeratedBy                            : {}
ModerationEnabled                      : False
PoliciesIncluded                       : {4ee72cd0-e122-4c85-a5a3-40cbd5ab2bf3, {26491cfc-9e50-4857-861b-0cb8df22b5d7
PoliciesExcluded                       : {}
EmailAddressPolicyEnabled              : True
PrimarySmtpAddress                     : JS.User6@JSFund.com.tw
RecipientType                          : MailUser
RecipientTypeDetails                   : MailUser
RejectMessagesFrom                     : {}
RejectMessagesFromDLMembers            : {}
RejectMessagesFromSendersOrMembers     : {}
RequireSenderAuthenticationEnabled     : False
SimpleDisplayName                      :
SendModerationNotifications            : Always
UMDtmfMap                              : {emailAddress:5787376, lastNameFirstName:5787376, firstNameLastName:5787376}
WindowsEmailAddress                    : JS.User6@JSFund.com.tw
MailTip                                :
MailTipTranslations                    : {}
PartnerObjectId                        : 00000000-0000-0000-0000-000000000000
IsValid                                : True
ExchangeVersion                        : 0.10 (14.0.100.0)
Name                                   : JS.User6
DistinguishedName                      : CN=JS.User6,OU=JSFunds_Import,DC=JSFUNDS,DC=com,DC=tw
Identity                               : JSFUNDS.com.tw/JSFunds_Import/JS.User6
Guid                                   : 5b85dbcd-59d5-4cfd-9077-8f1ee0eca2e4
ObjectCategory                         : JSFUNDS.com.tw/Configuration/Schema/Person
ObjectClass                            : {top, person, organizationalPerson, user}
WhenChanged                            : 2011/10/12 下午 04:43:45
WhenCreated                            : 2011/10/12 下午 02:25:29
WhenChangedUTC                         : 2011/10/12 上午 08:43:45
WhenCreatedUTC                         : 2011/10/12 上午 06:25:29
OrganizationId                         :
OriginatingServer                      : NewDC1.JSFUNDS.com.tw

Comments

Popular posts from this blog

E15 CU3–Update Failed–AD replicated Exceeded the tombstone lifetime.

202301 - Exchange onpreme - PowerShell Serialization Payload Signing

Ticket: RemoteAPP certificate revocation check error