Upgrade Microsoft Domain Controller 2008 R2 to DC 2012 R2 with Exchange 2010 in the current environment.

Upgrade Microsoft Domain Controller 2008 R2 to DC 2012 R2 with Exchange 2010 in the current environment.

1- Windows 2012 R2 fully patches
2- New Windows 2012 R2 server should be joined to the Domain controller 2008r2

After you get all the prerequisites ready, start the Server manager and click on Add roles then add the ADDS role and follow the following instructions
Install the role and the n configure it as following
Add it to the existing DC

to migrate the AD Operations Master roles.  The simplest way to move these roles is via PowerShell.  On Server 2012 AD PowerShell modules, this can be done from anywhere.  Simply run the following command to view you current configuration, and change them:
PS C:> netdom query FSMO
Move-ADDirectoryServerOperationMasterRole -identity “dc1” -OperationMasterRole 0,1,2,3,4
Making sure that all the roles have been migrated :
netdom query FSMO
Adding second DC
Source: Default-First-Site-NameDC2
******* 1 CONSECUTIVE FAILURES since 2015-03-23 19:37:45
Last error: 8524 (0x214c):
The DSA operation is unable to proceed because of a DNS lookup failu
Naming Context: CN=Configuration,DC=kibtek,DC=local
Source: Default-First-Site-NameDC2
******* WARNING: KCC could not add this REPLICA LINK due to error.
Naming Context: CN=Schema,CN=Configuration,DC=kibtek,DC=local
Source: Default-First-Site-NameDC2
******* WARNING: KCC could not add this REPLICA LINK due to error.
Naming Context: DC=kibtek,DC=local
Source: Default-First-Site-NameDC2
******* WARNING: KCC could not add this REPLICA LINK due to error.
After joining new DC you will see this error until the replication with the PDC and schema master is finished.
Use the repadmin /syncall to hasten the sync process.
After we changed the PDC and Schema master role server to the new DC and shut down the old DC for test. On Exchange 2010 server you might get the following error
Exchange Console
Current deployment

  1. Exchange 2010
  2. New DC 2012 R2 with another Additional DC installed newly.
  3. Two DC 2008R2 but have been shut down for testing.

After you shutdown or demote the old PDC or Schema master Demote Domain Controller role, Microsoft Exchange Management Console fails to retrieve any Exchange information with error message “An error caused a change in the current set of Active Directory Server settings. Restart Exchange Management console.”
Microsoft Exchange management console caches the data in the user’s profile for quick access, So whenever you try to open EMC from an existing Exchange admin profile you will get the same error.
Navigate to the following folder and delete the Exchange Management Console file.
{308b10a016e19a1cd6a208cbc3961927e16fc6766a4020d3c4ef54ea17925f0f}userprofile{308b10a016e19a1cd6a208cbc3961927e16fc6766a4020d3c4ef54ea17925f0f}appdataroamingMicrosoftMMCExchange Management Console

Hope this was useful Winking smile

What to have in your Linux Desktop?

The tools that a Must have on Linux Desktop are

1- Variety

(Automatic desktop wallpaper downloader and customizer), Variety also displays quotes on your desktop along with wallpapers.


2- Cairo dock (shortcut bar to Applications)


3- Shutter (Graphic tool)

Shutter is a graphic tool that can take snapshots, desktop screenshots and edit them or send them to your e-mail.

it’s very powerful and every button on it can be customized with a shortcut by the keyboard. for example if you want to create a shortcut for screen selection (Like the OneNote on Windows) you can simply open the keyboard shortcuts app (mate-keybinding-properties)


Once you have launched the keyboard shortcuts utility, you can customize a new shortcut to take a screenshot for you with Shutter by selection.


You will have to click on Add and create a new shortcut as following


Once you click apply, you can assign the shortcut for this command.

For example, I am using the shortcut CTRL + SHIFT + S


4- Remote Desktop tools

A- NoMachine

NoMachine is a free and very powerful remote desktop utility that works on all Operating systems and supports all kinds of features that are available in other remote desktop utlities like (Radmin, Teamviewer, RDP).


5- OneDrive for Linux.


Install onedrive-d on Linux

While onedrive-d was originally developed for Ubuntu/Debian, it now supports CentOS/Fedora/RHEL as well.

Installation is as easy as typing the following.

$ git clone https://github.com/xybu92/onedrive-d.git
$ cd onedrive-d
$ ./inst install

First-Time Configuration

After installation, you need to go through one-time configuration which involves granting onedrive-d read/write access to your OneDrive account.

First, create a local folder which will be used to sync against a remote OneDrive account.

$ mkdir ~/onedrive

Then run the following command to start the first-time configuration.

$ onedrive-d

It will pop up a onedrive-d’s Settings window as shown below. In "Location" option, choose the local folder you created earlier. In "Authentication" option, you will see "You have not authenticated OneDrive-d yet" message. Now click on "Connect to OneDrive.com" box.


It will pop up a new window asking you to sign in to OneDrive.com.


After logging in to OneDrive.com, you will be asked to grant access to onedrive-d. Choose "Yes".


Coming back to the Settings window, you will see that the previous status has changed to "You have connected to OneDrive.com". Click on "OK" to finish.


Sync a Local Folder with OneDrive

There are two ways to sync a local folder with your OneDrive storage by using onedrive-d.

One way is to sync with OneDrive manually from the command line. That is, whenever you want to sync a local folder against your OneDrive account, simply run:

$ onedrive-d

onedrive-d will then scan the content of both a local folder and a OneDrive account, and make the two in sync. This means either uploading newly added files in a local folder, or downloading newly found files from a remote OneDrive account. If you remove any file from a local folder, the corresponding file will automatically be deleted from a OneDrive account after sync. The same thing will happen in the reverse direction as well.

Once sync is completed, you can kill the foreground-running onedrive-d process by pressing Ctrl+C.


Another way is to run onedrive-d as an always-on daemon which launches automatically upon start. In that case, the background daemon will monitor both the local folder and OneDrive account, to keep them in sync. For that, simply add onedrive-d to the auto-start program list of your desktop.

When onedrive-d daemon is running in the background, you will see OneDrive icon in the desktop status bar as shown below. Whenever sync update is triggered, you will see a desktop notification.


6- Evolution Email Client for Exchange accounts.

If you ever thought of using an e-mail client that supports your account on Microsoft Exchange Email server’s protocol which is known as (RPC over HTTP) then you have probably used Mozilla thunderbird or kmail, geary..etc but all those clients don’t support Exchange’s most flexible connectivity which is RPC over HTTP that will sync all your emails, contacts, tasks, calendars ..etc

To Install evolution, all you have to do is open Linux Terminal and type the following

Sudo apt-get install evolution


Since I already have Evolution installed it won’t proceed and will tell me that it’s already installed. but that’s not all!

In order to setup an Exchange account on Evolution you will have to install an Evolution plugin that will support the web services for the RPC over http connectivity which is known as (EWS = Exchange Web Services).

In order to install this plugin you will have to type the following command

Sudo apt-get install Evolution-ews


Once you install the plugin, you can launch the program and setup your account as following.

Click on Add as in the picture


When you click add you should be welcomed by a message saying "Welcome to Evolution wizard ..etd"

Click Continue and then type in your name and email address in the next window

You can skip the automatic configuration as Evolution still doesn’t support Exchange Autodiscover mechanism for auto configuration of the account. so you must manually provide all the configuration of your exchange as following


In the host URL you will have to provide your Exchange server’s EWS URL which usually looks like this


In my case I am using an Office 365 account so instead I’ll use Microsoft’s EWS url.


For the OAB (Offline Address Book) you also need to provide the configured URL of the OAB on your Exchange Server. which in my case again it’s Microsoft Office 365.


you will need to make sure that the correct authentication method is set (NTLM) in my case, this can vary though on Exchange server’s Outlook Anywhere configuration. it can be Basic as well. so it’s up to your configuration to choose but for Office 365 it’s NTLM.


Once you finish the configuration you can continue and you’ll get prompted to enter your Credentials. as soon as you finish typing your Password hit enter and your e-mails will start syncing. as in the following snapshot


That’s it, you’re setup here either if it’s an exchange on-premises or Office 365 for Linux desktop client.

Here’s another guide for the new mapi connectivity for Evolution, probably the same steps


7- For Office (Word, Powerpoint ..etc) I prefer to use Kingsoft’s community version along with LibreOffice

Since Libre office provide more tools or the full package I still use it on Linux but Kingsoft’s WPS tools have a user friendly and rich of tools GUI.


In order to download WPS software you will have to navigate to the link below and download the suitable version with your Linux OS. or use the terminal to download latest available version with the following command

sudo apt-get install wps-office


8- For media there are various available software and tools that you can use on Linux to either listen to music or edit mp3s or convert media types.

A- Audacity (Convert and Edit audio files).

B- Spotify (listen to music online)

C- Clementine (Listen to Music on your computer)

D- VLC (Watch Videos on your PC) or use it as a streaming server.

There are other useful tools and things to do on Linux OS as it’s a very flexible and customizable OS but I’ll end this article here and write a new one about how to decorate your welcome screen and your desktop with beautiful pictures and tools.

Hope you find this useful Smile 


Exporting and Importing PST from Exchange 2003 to Exchange 2013

In order to export mails from Exchange 2003 (should not exceed 2 GB) you will have to copy Administrator user into another user “admin” and give that user the rights to access all other mailboxes.
You will have to navigate to the Mailbox store
Right click the mailbox store and click on Properties
Go to Security tab and add the new user (Admin) and give it full control as below
Apply, then sign out of the windows session to the Exchange machine and use the newly added domain admin to login and then open the Exmerge application
Select the second step (Extract or Import)
Select step1
Select the Exchange name and the DC (They should be set automatically)
Select the users that you want to be exported (shouldn’t exceed 2 GB).
Select the local language
Select the destination folder (In my case I mapped a network drive)
Save settings for later use if you want or just click Next.
Once done, the mailbox will be exported.
Importing into Exchange 2013
In exchange 2013 Open the EMS as administrator
Before you start, you should move all the PST files into a shared folder in the network and add the “Exchange Trusted Subsystem” user to its permission.
The same user should be added to the security tab
Providing import and export permission on Exchange 2013
In order to import the PST files to Exchange 2013 users you will have first to assign the Exchange Admin account the capability of importing these PST files then sign out from the EAC portal and back in
To do so you will have to go to EAC then go to Permissions and double click on the Recipient Management
Click Add and select the Mailbox Import Export and click Add then OK
I will add members to this role group
After signing in back to the EAC with the administrator I got the Import PST options.
For Management shell usage
Importing PST using EAC and following up with EMS
Importing Single folder from source PST file into a target folder in email
Importing the folder Sent Items from the file basakc_backup.pst into target folder Sent Items in Mhamada user.
The parameter -TargetRootFolder will create a folder inside the existing Sent Items folder
Importing large items into mailbox in Exchange

Hope you found this useful Open-mouthed smile

Active Directory Migration from Windows Server 2008 R2 to Windows Server 2012 R2

Active Directory Migration from Windows Server 2008 R2 to Windows Server 2012 R2
Friday, March 20, 2015
4:28 PM
  1. New VM machine with Windows Server 2012 R2 installed and up to date on it.
  2. ISO DVD copy of Windows 2012 R2 loaded on your 2008/R2 machine
First we’ll need to prepare the existing forest using the ADPREP command on the Windows 2012 R2 server DVD
You will have to insert the DVD on your 2008/R2 server and navigate to the following path
Then use the following command line
Adprep /forestprep
See the snapshot below
When this screen comes up, it’ll ask you to press C and enter to confirm the forest update. Click C and enter to continue and then it’ll show you the previous and next schema version
The process will continue to update the schema as in the below snapshot and it shouldn’t take time too
Here it has completed successfully and now we can move on to the next step.
Now you will have to join the 2012r2 VM machine that you have prepared to the existing DC 2008r2. after you do so you will have to promote this new 2012 server to an additional DC in the domain.
Open Server manager and add new ADDS role to this new server and follow the steps to add it as an additional DC.
When this finishes, the computer will automatically restarts.
Now you will have to start the Transferring of the FSMO from the 2008 R2 DC to the new one.
1- from ADUC on DC 2012r2 right click on Operations Masters
  1. Click on Change to the new DC and confirm OK to continue
Click Yes
We will have to do the same for the PDC and Infrastructure tabs
Note: make sure you close the firewall on both server for the transferring to be completed without issues
When you’ve made sure you have transferred all operation masters roles then close ADUC.

Mohammed Hamada