Microsoft Exchange 2013-2016 Most Value – Useful Commands

EXCHANGE 2010-2013-2016 Useful EMS Powershell Commands

Get-help New-Command

AUTO DISCOVER

Set-ClientAccessService -Identity MBG-EX01 -AutoDiscoverServiceInternalUri https://autodiscover.mustbegeek.com/Autodiscover/Autodiscover.xml
Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri "https://autodiscover.litwareinc.com/autodiscover/autodiscover.xml"
Get-ClientAccessServer | Select-Object Name, AutoDiscoverServiceInternalUri | Format-List
Get-OutlookAnywhere | fl Identity,*host*,*auth*
Get-OutlookProvider  | fl Identity,Server,CertPrincipalName
Get-OutlookProvider
Set-OutlookProvider EXPR -CertPrincipalName msstd:*.itmakale.com
Set-OutlookProvider EXCH -CertPrincipalName msstd:*.itmakale.com
Set-OutlookProvider WEB -CertPrincipalName msstd:*.itmakale.com

EDGE SERVER INSTALLATION

Get-help New-EdgeSubscription
Get-SendConnector
Get-ReceiveConnector
Get-TransportConfig
Get-TransportConfig | Format-List InternalSMTPServers
New-EdgeSubscription –FileName “FilepathFilename.xml
New-EdgeSubscription -FileData ([byte[]]$(Get-Content -Path “ FilepathFilename.xml” -Encoding Byte -ReadCount 0)) -Site “ADSiteName”
Set-TransportConfig –InternalSMTPServers IP, IP
Set-TransportConfig -InternalSMTPServers 192.168.0.115
Start-EdgeSynchronization -Server MailboxserverFQDN -TargetServer EDGEServerFQDN -ForceFullSync

EDGE-CONFIG

smarthostconnectordelivery
Get-TransportConfig
Get-TransportConfig | Format-List InternalSMTPServers
InternalSMTPServers : {192.168.1.203}
Set-TransportConfig -InternalSMTPServers 192.168.0.105
Get-ReceiveConnector | Set-ReceiveConnector -ProtocolLoggingLevel verbose
Get-ReceiveConnector | Set-ReceiveConnector -ConnectionTimeout 00:20:00
Get-ReceiveConnector | Set-ReceiveConnector -TarpitInterval 00:00:00
Get-ReceiveConnector | Set-ReceiveConnector -MaxAcknowledgementDelay 00:00:00
Get-ReceiveConnector | Set-ReceiveConnector -MaxInboundConnectionPerSource 500
Get-ReceiveConnector | Set-ReceiveConnector -MaxInboundConnectionPerSource unlimited

ECP

https://excmbx1/ECP?ExchClientVer=15.1
https://exchange2013/ecp?ExchClientVer=15
https://FQDNofTheExchangeServer/ECP?ExchClientVer=15.1
Get-MailboxDatabase
Get-Mailbox -Database "Mailbox Database 0721629242"
Get-Mailbox -Database "SystemMailboxDatabase-1" -Arbitration
Get-Mailbox -Database "Mailbox Database 0721629242" -AuditLog
Get-Mailbox -Database "UserMailboxDatabase-1" -Arbitration | New-MoveRequest -TargetDatabase "SystemMailboxDatabase-1
Get-MoveRequest | where {$_.Status -eq "Completed"}
Get-Mailbox -identity "Discovery Search Mailbox" | fl database
New-MoveRequest -Identity "Discovery Search Mailbox" -Priority High -TargetDatabase "SystemMailboxDatabase-1
Get-MoveRequestStatistics -MoveRequestQueue "UsersMailboxDatabase-1"
Get-Mailbox -Database "Mailbox Database 2139305877" -Archive
Get-Mailbox -Database "Mailbox Database 2139305877" -PublicFolder
Get-Mailbox -Database "Mailbox Database 2139305877" -Arbitration
Get-Mailbox -Database "Mailbox Database 2139305877" -AuditLog

Get-Mailbox -Database "Mailbox Database 2139305877" -AuditLog | New-MoveRequest -TargetDatabase "SystemMailbox01"
Get-Mailbox -Database "UserMailboxDatabase-1" -Arbitration | New-MoveRequest -TargetDatabase "SystemMailboxDatabase-1

ADSI EDITr

CN=EXC2013,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=CORPDOMAIN,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=CORPDOMAIN,DC=COM
Move-ADDirectoryServerOperationMasterRole -Identity “Target-DC” -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator

Database=Mailbox Quouta

Get-Mailbox -Database UsersMailboxDatabase-1 | .\Set-MailboxQuota.ps1 -UseDatabaseDefaults

Regional Settings

Get-Mailbox "test.user" | Set-MailboxRegionalConfiguration -Language tr-TR -DateFormat "d.M.yyyy" -TimeFormat "HH:mm" -TimeZone "Turkey Standard Time"
Get-MailboxRegionalConfiguration "test.user"
Get-Mailbox -OrganizationalUnit "OU Users" | Get-MailboxRegionalConfiguration | fl Identity,Language,DateFormat,TimeFormat,TimeZone

Exchange File Database Repair

Eseutil /R E01 /l G:\UsersMailBoxDatabase-1 /d G:\UsersMailBoxDatabase-1
D:\MailBoxDatastore\UsersMailBoxDatastore-1>eseutil /mh UsersMailBoxDatastore-1.edb
D:\MailBoxDatastore\UsersMailBoxDatastore-1>eseutil /p UsersMailBoxDatastore-1.edb
https://technet.microsoft.com/en-us/library/ee332351(v=exchg.160).aspx

Move Statistic

Get-MoveRequestStatistics -MoveRequestQueue "UsersMailboxDatabase-1"
Get-MoveRequest | where {$_.Status -eq "Completed"}
Get-MoveRequest | where {$_.Status -eq "InProgress"}
Get-MoveRequest | where {$_.Status -eq "FailedOther"}
Get-MoveRequestStatistics -MoveRequestQueue "UsersMailboxDatabase-1" | FL DisplayName,StatusDetail,TotalMailboxSize,TotalArchiveSize,PercentComplete
Get-MoveRequestStatistics -MoveRequestQueue "UsersMailboxDatabase-1" | where {$_.Status -eq "InProgress"}

csv move request

EmailAddress,",TargetDatabase",",TargetArchiveDatabase"
username.surname@exchangedomain.com,UsersMailBoxDatabase-1,

EXCHANGE MOVE REQUEST

 

Get-MoveRequest -MoveStatus Failed|get-moverequeststatistics|select DisplayName,SyncStage,Failure,Message,PercentComplete,largeitemsencountered,baditemsencountered|ft -autosize
Get-MoveRequest -MoveStatus Completed | Remove-MoveRequest
Get-MoveRequest -MoveStatus Failed | Remove-MoveRequest
Get-MoveRequest -MoveStatus Failed | Resume-MoveRequest

Move Statistic & Continue & Remove

Get-MoveRequest | where {$_.Status -eq "Failed"} | Set-MoveRequest -BadItemLimit 100 -AcceptLargeDataLoss
Set-MoveRequest -Identity username.surname@exchange.com -BadItemLimit 500
Get-MoveRequestStatistics -MoveRequestQueue "UsersMailBoxDatabase-3" | Set-MoveRequest -BadItemLimit 100 -AcceptLargeDataLoss
get-moverequest 'Jackie Chan'|set-moverequest –baditemlimit 10
resume-moverequest 'Jackie Chan'
Resume-MoveRequest ''
Get-MoveRequest | where {$_.Status -eq "Failed"} | Resume-MoveRequest
Get-MoveRequest | where {$_.Status -eq "Completed"} | Remove-MoveRequest
Get-MoveRequest | where{$_.Status -eq "FailedOther"} | Resume-MoveRequest
Get-MoveRequest | where {$_.Status -eq "Failed"} | Resume-MoveRequest
Get-MoveRequest | where {$_.Status -eq "Queued"}

Remove-MoveRequest -Identity username
New-MoveRequest -Identity "username" -TargetDatabase "MAILDatabase" -BatchName "Username" -BadItemLimit "200"
New-MoveRequest -Identity 'username.surname' -Priority High -TargetDatabase "UsersMailBoxDatabase-3"
Get-MoveRequestStatistics -MoveRequestQueue "UsersMailBoxDatabase-2" | New-MoveRequest -TargetDatabase "UsersMailBoxDatabase-1"
Get-Mailbox -Database "USERS-3" | Remove-MoveRequest
Get-mailbox -identity administrator | fl database

XCOPY-EXCHANGE DATABASE FILE COPY ANOTHER DISK-VOLUME
xcopy “D:\program files\exchsrvr\mdbdata\” “E:\ExchangeOfflineBackup” /E /D /V /C /I /F /H /R /K /O /Y

VMWARE

isolation.tools.copy.disable FALSE
isolation.tools.paste.disable FALSE

SPECIFIC USER MAILBOX DATABASE MOVE

Get-mailbox -identity username.surname | fl database
Remove-MoveRequest -Identity username.surname
New-MoveRequest -Identity 'username.surname' -Priority High -TargetDatabase "UsersMailBoxDatabase-3"
Get-MoveRequest | where {$_.Status -eq "InProgress"}
Get-MoveRequestStatistics -MoveRequestQueue "UsersMailboxDatabase-3" | where {$_.Status -eq "InProgress"}
Remove-MoveRequest -Identity username.surname -Confirm:$true:A

CREATE DATABASE & MOVE

New-MailboxDatabase -SERVER EXCH2013 -Name "SystemMailboxDatabase" -EdbFilePath "D:\MailBoxDatastore\SystemMailboxDatabase\SystemMailboxDatabase.edb" –LogFolderpath "D:\MailBoxDatastore\SystemMailboxDatabase\"
Move-Databasepath "UsersMailBoxDatabase-3" -EdbFilePath "D:\MailBoxDatabase\UsersMailBoxDatabase-3\UsersMailBoxDatabase-3.edb" –LogFolderpath "D:\MailBoxDatabase\UsersMailBoxDatabase-3"
Move-Databasepath "Mailbox Database 1871820163" -EdbFilePath "D:\MailBox\Mailbox Database 1871820163\Mailbox Database 1871820163.edb" -LogFolderpath "D:\MailBox\Mailbox Database 1871820163"
Move-Databasepath “MDB1” –EdbFilepath “M:\DB\MDB1\databases\mdb1.edb” –LogFolderpath “M:\DB\MDB1\logs\”
Get-MoveRequest -MoveStatus Failed -SourceDatabase "VIP"
Get-MoveRequest -MoveStatus Queue -SourceDatabase "VIP"
Get-MoveRequest -MoveStatus InProgress -SourceDatabase "VIP"

Get-MoveRequestStatistics -MoveRequestQueue "UsersMailBoxDatastore-1"
Get-MoveRequestStatistics -MoveRequestQueue "SystemMailboxDatabase"

PST Export-Request

New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "<user name or alias>"
 New-MailboxExportRequest -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst
 Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
 Get-MailboxExportRequest -Status Failed | Remove-MailboxExportRequest
 Exchange ECP Connect
https://EXCxcmbx1/ecp?ExchClientver=15
https://EXCxcmbx1/ecp?ExchClientver=14
https://autodiscover.itmakale.com.tr/ecp/?mkt=en-us

MailBox Database-Get All Database Type

Get-MailboxDatabase -IncludePreExchange2013
Get-MailboxDatabase -server EXCXC2013
Get-MailboxDatabase "DatabaseName" | FL Name,Path
Mount-Database -Identity EXCXC2013\UsersMailBoxDatastore-1
Mount-Database "UsersMailBoxDatastore-1"
Get-mailbox -identity excadmin | fl database
Get-Mailbox | Sort database, name | Format-Table name, database
Get-Mailbox –Database <DBNAME> | Get-MailboxStatistics | FT Displayname,DisconnectReason
New-MoveRequest -Identity 'excadmin' -Priority High -TargetDatabase "UsersMailboxDatastore-1"

MailBox Database-Get All DatabaseComponent

Get-Mailbox -Database "SystemMailboxDatabase" -Arbitration
Get-Mailbox -Database "UserMailboxDatabase" -Arbitration
Get-Mailbox -Arbitration | FL Name,DisplayName,ServerName,Database,AdminDisplayVersion
Get-MoveRequestStatistics -MoveRequestQueue "UserMailboxDatabase-1" | FL DisplayName,StatusDetail,TotalMailboxSize,TotalArchiveSize,PercentComplete
Get-MoveRequestStatistics -MoveRequestQueue "UserMailBoxDatabase-3"
Get-MoveRequest -MoveStatus InProgress -TargetDatabase "UserMailboxDatabase"
Get-MoveRequest -MoveStatus InProgress -SourceDatabase "VIPYONETICI"

Arbitration-System MailBox Database

Get-Mailbox -Arbitration | FL Name,DisplayName,ServerName,Database,AdminDisplayVersion
Get-Mailbox -Database "UserMailboxDatabase-1" -Arbitration | New-MoveRequest -TargetDatabase "SystemMailboxDatabase"
Get-Mailbox -Database "SystemMailboxDatabase-1" -Arbitration
Get-Mailbox -Database "Discovery Search Mailbox?" | New-MoveRequest -TargetDatabase "SystemMailboxDatabase-1"

Move-Status

Get-MoveRequest | ? {$_.Status -eq "Completed" }
Get-MoveRequest | ? {$_.Status -eq "Inprogress" }

Exchange Value Operating Commands

Set Mailbox Database Users Qouta Limits
Get-Mailbox -Database " " -Arbitration | New-MoveRequest -TargetDatabase "SystemMailboxDatabase"
Get-Mailbox -Database "Mailbox Database 0032940952" | New-MoveRequest -TargetDatabase "UserMailboxDatabase-1"
Get-Mailbox -database "Mailbox Database 0032940952"
Get-Mailbox -Database "SystemMailboxDatabase" | New-MoveRequest -TargetDatabase "UserMailboxDatabase"
Get-MoveRequestStatistics -MoveRequestQueue "SystemMailboxDatabase"
Get-MoveRequestStatistics -MoveRequestQueue "UserMailboxDatabase"
Get-MoveRequestStatistics -MoveRequestQueue "UserMailboxDatabase-1"
Get-Mailbox -Database "SystemMailboxDatabase"
Get-Mailbox -Database "UserMailboxDatabase"

Get-Mailbox -Database "USERS-3" | Remove-MoveRequest
Get-Mailbox -Database "USERS-3" | Remove-MoveRequest

Enable-Mailbox excadmin@domain.com -Database "UserMailboxDatabase"

Get-MoveRequest -TargetDatabase UserMailboxDatabase
Get-MoveRequest -BatchName "usermigration1"
Get-MoveRequest -Identity 'tony@contoso.com'
Get-MoveRequest -MoveStatus 'Completed'
Get-MoveRequest

SAMPLE MOVE(SOURCE & TARGET MATRIX)

Get-MoveRequest -MoveStatus Queued -SourceDatabase "USERS-1"
Get-MoveRequest -MoveStatus InProgress -TargetDatabase "UserMailboxDatabase-1"
Get-Mailbox -Database "USERS-1"
Get-Mailbox -Database "USERS-1" | New-MoveRequest -TargetDatabase "UserMailboxDatabase-2"
Get-MoveRequest -MoveStatus Failed | Resume-MoveRequest
Get-MoveRequestStatistics -MoveRequestQueue "USERS-1"

Mailbox Store-DatabasePath

Move-DatabasePath -Identity MyDatabase01 -EdbFilePath C:\NewFolder\MyDatabase01.edb
Move-DatabasePath -Identity "SystemMailboxDatabase" -EdbFilePath E:\Mailbox\SystemMailboxDatabase\SystemMailboxDatabase.edb
Move-Databasepath "UsersMailBoxDatastore-1" –LogFolderpath "D:\MailBoxDatastore\UsersMailBoxDatastore-1"
Move-Databasepath "UsersMailBoxDatastore-1" -EdbFilePath "D:\MailBoxDatastore\UsersMailBoxDatastore-1\UsersMailBoxDatabase-1.edb" –LogFolderpath "D:\MailBoxDatastore\UsersMailBoxDatastore-1"
Move-Databasepath "SystemMailboxDatabase" –LogFolderpath "D:\MailBoxDatastore\SystemMailboxDatabase"

Mail Box Store-Move Database All Mail Box Another Database

Get-Mailbox -Database "USERS-1" | New-MoveRequest -TargetDatabase "UserMailboxDatabase-1"
Get-MoveRequestStatistics -MoveRequestQueue "UserMailboxDatabase-1"
Move-DatabasePath -Identity "UsersMailBoxDatastore-3" -EdbFilePath F:\MailBoxDatastore-3\UsersMailBoxDatastore-3\UsersMailBoxDatastore-3.edb
Move-Databasepath "UsersMailBoxDatabase-3" -EdbFilePath D:\MailBoxDatabase\UsersMailBoxDatabase-3\ –LogFolderpath "D:\MailBoxDatabase\UsersMailBoxDatabase-3"

User Mailbox – Exchange Specific User Migrate

New-MoveRequest -Identity 'excadmin' -Priority High -TargetDatabase "UserMailboxDatabase-1"
New-MoveRequest -Identity 'excadmin' -Priority High -TargetDatabase 'VIP Mailboxes'
New-MoveRequest -Identity excadmin -TargetDatabase "SystemMailboxDatabase"
New-MoveRequest -Identity “user@domain.com” -TargetDatabase “DB1” -Priority emergency
Remove-MoveRequest -Identity excadmin
Get-MoveRequest -MoveStatus Completed | Remove-MoveRequest
Resume-MoveRequest -Identity "Tony@contoso.com"
Get-MoveRequest -MoveStatus Failed | Resume-MoveRequest
Get-MoveRequest -MoveStatus Suspended | Get-MoveRequestStatistics |Where {$_.Message -like "resume after 10 P.M."} | Resume-MoveRequest

Exchange Move Database Commands

command Get-Mailbox -Database <Database ID> -Archive. To get a list of all public folder mailboxes in this database,
run the command Get-Mailbox -Database <Database ID> -PublicFolder. To get a list of all arbitration mailboxes in this database,
run the command Get-Mailbox -Database <Database ID> -Arbitration. To get a list of all Audit mailboxes in this database,
run the command Get-Mailbox -Database <Database ID> -AuditLog. To disable a non-arbitration mailbox so that you can delete the mailbox database,
run the command Disable-Mailbox <Mailbox ID>. To disable an archive mailbox so you can delete the mailbox database,
run the command Disable-Mailbox <Mailbox ID> -Archive. To disable a public folder mailbox so that you can delete the mailbox database,
run the command Disable-Mailbox <Mailbox ID> -PublicFolder. To disable a Audit mailbox so that you can delete the mailbox database,
run the command Get-Mailbox -AuditLog | Disable-Mailbox. Arbitration mailboxes should be moved to another server; to do this,
run the command New-MoveRequest <parameters>. If this is the last server in the organization,
run the command Disable-Mailbox <Mailbox ID> -Arbitration -DisableLastArbitrationMailboxAllowed to disable the arbitration mailbox. Mailbox plans should be moved to another server; to do this,
run the command Set-MailboxPlan <MailboxPlan ID> -Database <Database ID

Exchange Setup- Installation Commands

PowerShell
Import-Module ServerManager
2010---Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart
2013---C:\ Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation, RSAT-ADDS
IIS LOAD BALANCER Install-WindowsFeature FileAndStorage-Services,Storage-Services,Web-Server,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-Static-Content,Web-Health,Web-Http-Logging,Web-Request-Monitor,Web-Http-Tracing,Web-Performance,Web-Stat-Compression,Web-Security,Web-Filtering,Web-App-Dev,Web-Net-Ext,Web-Mgmt-Tools,Web-Mgmt-Console,NET-Framework-Features,NET-Framework-Core,NET-Framework-45-Features,NET-Framework-45-Core,NET-Framework-45-ASPNET,NET-WCF-Services45,RSAT,RSAT-Feature-Tools,RSAT-SNMP,FS-SMB1,SNMP-Service,Telnet-Client,Telnet-Server,User-Interfaces-Infra,Server-Gui-Mgmt-Infra,Server-Gui-Shell,PowerShellRoot,PowerShell,PowerShell-V2,PowerShell-ISE,WoW64-Support -Source d:\sources\sxs
cmd
setup /prepareshema
setup /preparead
setup /preparedomain

Sonrasinda DVD kuruluma geçilir

Setup /help:PrepareTopology
Setup /help:Install

Setup /p /IAcceptExchangeServerLicenseTerms
Setup /ps /IAcceptExchangeServerLicenseTerms
Setup /pd /IAcceptExchangeServerLicenseTerms

Exchange Mailbox Replication Fast

MaxActiveMovesPerSourceMDB = "20"
MaxActiveMovesPerTargetMDB = "20"
MaxActiveMovesPerSourceServer = "100"
MaxActiveMovesPerTargetServer = "100"
MaxTotalRequestsPerMRS = "100"
ExportBufferSizeKB = "512"

Exchange Server ClearLog

Set-Executionpolicy RemoteSigned
$days=0
$IISLogPath="C:\inetpub\logs\LogFiles\"
$ExchangeLoggingPath="C:\Program Files\Microsoft\Exchange Server\V15\Logging\"
$ETLLoggingPath="C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\ETLTraces\"
$ETLLoggingPath2="C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\Logs"
$ETLLoggingPath3="C:\Program Files\Microsoft\Exchange Server\V15\Logging\Monitoring\Monitoring\MSExchangeHMWorker\ActiveMonitoringTraceLogs\"
$ETLLoggingPath4="C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpReceive\"
$ETLLoggingPath5="C:\Windows\Temp\"
Function CleanLogfiles($TargetFolder)
{
 if (Test-Path $TargetFolder) {
 $Now = Get-Date
 $LastWrite = $Now.AddDays(-$days)
 $Files = Get-ChildItem $TargetFolder -Include .tmp,.log,.blg, .etl, .txt -Recurse | Where {$_.LastWriteTime -le "$LastWrite"}
 foreach ($File in $Files)
 {Write-Host "Deleting file $File" -ForegroundColor "white"; Remove-Item $File -ErrorAction SilentlyContinue | out-null}
 }
Else {
 Write-Host "The folder $TargetFolder doesn't exist! Check the folder path!" -ForegroundColor "white"
 }
}
CleanLogfiles($IISLogPath)
CleanLogfiles($ExchangeLoggingPath)
CleanLogfiles($ETLLoggingPath)
CleanLogfiles($ETLLoggingPath2)
CleanLogfiles($ETLLoggingPath3)
CleanLogfiles($ETLLoggingPath4)
CleanLogfiles($ETLLoggingPath5)

Kullanıcı mailbox’larındaki hatalı time zone’larını düzenlemek için aşağıdaki scriptler kullanılabilir.

Get-Mailbox -OrganizationalUnit "careexchange.in/Users” | Set-MailboxRegionalConfiguration -Language en-GB -DateFormat "dd/MM/yyyy" -TimeFormat "HH:mm" -TimeZone "W. Europe Standard Time"
Get-MailboxRegionalConfiguration "name.surname"
Get-Mailbox -OrganizationalUnit "itmakale.com.tr/BT”
Get-Mailbox -OrganizationalUnit "itmakale.com.tr/BT” | Get-MailboxRegionalConfiguration | fl TimeZone
Get-Mailbox -OrganizationalUnit "itmakale.com.tr/BT" | Set-MailboxRegionalConfiguration -TimeZone "Turkey Standard Time"
Get-MailboxRegionalConfiguration "name.surname"
Get-Mailbox -OrganizationalUnit "careexchange.in/Users” | Set-MailboxRegionalConfiguration -Language en-GB -DateFormat "dd/MM/yyyy" -TimeFormat "HH:mm" -TimeZone "W. Europe Standard Time"
en-US
Get-Mailbox "name.surname" | Set-MailboxRegionalConfiguration -Language en-US -DateFormat "M/d/yyyy" -TimeFormat "h:mm tt" -TimeZone "Turkey Standard Time"
Get-Mailbox -OrganizationalUnit "itmakale.com.tr/BT" | Set-MailboxRegionalConfiguration -Language en-US -DateFormat "M/d/yyyy" -TimeFormat "h:mm tt" -TimeZone "Turkey Standard Time"
Get-Mailbox -OrganizationalUnit "itmakale.com.tr/IT BANK /GENEL MUDURLUK" | Get-MailboxRegionalConfiguration | where {$_.TimeZone -eq "Arabic Standard Time"} > AGMATimezone.txt
Get-Mailbox -OrganizationalUnit "itmakale.com.tr/IT BANK /GENEL MUDURLUK" | Set-MailboxRegionalConfiguration -Language en-US -DateFormat "M/d/yyyy" -TimeFormat "h:mm tt" -TimeZone "Turkey Standard Time" | where {$_.TimeZone -eq "Arabic Standard Time"}
tr-TR
Get-Mailbox "test.user" | Set-MailboxRegionalConfiguration -Language tr-TR -DateFormat "d.M.yyyy" -TimeFormat "HH:mm" -TimeZone "Turkey Standard Time"
Get-MailboxRegionalConfiguration "test.user"

User Mailbox Permanently Deleted

Get-Mailbox -Filter {EmailAddresses -notlike '*X400:*' -and EmailAddresses -notlike '*X500:*'} -ResultSize Unlimited | foreach{ #processing here}
Get-Mailbox -Filter {EmailAddresses -like '*username*'}
Remove-Mailbox -Identity "username.surname" -Permanent $true
Remove-StoreMailbox -Database PersonalDB01 -Identity "username.surname" -MailboxState SoftDeleted where {$_.DisconnectReason -eq "SoftDeleted"}
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "<display name>" }
Remove-StoreMailbox -Database PersonalDB02 -Identity "username.surname" -MailboxState SoftDeleted
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "abdulkerim.bilen" }
Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.DisconnectReason -eq "SoftDeleted"}
Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.DisconnectReason -eq "Permanent"}
Get-MailboxStatistics -Database PersonalDB01 | where {$_.DisconnectReason -eq "SoftDeleted"} |or Each {Remove-StoreMailbox -Database $_.Database -Identity $_.MailboxGuid -MailboxState SoftDeleted}
Remove-StoreMailbox -Database PersonalDB01 -Identity "username.surname"
Get-Mailbox -Filter {EmailAddresses -like '*username*'}
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq "SoftDeleted" } | ft DisplayName,Database,DisconnectDate
Remove-StoreMailbox -Database MBD01 -Identity "Dan Jump" -MailboxState SoftDeleted

ILGILI LINKLER

https://testconnectivity.microsoft.com/

https://www.howto-outlook.com/downloads

https://technet.microsoft.com/en-us/library/hh135098(v=exchg.150).aspx

Autodiscover: Some quick methods to get it working

http://www.careexchange.in/how-to-change-time-zone-settings-in-an-exchange-server-and-its-user-mailboxes-in-exchange-201020132016/

https://technet.microsoft.com/en-us/library/jj863440(v=exchg.160).aspx

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

This site uses Akismet to reduce spam. Learn how your comment data is processed.