Exchange Control
Panel (ECP):
Get-EcpVirtualDirectory | fl *url*, ide*
Enable Outlook Anywhere:
Get-MailboxStatistics -Server HNLMBX01 | Where {$_.DisconnectDate -ne $null} | Format-Table DisplayName,DisconnectDate
New-Mailbox -Name "System Administrator" -FirstName "System" -LastName "Administrator" -DisplayName "System Administrator" -Alias "sysadmin" -SamAccountName "sysadmin" -organizationalUnit "Test" -Database "MBXDB3" -UserPrincipalName sysadmin@test.com
New-Mailbox -Name:'Help Desk' -OrganizationalUnit:'corp.mld' -Database:'DB01' -UserPrincipalName:'helpdesk@corp.mld' -Shared
Import-CSV "c:\CreateTest.csv" | ForEach-Object { New-Mailbox -Lastname $_.”LastName” -Name $_."DisplayName" -FirstName $_.”FirstName” -Alias $_.”Alias” -SamAccountName $_.”SamAccountName” -organizationalUnit "OU=Test,OU=Departments,DC=test,DC=ac,DC=in" -Database "MBXDB3" -UserPrincipalName $_.”UserPrincipalName” -Password (ConvertTo-SecureString $_.password -AsPlainText -Force)}
Get-EcpVirtualDirectory | fl *url*, ide*
Set-EcpVirtualDirectory –Identity “TLCAS01\ecp (Default Web
Site)” –ExternalUrl https://mail.testlabs.se/ecp
Autodiscover:
Get-ClientAccessServer | fl *uri*
Set-ClientAccessServer –Identity TLCAS01
–AutoDiscoverServiceInternalUri https://autodiscover...utodiscover.xml
Exchange
ActiveSync (EAS):
Get-ActiveSyncVirtualDirectory | fl *url*, ide*
Set-ActiveSyncVirtualDirectory –Identity
“TLCAS01\Microsoft-Server-ActiveSync (Default Web Site)” –ExternalUrl
https://mail.testlab...rver-ActiveSync
Exchange Web
Services (EWS):
Get-WebServicesVirtualDirectory | fl *url*, ide*
Set-WebServicesVirtualDirectory –Identity “TLCAS01\EWS
(Default Web Site)” –ExternalUrl https://mail.testlab...S/Exchange.asmx
Offline Address
Book (OAB):
Get-OabVirtualDirectory | fl *url*, ide*,pol*
Set-OabVirtualDirectory –Identity “TLCAS01\OAB (Default Web
Site)” –ExternalUrl https://mail.testlabs.se/OAB –PollInterval 60
Outlook Web App
(OWA):
Get-OwaVirtualDirectory | fl *url*, ide*
Set-OwaVirtualDirectory –Identity “TLCAS01\OWA (Default Web
Site)” –ExternalUrl https://mail.testlabs.se/OWA
PowerShell:
Get-PowerShellVirtualDirectory | fl *url*, ide*
Set-PowerShellVirtualDirectory –Identity “TLCAS01\PowerShell
(Default Web Site)” –ExternalUrl https://mail.testlabs.se/powershell
Enable Outlook Anywhere:
Enable-OutlookAnywhere –Server TLCAS01 –ExternalHostname
mail.testlabs.se –InternalHostname tlcas01.testlabs.se
–ExternalClientAuthenticationMethod Basic –InternalClientAuthenticationMethod
Ntlm –IISAuthentication Ntlm –SSLOffloading:$false
Get-OutlookAnywhere –Server TLCAS01
Get-AcceptedDomain
New-AcceptedDomain –Name testlabs.com –DomainName testlabs.com –DomainType Authoritative
Get-EmailAddressPolicy
Get-EmailAddressPolicy | fl
Get-AcceptedDomain
New-AcceptedDomain –Name testlabs.com –DomainName testlabs.com –DomainType Authoritative
Get-EmailAddressPolicy
Get-EmailAddressPolicy | fl
Send & Receive
Connector
Get-ReceiveConnector
Get-ReceiveConnector | fl
Set-ReceiveConnector –Identity “TLCAS01\Default Frontend TLCAS01” –MaxMessageSize 30MB
Get-ReceiveConnector | fl ide*,maxmes*
Get-SendConnector
Get-SendConnector| fl
Get-ReceiveConnector | fl
Set-ReceiveConnector –Identity “TLCAS01\Default Frontend TLCAS01” –MaxMessageSize 30MB
Get-ReceiveConnector | fl ide*,maxmes*
Get-SendConnector
Get-SendConnector| fl
New-SendConnector –Name “Outbound” –AddressSpaces ‘*’
–SourceTransportServers TLMB01 –MaxMessageSize 30MB
New-SendConnector –Name “Outbound” –AddressSpaces ‘*’
–SourceTransportServers TLMB01 –
MaxMessageSize 30MB –DNSRoutingEnabled:$false –SmartHosts
“10.10.10.10”
New-SendConnector –Name “Outbound” –AddressSpaces ‘*’
–SourceTransportServers TLMB01 –
MaxMessageSize 30MB –DNSRoutingEnabled:$false –SmartHosts
“10.10.10.10” –FrontEndProxyEnabled:$True
Get-SendConnector| fl ide*,maxmes*
Get-SendConnector| fl ide*,maxmes*
Globaladdresslis
Get-Globaladdresslist | update-Globaladdresslist
Get-Addresslist | Update-Addresslist
New-GlobalAddressList -Name "gal" -RecipientFilter {(MemberOfGroup -eq 'cn=<GROUP NAME>,OU=Exchange Groups,DC=ggncloud,DC=internal')}
Get-Addresslist | Update-Addresslist
New-GlobalAddressList -Name "gal" -RecipientFilter {(MemberOfGroup -eq 'cn=<GROUP NAME>,OU=Exchange Groups,DC=ggncloud,DC=internal')}
Update-GlobalAddressList -Identity "gal"
update-AddressList -Identity '\All Contacts
Move Request
New-MoveRequest -Identity 'tony@alpineskihouse.com'
-TargetDatabase DB01 –WhatIf
New-MoveRequest -Identity 'tony@alpineskihouse.com' -TargetDatabase DB01 -BadItemLimit 100
New-MoveRequest -Identity 'tony@alpineskihouse.com' -TargetDatabase DB01 -BadItemLimit 200 -AcceptLargeDataLoss
New-MoveRequest -Identity 'Kweku' -PrimaryOnly -TargetDatabase "DB01" -BadItemLimit 100 –AcceptLargeDataLoss
New-MoveRequest -Identity 'tony@alpineskihouse.com' -TargetDatabase DB01 -BadItemLimit 100
New-MoveRequest -Identity 'tony@alpineskihouse.com' -TargetDatabase DB01 -BadItemLimit 200 -AcceptLargeDataLoss
New-MoveRequest -Identity 'Kweku' -PrimaryOnly -TargetDatabase "DB01" -BadItemLimit 100 –AcceptLargeDataLoss
Get-MoveRequest –MoveStatus queued |Get-MoveRequestStatistics | ft -auto alias,Status,TotalMailboxSize,PercentComplete,TargetDatabase,TotalInProgressDuration
Suspend-MoveRequest -Identity Shaji_John@abc.com -SuspendComment "Resume suspended request.after @12 PM Today"
Get-MoveRequest -MoveStatus queued | Suspend-MoveRequest -SuspendComment "Resume suspended request.after completion Domino & Cadista"
Get-MoveRequest -MoveStatus suspended | Resume-MoveRequest
Get-LogonStatistics -Database DB-MBX-2
Get-LogonStatistics -Identity shiva_prasad@abc.com
Get-MoveRequest -MoveStatus failed -TargetDatabase DB-mbx1
Get-MoveRequest –MoveStatus Rajesh_Kajalkar@xyz.com
Get-MoveRequest -TargetDatabase DB-MBX-M8 | Suspend-MoveRequest -SuspendComment "Resume @ 12 PM."
Suspend-MoveRequest -TargetDatabase DB-MBX-M8 -SuspendComment "Resume @ 12 PM."
(Get-MoveRequest –MoveStatus queued).count
(Get-MailboxStatistics -Database DB-MBX-3).Count
Get-Mailbox -Database DB-MBX-G7 | Get-MailboxStatistics | Select-Object DisplayName, ServerName, Database,
TotalItemSize, ItemCount, StorageLimitStatu
TotalItemSize, ItemCount, StorageLimitStatu
MailboxStatistics
Get-MailboxStatistics -Server ggncloud | Where
{$_.DisconnectDate -ne $null} | Format-Table DisplayName,Database
Get-MailboxStatistics -Server HNLMBX01 | Where {$_.DisconnectDate -ne $null} | Format-Table DisplayName,DisconnectDate
Get-MailboxStatistics -Server HNLMBX01 | Where-Object
{$_.DisconnectDate
-gt (Get-Date).AddDays(-7)} | Format-Table
displayName,ServerName,
DatabaseName, TotalItemSize -Autosize
Get-MailboxStatistics -Database db3 | where {$_.LastLogonTime -lt
(Get-Date).AddDays(-7)}} | Format-Table displayName,lastlogontime,
lastloggedonuseraccount,ggncloud
Get-MoveRequestStatistics -database db3
Get-Mailbox -Database db3 | New-MoveRequest -TargetDatabase db4
Get-LogonStatistics -Server ggncloud
DatabaseName, TotalItemSize -Autosize
Get-MailboxStatistics -Database db3 | where {$_.LastLogonTime -lt
(Get-Date).AddDays(-7)}} | Format-Table displayName,lastlogontime,
lastloggedonuseraccount,ggncloud
Get-MoveRequestStatistics -database db3
Get-Mailbox -Database db3 | New-MoveRequest -TargetDatabase db4
Get-LogonStatistics -Server ggncloud
TransportRule
New-TransportRule -Name 'TS Rule1' -Comments 'transportrule'
-Priority '0' -Enabled $true -From 'shailendra@corp.mld' -DeleteMessage $true
-ExceptIfFrom 'john@corp.mld'
DatabaseAvailabilityGroup
Restore-DatabaseAvailabilityGroup –Identity DAG1
–ActiveDirectorySite ggncloud
Remove-DatabaseAvailabilityGroupServer -MailboxServer 'RAKESH' -Identity 'DAG2
Get-MailboxDatabase -Status | Sort-Object name | Format-Table Name, DatabaseSize, AvailableNewMailboxSpace
Get-MailboxDatabase -Identity databasename -Status | Format-Table Name, DatabaseSize, AvailableNewMailboxSpace
Get-DatabaseAvailabilityGroupNetwork -Identity DAG2 | fl name, MapiAccessEnabled
Suspend-MailboxDatabaseCopy -Identity DB1\MBX2 -ActivationOnly
Remove-DatabaseAvailabilityGroupServer -MailboxServer 'RAKESH' -Identity 'DAG2
Get-MailboxDatabase -Status | Sort-Object name | Format-Table Name, DatabaseSize, AvailableNewMailboxSpace
Get-MailboxDatabase -Identity databasename -Status | Format-Table Name, DatabaseSize, AvailableNewMailboxSpace
Get-DatabaseAvailabilityGroupNetwork -Identity DAG2 | fl name, MapiAccessEnabled
Suspend-MailboxDatabaseCopy -Identity DB1\MBX2 -ActivationOnly
Resume-MailboxDatabaseCopy -Identity DB1\MBX2
Set-MailboxServer -Identity
MailboxServer–DatabaseCopyAutoActivationPolicy
Set-MailboxServer -Identity MailboxServer–DatabaseCopyAutoActivationPolicy
Set-MailboxServer -Identity MailboxServer–DatabaseCopyAutoActivationPolicy
DynamicDistributionGroup
New-DynamicDistributionGroup -Name "All Research"
-IncludedRecipients ‘MailboxUsers’
-ConditionalDepartment ‘Research’ -OrganizationalUnit ‘its’-Alias ‘AllResearch’
-ConditionalDepartment ‘Research’ -OrganizationalUnit ‘its’-Alias ‘AllResearch’
new-DynamicDistributionGroup -Name 'DDG-ITS'
-RecipientContainer 'corp.mld/ITS' -IncludedRecipients 'AllRecipients' -OrganizationalUnit
'corp.mld/ITS' -Alias 'DDGits'
Set-DynamicDistributionGroup -Name "All Research"
-MaxReceiveSize 75KB
New Mailbox
New-Mailbox -Name "System Administrator" -FirstName "System" -LastName "Administrator" -DisplayName "System Administrator" -Alias "sysadmin" -SamAccountName "sysadmin" -organizationalUnit "Test" -Database "MBXDB3" -UserPrincipalName sysadmin@test.com
New-Mailbox -Name:'Help Desk' -OrganizationalUnit:'corp.mld' -Database:'DB01' -UserPrincipalName:'helpdesk@corp.mld' -Shared
Import-CSV "c:\CreateTest.csv" | ForEach-Object { New-Mailbox -Lastname $_.”LastName” -Name $_."DisplayName" -FirstName $_.”FirstName” -Alias $_.”Alias” -SamAccountName $_.”SamAccountName” -organizationalUnit "OU=Test,OU=Departments,DC=test,DC=ac,DC=in" -Database "MBXDB3" -UserPrincipalName $_.”UserPrincipalName” -Password (ConvertTo-SecureString $_.password -AsPlainText -Force)}
FirstName | LastName | DisplayName | Alias | SamAccountName | Password | UserPrincipalName |
System | Administrator | System Administrator | sysadmin | sysadmin | nKP5Z6Bz | sysadmin@test.com |