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

Wednesday, July 8, 2020

Restoring Deleted Items from Exchange as an Admin

The Get/Restore-RecoverableItems PowerShell cmdlets have been available for some time now in Exchange Server 2016/2019 and Exchange Online environments. These allow admins to restore deleted items from user mailboxes such as in the following example:

Restore-RecoverableItems nuno@domain.com -FilterItemType IPM.Note -SubjectContains “New Joiner – John Doe” -FilterStartTime “20/06/2020 12:00:00 AM” -FilterEndTime “21/06/2020 11:59:59 PM”

Items are restored to the original folder location if the information is available for the item. If the information cannot be found, the item is restored to the default folder for the item type (Inbox for messages, Calendar for meetings and appointments, and so on).

What this post is mainly about, however, is the fact that admins can now do the same from the preview version of Exchange Admin Center (with the new UI)!

Important: please note that in order to use these cmdlets and the method described below, you need to be assigned the Mailbox Import / Export permission which, by default, no one is assigned.

To get started, go to the Exchange Admin Center and click on Try it now to access the preview version:

Alternatively, you can use the following link to get to it directly: https://admin.exchange.microsoft.com/#/mailboxes

Next, select the user you want to recover deleted items for and then look for the Recover deleted items link on the user property page:

The new Recover deleted items UI will show up and automatically list the latest 50 recoverable items:

We can easily search for the items we are interested in by subject, type, or folder type:

After clicking Apply filter, our results are reduced to recoverable items containing the subject line “azure” which were deleted within the past 30 days. Once we find the item(s) we want to recover, we simply select it/them and click on Recover deleted items:

Once recovered, a green banner will appear indicating all items have been successfully recovered:

All done!   😊

Friday, June 26, 2020

Exchange LUN disappeared after reboot

After rebooting an Exchange 2013 server to complete the installation of a security update, 2 LUNs just disappeared:


Looking in Disk Management their Status was Failed:


The LUNs were offline, and after manually bringing them online everything was back to normal.

There had been some previous work done on these LUNs in order to expand them and, for some reason, the default Windows policy to make SAN disks offline was applied (it assumes VMware disks are SAN disks).

After changing the policy to make “new” disks online by default, the issue didn’t happen again:

How to set OWA Language and Time zone using PowerShell

When a user first logs on to Outlook Web App (OWA), he/she gets prompted to set their language and time zone:

 

Can we, as administrators, pre-set these for users or change them after they have been set, for example? Of course! To do this, we use the Get/Set-MailboxRegionalConfiguration cmdlet:


The two parameters we are interested for this scenario are:

  • Language: specifies the language setting, such as en-us, that would apply for the mailbox;
  • TimeZone: specifies the time zone, such as Pacific Standard Time, that the mailbox in the specified region uses. The default value is the time zone setting on the server.

Let us say, for example, that we want to set everyone’s mailbox to American English and Pacific time. To do this, all we need to run is:

Get-Mailbox –ResultSize Unlimited –Filter {RecipientTypeDetails –eq "UserMailbox"} | Set-MailboxRegionalConfiguration –Language en-US –TimeZone "Pacific Standard
Time"

How to Change Exchange EAC Language

When we first login to the Exchange Admin Center (EAC), we are greeted with the language selection screen and time zone. But how do we change EAC’s language after that? The answer is to use Outlook Web App (OWA). Once you have logged into OWA, select the cog icon in the top right hand corner and then click Options:


Next, go to settings in the options menu, and on the right hand menu select regional. Now edit the language and time zone settings to what you want as these settings also apply to the EAC:


But what about for environments where administrators do not have mailboxes? How do they change EAC’s language if they do not have access to OWA? In this case, you can specify the language you want to use in the URL itself. For example, for American English, add ?mkt=EN-us to the EAC’s URL: https://mail.domain.com/ecp?mkt=EN-us

This works for both on-premises Exchange 2013 and above, and Office 365.

Saturday, August 4, 2018

Installing Exchange Server 2019 Preview on Windows Server 2019 (Core and GUI)

Amongst other big changes, such as the lack of the Unified Messaging role from Exchange Server 2019, the biggest announcement has to be the fact that this is the first version of Exchange that can be installed on a Windows Server Core (either 2016 or 2019)!

So, without further ado, let’s look at how we install the Preview version of Exchange 2019 on a Windows Server 2019 Core as well as on a Windows Server 2019 with a GUI (Desktop Experience).

Preparing Windows for Exchange
After downloading the ISO or Hyper-V image from the Windows Insider Preview website, install the OS as you would normally. In this case, I am using Hyper-V server on a Windows 10 machine. After the OS is installed, the first step is to change the default Administrator’s account password:


Once this is done, we can either use SConfig.cmd or PowerShell to configure the server’s name, domain, network and other settings:

To use PowerShell instead, run start powershell from the command line, which will open a PowerShell window:

Using PowerShell, we can use the Get-NetIPAddress cmdlet to retrieve the network adapters on the server, and then New-NetIPAddress and Set-DNSClientServerAddress to configure it. For example:
New-NetIPAddress -InterfaceIndex 5 -IPAddress 192.168.1.10 -PrefixLength 24 -DefaultGateway 192.168.1.1
Set-DNSClientServerAddress -InterfaceIndex 5 -ServerAddress “192.168.1.2”

To rename and join the server to the nunomota.pt domain, we could use the following cmdlet:
Add-Computer -DomainName nunomota.pt -NewName EX1 -DomainCredential nunomota\admin

Note that these PowerShell cmdlets can be used to configure both the Core and on the Desktop Experience versions of Windows Server.

Windows Features and Additional Software
We will let Exchange Setup configure the required Windows Features it needs, but there are two we have to install beforehand as they are required for Microsoft UCMA 4.0 and to prepare Active Directory:
Install-WindowsFeature Server-Media-Foundation, RSAT-ADDS

Next, we need to enable file sharing on our Core server, so we can copy some required files to the server. This can be done using the following cmdlet:
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes

Next, from another workstation, download the following software and copy it over to the server:

To install Visual C++, navigate to the location where you copied the file to, and simply run vcredist_x64.exe:


Now we need to install UCMA (Microsoft Unified Communications Managed API 4.0), which comes in the Exchange 2019 media itself. On the Core server, start by mounting the Exchange ISO file:
Mount-DiskImage C:\full_path\ExchangeServer2019.iso

Once this is done, go to the UCMARedist folder, and run Setup.exe to start the installation:

Finally, restart the server:
Restart-Computer -Force


Exchange Installation (Core)
After restarting the server, re-mount the Exchange ISO image and run an unattended installation as you normally would. We can either prepare Active Directory and the Domains separately or let the Setup do everything. In this case, let’s do everything separately.

First we use the /PrepareSchema switch to extend the Active Directory schema:

Next, the /PrepareAD switch to prepare Active Directory:

Then we use /PrepareAllDomains to prepare all the Active Directory domains:

Finally, we can install Exchange, and all the required OS components, using the same method we are used to with previous versions:
.\Setup.exe /Mode:Install /Roles:Mailbox /IAcceptExchangeServerLicenseTerms /InstallWindowsComponents

Once the installation completes, we can launch the Exchange Management Shell using LaunchEMS command from the command line:

Done! From here, we can manage this server using a variety of methods such as the Exchange Management Shell, Exchange Admin Center, remote PowerShell, and all the Windows management tools.


Exchange Installation (GUI)
As for the Desktop Experience version of Windows, we can obviously install Exchange unattended, or follow the installation wizard, which is pretty much identical to Exchange 2016:

Once installation has complete, we have the usual links in the Start menu:

We have our Exchange Management Shell:

And the Exchange Admin Center:

From a user perspective, they get the “new” Outlook in the Web :)