Thursday, 24 December 2015

Migrating a spanned volume to another server

Have you ever been in a situation where you need to move a spanned volume from one Windows server to another? Well, it can be done using the "Import foreign disk" feature in Disk Management.

Caution - Drives with Bit Locker Drive encryption cannot be moved using this technique. Windows Vista Enterprise and Ultimate editions include Bit Locker Driver Encryption that wraps drives in a protected seal so that any offline tampering is detected and results in the disk being unavailable until an administrator unlocks it.

In my example lab, I've three dynamic disks that needs to be moved from Windows Server 2008 R2 to Windows Server 2012.

These three dynamic disks are spanned and the size of each disk is 1 GB.


Before you move the disks, it is always recommended that you have a very good backup of the drive and also ensure that the disk status is "Healthy". If they are not healthy, you should repair the volumes before you move them.

Microsoft recommends that you uninstall the disks from Device Manger and then remove the disks from the Disk Management. But it is not required to do that. 

You can simply shutdown your source server and remove the disks from them. You need to remove all disks which makes up the spanned volume and attach them together to the destination server.

You may need to power off your destination server, if it doesn't support hot-plug.

After you attach the disks together and power on the destination server, open Disk Management and bring the new disks online.


When the disks are online, they show up as foreign disks, right-click on one of them and click "Import Foreign Disks..."

Ensure that the foreign disk group is selected and also ensure that it lists all the disks of your spanned volume.
Click OK on Import and click OK again on the window where it shows spanned volume information. 
Your spanned volume should get mounted without any errors. You should also be able to see all your data.
Below are the official documentation from Microsoft to move a dynamic disk to another server.

https://technet.microsoft.com/en-us/library/cc779854(v=ws.10).aspx
https://technet.microsoft.com/en-us/library/cc753750.aspx

Note - The volumes on the dynamic disks should retain the drive letters that they had on the original computer. If a drive letter is already used on the destination computer, a volume receives the next available drive letter. If a dynamic volume previously did not have a drive letter, it does not receive a drive letter when moved to another computer. Additionally, if auto-mounting is disabled, the volumes aren't automatically mounted and you must manually mount volumes and assign drive letters.

The same above procedure can be followed if you performing these steps on a physical or virtual server.

Youtube Video




Migrate Printers from Windows Server 2008 R2 to Windows Server 2012 R2

In this article, I'll walk you through the process of migrating printers from a Windows Server 2008 R2 to Windows Server 2012 R2.

If you are planning to migrate printers from  Windows Server 2003 to a newer version of Windows operating system then you need to use a tool called PRINTMIG.exe which is a free tool from Microsoft. This tool is built into the newer operating system starting from Windows Server 2008. If you are planning to move printers from Server 2008 to a newer operating system then you can use the built-in print migration tool.

Before you start migrating the printers from a source server to destination server, you need to ensure that the compatible printer drivers are available for the operating system running on the destination server. Upgrading from a print server that is currently on Server 2008 is much easier than if you are migrating from a server currently running Server 2003 and it is because of the lack of 64-bit driver support from most 2003 server setups. You also need to install all your 32-bit print drivers on your new 64-bit print drivers and these are the print drivers which are currently installed on your 32-bit OS of your source print server. Also you need to install all 64-bit print drivers on your destination print server which is running 64-bit OS, if your source print server is a 32-bit OS and it needs to be done by manually adding each of the 64-bit drivers before you can start the migration. For example, if you have 200 printers on your 2003 print server, you would need to add the 64-bit driver of all 200 of those printers to your new 2012 server before you can complete the migration successfully. On the source print server, ensure that all your print drivers are up-to-date and see if you can use universal drivers if possible.

If Active Directory is being used to publish printers then you need to unpublish the printers before you start the migration and it is done to avoid printers being published twice.

After performing all the above pre-checks, the next step is to install Print and Document services role on the new print server.

The next step is to export the print queues, drivers, objects and security settings into a printer data file from the source print server and import that into the destination printer server. You would then shutdown or rename the old print server and assign the old print server name to the new print server to avoid hostname duplication. Finally publish all printers back to Active Directory and testing all the print queues that have been migrated.



In my lab environment, I've a domain controller DC01 and two print servers (PRINTSERVER01 and PRINTSERVER02). PRINTSERVER01 is running Windows Server 2008R2 and it has two network printer attached to it. PRINTSERVER02 is running Windows Server 2012 R2. We will be moving the printers from PRINTSERVER01 and PRINTSERVER02. Both print servers are joined to the domain. I've done all the pre-checks with respect to print drivers. I'm going to shutdown PRINTSERVER01 and rename the new print server to take the old print server name.

To start the migration process, first I'm going to unpublish the printers from Active Directory.
  1. On PRINTSERVER01, Login as an Administration.
  2. Open Print Management from Administrative Tools, click "All Printers" and select all the printers that you want to unpublish from Active Directory and right click on them. 
  3. Click "Remove from Directory" to unpublish them from Active Directory.

Next install the "Print and Document Services" role on the new print server (PRINTSERVER02)
  1. Login as an Administrator.
  2. Open Server Manager and click Add roles and features in the Dashboard.
  3. Click Next on "Before you Begin" screen.
  4. Click "Role-based on feature-based installation" and click Next.
  5. Select the server on which you want to install the role and click Next.
  6. In Select server roles screen, select "Print and Document Services" role and click Next. Click Add Features to install the management tools and features that are required for "Print and Documents Services". Click Next.
  7. Keep the default selection in the Select features screen and click Next.
  8. Click Next on the Print and Document Services introductory screen.
  9. For the Role Services, select "Print Server" and click Next.
  10. Click Install on the Confirmation screen.
  11. Ensure that the installation has successfully completed and click close.


After installing the "Print and Document Services" role on the new print server, it is time to export the print queues, drivers, objects and security settings from the source print server (PRINTSERVER01) into a printer data file.
  1. Log back into PRINTSERVER02 as an administrator.
  2. Back in Print Management tool, right-click on the Print Management on the left side and click Migrate Printers.
  3. Select Export printer queues and printer drivers to a file and click Next.
  4. In Select a print server screen, select "A print server on the network" and type the old print server name which is PRINTSERVER01. Type the UNC path of the old print server name (\\PRINTSERVER01) and click Next.
  5. Review the list of print queues, drivers, processors and ports that will be exported and click Next.
  6. Specify a path to save the printer data file and click Next.
  7. Ensure that the export was successful with no errors and click Finish.

Now that we have exported all the printers as a printer data file, we can now import them to our new print server (PRINTSERVER02).
  1. Back in PRINTSERVER02, I've logged in as an admin.
  2. Back in Print Management tool, right-click on the Print Management on the left side and click Migrate Printers.
  3. Select Import printer queues and printer drivers to a file and click Next.
  4. Locate the printer data file and click Next.
  5. Review the list of print queues, drivers, processors and ports that will be imported and click Next.
  6. In Select a print server screen, select "This print server" and click Next.
  7. In Select import options, for Import mode, select "Keep existing printers" which will keep the existing printers on the destination print server and the other option "Overwrite existing printers" will overwrite the existing printers. You have 3 options for "List in the directory". The first one "List printers that were previously listed" will publish the printers back to Active Directory where were publish before but not now and second option is to list all printers which will publish all printers to Active Directory regardless of whether they are already published or not. Third option is "Don't list any printers" which will not publish any printers. In my case, I'll select Don't list any printers. There is another option to covert LPR ports to Standard Port Monitors which I'll not select and I'll click Next.
  8. Ensure that the import was successful with no errors and click Finish.
  9. Go into "All Printers" and see if the printers have been imported.

Below are the few last steps that you need to perform.
  1. Shutdown or rename the old print server. Assign the old print server name to the print server to avoid hostname duplication.
  2. Publish all printers back to Active Directory, if required. The process of publishing the printers back to Active Directory is similar, you just need to right-click on the printer(s) and click "List in Directory".

Expected Error during Migration
Some errors are to be expected, if you have TYPE 2 drivers, they will not be imported because Windows Server 2012 or Windows Server 2012 R2 only supports TYPE 3 and TYPE 4 drivers.


Below are the few post checks that you need to perform after migration.
  1. View event log messages about the migration.
  2. Manually check the destination print server for each printer migrated from the source print server.
  3. Verify that the printer associated with each printer queue is online.
  4. Confirm that a printer queue’s special settings, permissions, or drivers were preserved during the migration.
  5. Check the properties for each queue on the destination server and verify that any special settings are still applicable.
  6. If the driver installs any non-standard settings that have been altered as a result of the migration, verify those as well.
  7. Make any necessary changes, such as adding a port monitor or a new driver.

Youtube Video


Sunday, 20 December 2015

Backup a Windows Server 2012 R2 Domain Controller

In this article, I'll walk you through with the simple procedure of backing up a Windows Server 2012 R2 domain controller using native backup tool of Windows Server 2012 which is Windows Backup. Windows Backup tool is a good enough tool to backup a domain controller. Unlike other third-party backup solutions, Windows backup tool no longer supports backup to tape feature, so you'll need a disk available that doesn't host the operating system files or the Active Directory NTDS database and log files.

In my lab environment, I've a domain controller running Windows Server 2012 R2 with two disks.
  • C:\ - Windows operating system (Also contains NTDS database and log files of Active Directory)
  • D:\ - A dedicated drive used for backups.
Before we can start the backup on a domain controller or on any Windows Server, we need to install Windows Backup feature. You can follow the below procedure to install the Windows Backup feature on a domain controller and to backup a domain controller.
  1. Log on to the domain controller (DC01) with a domain admin credentials.
  2. Open Powershell and type Add-Windowsfeature windows-server-backup and press Enter
  3. Open Server and click Tools to select Windows Server Backup \
  4. In the Windows Server Backup console, click Local Backup in the left pane.
  5. Select Backup Once under Actions in the right pane. If required, you can create a backup schedule to backup the server on a regular basis.
  6. In the Backup Once Wizard, select Different Options and click Next.
  7. On the Select Backup Configuration screen, select Full server (recommended) and click Next.
  8. On the Specify Destination Type screen, select Local drives and click Next. 
  9. On the Select Backup Destination screen, select your dedicated backup volume in the Backup destination drop-down menu. My dedicated backup volume is D:\
  10. Click OK to confirm that you want to exclude the selected drive from the backup items.
  11. Click Backup on the confirmation screen.
  12. Now the domain controller will be backed up. Once the backup is successful. You can close the Backup Once Wizard.
To check the last successful backup of AD, you can run repadmin /showbackup


Youtube Video