Select Page
Convert Windows 2012 R2 Hyper-V Cluster Server Core to Full GUI Mode

Convert Windows 2012 R2 Hyper-V Cluster Server Core to Full GUI Mode

I had just completed to convert 2 x Windows 2012 R2 Hyper-V Cluster Server Core to Full GUI Mode at my client side as they are more comfortable with the Full GUI Mode

Please refer to the following high level steps to complete this task without downtime

  1. Live migrate all running VMs and Quorum from Hyper-V02 to Hyper-V01 Host
  2. Mount the Windows 2012 R2 ISO file using PowerShell command
  3. Enable Full GUI Mode and restart the servers

Get the existing VMs running Cluster

Get-ClusterGroup

HV-ConvertToGUI-01

Live Migrate all VMs from HPV02 to HPV01

Get-ClusterGroup "SERVER01" | Move-ClusterVirtualMachineRole -Node HPV01 -Wai
t 0 -Verbose

There is no GUI to move the Quorum Disk from NodeA to NodeB, in Windows 2012 R2 and the default Name is “Cluster Group”

Move-ClusterGroup –Name "Cluster Group" -Node "HPV01" -Wait 0

Mount the Windows 2012 R2 ISO file located in C:\ISO folder and create C:\Mount

Mount-DiskImage -ImagePath 'C:\ISO\WIN2012R2.ISO' -StorageType ISO –PassThru 
#Create a Directory C:\Mount
mkdir c:\mount

Ensure that D: Drive had been mounted for the ISO file and mount the Install.wim to C:\Mount

The conversion will take very long time to complete as it will download the required files directly from Internet and you can speed up the installation by specific where is the Source File located

/Index:2 – for Windows 2012 R2 Standard Edtion, /index:4 – Windows 2012 R2 Data Center Edtion

dism /mount-wim /wimfile:d:\sources\install.wim /index:2 /mountdir:c:\mount /readonly

HV-ConvertToGUI-02

Enable Full GUI Mode and restart the Server when prompted

install-windowsfeature server-gui-mgmt-infra,server-gui-shell –restart –source c:\mount\windows\winsxs

Once the server is rebooted, and you can login to Full GUI mode now.

Exchange 2013 : Move User to Different Mailbox Database

Exchange 2013 : Move User to Different Mailbox Database

Please refer to the following steps on how to move user to different mailbox database using PowerShell

Connecting to Exchange Remote PowerShell

$ExchangeURL = "http://mail.aventis.local/PowerShell/"
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $ExchangeURL -Authentication Kerberos
Import-PSSession $Session

Verify the existing user’s mailbox located

get-mailbox -Identity m3test | Select Name, DisplayName, Database

EX13-MoveMailbox-01

Prepare a UserMailbox.csv file with all the users whose mailbox will be moved to new Mailbox Database, for example

EX13-MoveMailbox-02

Get the content of UserMailbox.csv and define $NewMailboxDB = “vEXDAG Standard” 

$Path = "C:\TEMP\UserMailbox.csv"
$Users = Get-Content $Path
$NewMailboxDB = "vEXDAG_Standard"

foreach ($User in $Users) { 
Get-Mailbox -Identity $User | New-MoveRequest -TargetDatabase $NewMailboxDB
}

Check the Move Request

#Check the progress of the move request
Get-MoveRequest
Get-MoveRequestStatistics -Identity m3test | fl
#Remove the Move Request 
Get-MoveRequest | Remove-MoveRequest -Confirm:$false
PowerShell – Hyper-V 2012 R2

PowerShell – Hyper-V 2012 R2

Please refer to the following collection of PowerShell when I’m working with Hyper-V 2012 R2

1. Manually Move Quarum Disk to 2nd Node

There is no GUI option to move the Quorum Disk in Failover Manager, and you have to do it manually using PowerShell

#Assuming that the default name is used
Get-ClusterGroup -Name "Cluster Group" 

#To manually move the Quorum Disk to 2nd Node 
Move-ClusterGroup -Name "Cluster Group" -Node NODE2

2. Live Migration

#To list all the VM registered 
Get-ClusterGroup
#Live Migrate VM to NODE2 with verbose 
Move-ClusterVirtualMachineRole "XXX01" -Node NODE2 -Verbose 
#Live Migrate VM to NODE2 without waiting for the task to complete in console 
Move-ClusterVirtualMachineRole "XXX01" -Node NODE2 -Verbose -wait 0

PowerShell – Provisioning of Exchange 2013 Server

Please refer to the following steps on how to provision Exchange 2013 Server in my lab

Pre-Requisite

Installation Item 2 to 4 prior execute the PowerShell Script

  1. Windows 2012 R2 Standard Server with latest patches installed
  2. Microsoft Office 2010 Filter Packs
  3. Service Pack 1 for Microsoft Office 2010 Filter Packs
  4. Unified Communications Manager API 4.0 Runtime
#Install PreRequisite 
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

#Restart Computer 
Restart-Computer 

#prepare AD Schema 
D:\setup.exe /ps /IAcceptExchangeServerLicenseTerms

#Prepare AD 
D:\setup.exe /PrepareAD /OrganizationName:Aventis /IAcceptExchangeServerLicenseTerms

#Prepare Domain 
D:\setup.exe /PrepareDomain /IAcceptExchangeServerLicenseTerms

#Install Exchange 2013 CAS + MBX 
D:\Setup.exe /m:Install /Roles:ca,mb,mt /IAcceptExchangeServerLicenseTerms 

<#
Welcome to Microsoft Exchange Server 2013 Cumulative Update 12 Unattended Setup
Copying Files...
File copy complete. Setup will now collect additional information needed for installation.
     Languages
     Management tools
     Mailbox role: Transport service
     Mailbox role: Client Access service
     Mailbox role: Unified Messaging service
     Mailbox role: Mailbox service
     Client Access role: Front End Transport service
     Client Access role: Client Access Front End service

Performing Microsoft Exchange Server Prerequisite Check

 Configuring Prerequisites ... COMPLETED
 Prerequisite Analysis ... COMPLETED

Configuring Microsoft Exchange Server

 Preparing Setup ... COMPLETED
 Stopping Services ... COMPLETED
 Copying Exchange Files ... COMPLETED
 Language Files ... COMPLETED
 Restoring Services ... COMPLETED
 Language Configuration ... COMPLETED
 Exchange Management Tools ... COMPLETED
 Mailbox role: Transport service ... COMPLETED
 Mailbox role: Client Access service ... COMPLETED
 Mailbox role: Unified Messaging service ... COMPLETED
 Mailbox role: Mailbox service ... COMPLETED
 Client Access role: Front End Transport service ... COMPLETED
 Client Access role: Client Access Front End service ... COMPLETED
 Finalizing Setup ... COMPLETED

The Exchange Server setup operation completed successfully.
Setup has made changes to operating system settings that require a reboot to take effect. Please reboot this server prior to placing it into production.
#>

Reboot Exchange 2013 Server, and login by opening “PowerShell ISE” with the following

. ‘C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1’
 Connect-ExchangeServer -auto

Now you can continue to work with Exchange Management Shell in PowerShell ISE

Installation of SCOM 2012 R2

Please refer to the following step by step guide on how to install Microsoft SCOM 2012 R2 with SQL 2014 SP1 Server on Windows 2012 R2 Standard Server

Creating the following Service Account (Domain User Only) in Active Directory (AD) Domain

SCOM-01Preparation of SQL 2014 Server for SCOM 2012 R2 

SCOM-02

Install the following Features

  • Database Engine Services
  • Full-Text and Semantic Extraction for Search
  • Reporting Services – Native
  • Documentation Components
  • Management Tools – Basic
    • Management Tools – Complete

SCOM-03

Assign login account for SQL Server Agent & SQL Server Database Engine 

SCOM-04

Change the Collation = SQL_Latin1_General_CP1_CI_AS

Accept the default configuration for the remaining configuration screen to complete the installation of SQL 2014 SP1 Server

Software Required for SCOM 2012 R2 Installation 

Add IIS Roles and .NET Framework Features using the following PowerShell Script

Add-WindowsFeature Web-Server,Web-Static-Content, Web-Default-Doc,Web-Dir-Browsing,Web-http-logging,Web-Request-Monitor,Web-Stat-Compression,Web-ASP-Net,Web-ASP-Net45,Web-Metabase,Web-Windows-Auth,Web-mgmt-console

Add-WindowsFeature NET-Framework-Core,NET-Framework-45-Core,NET-WCF-HTTP-Activation45 

Installation of SCOM 2012 R2 Server 

  • Download the 180 Days Evaluation Copy from Microsoft
  • Extract it and start the installation

SCOM-05

Click Install to start the installation

SCOM-06

Select all components and Next to continue

SCOM-07

Enter a Name for Management Group and Next to continue

SCOM-08

Enter the name of your SQL Server for Operational Database 

SCOM-09

Enter the name of your SQL Server for Data Warehouse Database 

SCOM-10

SQL Server Instance for Reporting Service

SCOM-11

Click Next to continue and will enable SSL in later stage

SCOM-12

Click Next to continue

SCOM-13

Enter the Domain User Account created for SCOM earlier ** Make sure to add this account to local Administrator group & SQL login as per highlighted

SCOM-14

Ignore the warning message as we are using Evaluation Copy

SCOM-15

Open SCOM Management Console successfully

Force Classic Theme for Windows 2008 R2 RDS Users

One of my client are facing Windows Classic Theme is NOT applied to users, even with the following GPO setting configured and enforced

User Configuration -> Administrative Templates -> Control Panel -> Personalization ->Force a specfic visual style file or force Windows Classic = Enabled (Empty) 

Note: To select the Windows Classic visual style, leave the box blank beside “Path to Visual Style:” and enable this setting.

User logoff from the existing session and login again, they still do not get the Classic Theme applied, and users complaining that the default Windows 7 AERO theme are too bright and they are NOT comfortable with this theme

RDS-TS-01

Solutions 

We found ThemeSwitcher and we decided to prepare a login script to apply Windows Classics Theme with the following steps

  1. Download and extract ThemeSwitcher to c:\Theme in Server
  2. Copy Classic.theme from C:\Windows\Resources\Ease of Access Themes to c:\Theme
  3. Share the C:\Theme folder
  4. Prepare a logon.bat script as below and assign to User
@echo off
net use j: \\10.1.13.13\Theme
j:
ThemeSwitcher.exe Classic

With Windows Classics theme applied, users can see their desktop more clearer now

RDS-TS-02