Showing posts with label Exchange. Show all posts
Showing posts with label Exchange. Show all posts

Thursday, May 31, 2018

Exchange change Search results limit 250

Exchange 2016  has search limit , when your outlook is online, or in web mail
to change this limit run this command in exchange shell to change limit from 250 to 5000:


New-SettingOverride -Name "Increase Search Results Limit" -Component ManagedStore -Section StoreSettings -Parameters @("MaxHitsForFullTextIndexSearches=5000") -Reason "Increases Search Result Limit from 250 to 5000"

Wednesday, May 30, 2018

Export mailbox usage space from Organization unit


Get-Mailbox -DomainController dc01.test.local -OrganizationalUnit "test.local/test/"  -resultsize unlimited | Get-MailboxStatistics  | Sort-Object TotalItemSize -Descending | convertto-html DisplayName, @{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}} | set-content c:\tmp\log.html

Force clean up deleted mailboxes in Exchange Database

To view free space in exchange database use this command:

Get-MailboxDatabase -Status | select Name,DatabaseSize,AvailableNewMailboxSpace

When you disable mailbox from ECP, default exchange removes it in 30 days,
if you do not have free space and you want to do delete it force use this commands :

Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "disabled mailbox Displayname" } | fl DisplayName,MailboxGuid,Database,DisconnectReason

you will see: something like this:

DisplayName      : Test User
MailboxGuid      : 07f47962-3963-44f1-9974-c298cd7bd6f8
Database         :  MBX01

DisconnectReason :

to completely remove :

Remove-StoreMailbox -Database Cloud-MBX-Custom-1 -Identity "disabled mailbox guid" - MailboxState Disabled

In several minutes free space will added to Datatabase.


Friday, February 16, 2018

You are unable to choose the OU in EAC when creating a new Mailbox, Groups or Contacts

Exchange Control Panel (ECP) can display no more than 500 OUs. When there are more than 500 OUs, a new window is generated, and this window is either blank or contains a "There are more items to show in this view" message.
  1. On the Exchange Server 2013 (2016 ) mailbox server, go to the following folder:
     
    C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp
  2. Add the following lines in the web.config file just above </appsettings>:
    
    <add key="GetListDefaultResultSize" value="5000" /> 
  3. Restart MSExchangeECPAppPool.

Wednesday, September 6, 2017

Exchange 2010: can’t remove move request – Failed to communicate with the mailbox database

After a failed move request, the mailbox is still marked is being moved and cannot be removed again

After a failed move request, sometimes (for unknown reason) the mailbox is still marked is being moved and cannot be removed again... the mailbox is shown with a green icon on the EMC (Exchange Management Console), however it cannot be seen on the "Move Request" section or with Get-MoveRequest command and cannot be cleared with the Remove-MoveRequest command.


1. Open User Attributes
2. Scroll down the attributes and search for an entry called "msExchMailboxMoveTargetMDBLink" and "msExchMailboxMoveBatchName".
5. Click on the "Edit" button.
6. Click on the "Clear" button.
7. Click the "OK" button.

If you have many users you can use powershell script:


$Users = Get-Content c:\tmp\atribute.txt

ForEach ($User in $Users) {

Set-ADUser -Server test.local -Identity "$user" -Clear "msExchMailboxMoveTargetMDBLink"
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
$Users = Get-Content c:\tmp\atribute.txt

ForEach ($User in $Users) {

Set-ADUser -Server test.local -Identity "$user" -Clear "msExchMailboxMoveBatchName"
}
in c:\tmp\atribute.txt put user DN-s.

After this you can remove failed moves from exchange console.

Thursday, May 11, 2017

Create mailboxes Exchange from PowerShell

Create mailboxes from OU Exchange from PowerShell:

Set-AdServerSettings -ViewEntireForest $True
Get-User  -DomainController  dc01.test.local -OrganizationalUnit "OU=Organizations,DC=test,DC=local" | Enable-Mailbox -Database "MBX-name" -AddressBookPolicy "Your ABP"

Tuesday, April 4, 2017

Get Mailboxes who has forwarding

Get list of users who has forwarding form OU:

Get-mailbox -DomainController dc01.test.local -OrganizationalUnit "test.local/Office/"  | select DisplayName,ForwardingAddress | where {$_.ForwardingAddress -ne $Null}

Tuesday, January 24, 2017

Send Mail from CMD

telnet localhost smtp
HELO yahoo.com
mail from: sender@test.com
250 2.1.0 sender@tecadmin.net... Sender ok
rcpt to: myemail@mail.com
250 2.1.5 myemail@mail.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
Hey
This is test email only

Thanks
.
250 2.0.0 r9M95xgc014513 Message accepted for delivery
quit
221 2.0.0 fbreveal.com closing connection
Connection closed by foreign host.

Friday, November 25, 2016

Search mail in all mailboxes

Search mail in all mailboxes in Exchange 2010:

Add user to exchange group - Discovery Management (members of this group can perfomr search of mailboxes in the Exchange organization)

Enable this user  Manage Full Access Permitions to mailbox Discovery Search Mailbox (you will see search result in this mailbox)

Open ECP (Exchange Control Panel) from brouser and log on.

Open Reporting.






Friday, November 11, 2016

Exchange Management Shell script to export all users mailbox size in specific OU :

Exchange Management Shell script to export all users mailbox size in specific OU :

get-mailbox -DomainController dc01.test.local -OrganizationalUnit "test.local/OU-test/" -resultsize unlimited | sort Name | %{
$Size=Get-MailboxStatistics $_.SamAccountName

$_ | Select-object Name, SamAccountName, @{Name="Size";Expression={((($Size).TotalItemSize).value).toMB()+((($Size).TotalDeletedItemSize).value).toMB()}}} | export-csv -encoding unicode -NoTypeInformation c:\tmp\test1.csv

Tuesday, September 27, 2016

Exchange 2010 EMC cannot access AD configuration data after you demote a DC

   Go to the folder and delete the Exchange Management Console file.
   C:\users\<specific user>\AppData\Roaming\Microsoft\MMC\Exchange Management Console
   Close EMC and reopen it.

Friday, September 2, 2016

Exchange 2010: Unable to open Exchange Management Console – Initialization Failed

  1. Close all MMC/EMC Instances before proceeding.
  2. Open Powershell or Powershell IDE as the user you run the EMC under and execute the following command:.
  3. Remove-ItemProperty -Path HKCU:\Software\Microsoft\ExchangeServer\v14\AdminTools\ -Name NodeStructureSettings
  4. Close Powershell

Wednesday, April 20, 2016

Exchange 2010 Prerequisites on Server 2008 R2

  • Open powershell and run the following command
    • Import-Module ServerManager
  • For a server that will have the typical installation of Client Access, Hub Transport, and theMailbox roles:
    • 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,Web-WMI -Restart
  • For a server that will host the Client Access and Hub Transport server roles:
    • 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,Web-WMI -Restart
  • For a server that will host only the Mailbox role:
    • 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 -Restart
  • For a server that will host only the Unified Messaging role:
    • 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,Desktop-Experience -Restart
  • For a server that will host the Edge Transport role:
    • Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS -Restart
  • After the system has restarted, configure the Net.Tcp Port Sharing Service for Automatic startup by running the following command:
    • Set-Service NetTcpPortSharing -StartupType Automatic

Friday, January 29, 2016

Exchange PowerShell: Find users hidden from the Global Address List

Get-Mailbox | Where {$_.HiddenFromAddressListsEnabled -eq $True} | Select Name, HiddenFromAddressListsEnabled | export-csv c:\hiddenfromGAL.csv

Source

Wednesday, January 13, 2016

Find Users not signed Mail 30 days

get-mailbox  -resultsize unlimited | Get-MailboxStatistics |?{$_.LastLogonTime -lt (date)
.adddays(-30)} | ft DisplayName,ItemCount,LastLogonTimeLast,LogoffTime,LastLoggedOnUserAccount -auto

Exchange 2010, 2013 PowerShell Maibox Import Commands

New-MailboxImportRequest  -Mailbox username  -FilePath \\server\pst\filename.pst
This command imports the PST file into the user’s mailbox. Large PST files can fail due to corrupt data on the mailbox.
New-MailboxImportRequest  -Mailbox username -FilePath \\server\pst\filename.pst -AcceptLargeDataLoss -BadItemLimit unlimited
This command imports the PST file into the user’s mailbox and bypasses any corrupt items in the mailbox.
Get-MailboxImportRequest | Get-MailboxImportRequestStatistics
This command allow you to view the status of your PST imports.

Tuesday, March 17, 2015

მაილბოქსის მოცულობის გაზრდა

 Exchange Management Console ვარჩევთ  Recipient Configuration > Mailbox






  
              ვარჩევთ იუზერს რომელსაც უნდა გავუზარდოთ, ვაჭერთ  Properties -- Mailbox Settings

             ვარჩევთ Storage Quotas  და უნდა მოვხსნათ  Use mailbox database default




აგრეთვე შეგვიძლია ჩავურთოთ, მეილის რომ მოუვიდეს როცა მაილბოქსი გადავსებულია.











Exchange 2010 Manage Full Access Permission

Exchange 2010 ჩვენ შეგვიძლია მივცეთ იუზერს სრული წვდომა სხვა იუზერის მაილბოქსზე. 
ამისათვის Exchange Management Console-ში  მაგილითისთვის, Bob Builder -ს მივცეთ სრული წვდომა contact-us’- ის მაილბოქსზე.
1.    შევდივართExchange Management Console, გადავდივართ ‘Recipient Configuration’ – ‘Mailbox’2.     ვაჭერთ მარჯვენა ღილაკს  მაილბოქსზე, რომელზეც გვინდა მივცეთ სრული წვდომა.
3.  ვარჩევთ‘Manage Full Access Permission’



4.     ‘Add’
5.     Select User or Group ვარჩევთ იუზერს და  OK

6.     ვაჭერთ‘Manage’