Saturday, May 30, 2015

Building a VMware Workstation Homelab - Part 07: Mail Server - Exchange 2010 SP2 on Windows 2012 R2

This post is about installing Exchange Server 2010 SP2 on a Windows Server 2012 R2

First we need to clone our Base VM like we did when we created our Domain Controller.

Right-click on Windows Server 2012 R2 click Manage - Clone.


Choose Version 1.0 and press Next.


Select Create a linked clone press Next.


Give your Exchange Server a name, Exch press Finish.


Cloning Virtual Machine. Close.


After cloning boot up the VM.
  • Log in and create a password for the local administrator
  • Change the Computer Name to: Exch 
  • Change the Network Adaptor to VMnet02
  • Join the Computer to the domain: devlab.local
  • Make a IP reservation on the DHCP server
  • Restart the Server

Installing Exchange 2010 SP2 prerequisite

Before we begin install Exchange we need to ensure all the prerequisites are installed on the server. We will be installing them with PowerShell.

Run as Administrator and type the following:

We are doing this the easy way wtih powershell. Run a powershell windows with administrator right.

Execute this long command:

mport-Module Servermanager
Add-WindowsFeature
RSAT-ADDS,NET-Framework-Core,NET-HTTP-Activation,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,RPC-Over-HTTP-Proxy,Web-Asp-Net,Web-WMI,Web-ISAPI-Filter


Download Microsoft Office 2010 Filter Packs and install it on the server.

Installing Exchange 2010 SP2

Now we are ready to install the Exchange Server

You can download Microsoft Exchange 2010 SP2 from microsoft.com

Click on Step 3: Choose Exchange language option


Click on Install only languages from DVD


Select Custom Exchange Server Installation


For the purpose of this howto I am installing three roles, Mailbox, Client Access And Hub Transport


In the next step type in a name for your Exchange organization.

Next is Client Settings - since we don't have any clien computers running Outlook 2003, we just click No. Click Next.

Configure Client Access server external domain
We don't have external access to the server så vi just click Next.

Click Install to begin the Installations.

The system will then conduct a readiness checks. Once it done you can go ahead and press Install.


This is going to take a few minutes, so you might want to grab a fresh cup of coffee while the installation is underway.


When everything's done, click Finish.

'

The is a bug running the Exchange Management Console on a Windows 2012 R2.
The organization tree does not apear.

A workaround for that is:
1. Open MMC from run
2. Add the snap-in for Exchange Server 2010.
3. Save the console as “admin.msc” at c:\
4. Make a .bat file.
5. Add the following to the .bat file:
set __COMPAT_LAYER=RUNASINVOKER
set COMPLUS_Version=v2.0.50727
“C:\admin.msc”



That's it :D



Friday, May 29, 2015

Building a VMware Workstation Homelab - Part 06: Gateway to the Internet

The lab environment is isolated from my home network, but I want to allow them to be able to access the internets for updates and stuff. Normally I would do this with pfSense as gateway.
I will make a howto on that another time.
  • https://www.pfsense.org/
This time am gonna turn my Domain Controller to a router/gateway to the Internet.

Prerequistes:

  • Windows 2012 R2
  • 2 Physical or Virtual NICs

From Server Manage > Add Roles and Features.

One the Before you begin page, click Next.

Select Role-based or feature-based installation and click Next.

Select destionation server click Next.

Select the Remote Access and click Next.
Click on Add Features. Click Next.


On Role Service click the Routing checkbox. Click Next.

On the Confirm installation selections click Install.

The Feature has now been added to Windows. A reboot is not necessary for this process so we will now proceed to the configuration part.


From Server Manage - Tools - Routing and Remote Access



Right-click on the server name and click Configure and Enable Routing and Remote Access.


The Routing and Remote Access Server Setup Wizard appears. Click Next.

On the Configuration page select Network Address Translation (NAT).


Before we click Next we need to add another Network Adapter to the server.
Click on the Edit vittual mashine settings 
On the Hardware tab press Add...
Select Network Adapter and click Next.


Select Custom: Specific virtual network - VMnet0 (Auto-bridging) - Finish


Back to the Server.
Under : Control Panel\Network and Internet\Network Connections

Rename the new network adapter to Internet.
The internal network adapter is named LAN here.

Now you can press Next

Select the Internet as the interface to the Internet and click Next > Finish


Windows is now configured as a router with a privat network and an external network connected.



Now that i have a Router I have enable this in my DHCP - Lab scope


That's it - and we are now able to access the whole wide web.



Building a VMware Workstation Homelab - Part 05: Domain Controller

The first VM we will deploy in our lab is  our Domain Controller.

Right-click on Windows2012R2_Base VM and select Manage - Clone.


Base the clone on an Existing Snapshot named Version 1.0 (ir whatever you named it before).


Create a Linked Clone.


Store it on the SSD drive and name it DC01


Power On the newly created clone DC01
It will boot up and run the mini setup.


Create a password and log in

You may have notice that the display performance is a bit sluggish. Just Reinstall VMware Tools and choose Repair - it will run fine again after the repair.


Okay, the first thing we have to do on our Domain Controller is configuring the network settings.

Edit the settings of the VM and change the Network Adapter to VMnet2. The DC01 is now isolated from our home network. It can only communicate with other VMs on the VMnet2 (but there aren't any for now).

Fill in the IP4 Settings like the screen below.


Next, Rename the VM to DC01 and reboot.


After the reboot, get back into the Computer Rename dialog box and press More... button.

Fill in a valid DNS Suffix for your new domain we will create. Mine will be named devlab.local. This means my DC01 will be DC01.devlab.local. Reboot afterwards


Next up, open Server Manager and click the Add Roles link. Select DHCP Server & DNS Server.
Click Next a couple of times until you finish.

From Server Manager click on the Tools tab and select DHCP.

Expand out the tree until you have IPv4 right-click and select New Scope...
Give the Scope a name and description. Mine was "Lab" and "Lab Env"
  • IP Address Range
    • Start IP address: 10.0.0.100
    • End IP address: 10.0.0.200
    • Length: 8
    • Subnet mask: 255.0.0.0
  • Add Exclusions and Delay
    • none
  • Lease Duration
    • Days: 8
  • Configure DHCP Options
    • No. I will configure these options later
  • Router (Default Gateway)
    • none yet > Next
  • Domain Name and DNS servers
    • none yet > Next
  • WINS Server
    • None > Next
  • Activate Scope
    • Yes, I want to activate this scope now > Next > Finish

From Server Manager click on the Tools tab and select DNS.

Expand out the tree until you have Forward Lookup Zones right-click and select New Zone...

Create the Forward Lookup Zone with the following settings:

Type Primary zone
Zone name devlab.local
Create a new file ... devlab.local.dns
Dynamic Updates Allow both unsecure and secure dynamic updates

Then, create a Reverse Lookup Zone with the following settings:

Type Primary zone
IP IPv4 Reverse Lookup Zone
Network ID 10…
Create a new file... 10.in-addr.arpa.dns
Dynamic Update Allow both unsecure and secure dynamic updates



Now perform an ipconfig /registerdns or reboot the server.

Ensure that it listed in the Forward and Reverse lookup zone


Now it's time to install the Active Directory Domain Services.

From Server Manager press  Add roles and Feature >  Next  Next  Next 

  • Server Roles
    • Select Active Directory Domain Service
      • Add Features


Press Next > Next > Next > Install > Close


Back to Server Manager press the yellow warning triangle 
Press Promote this server to a domain controllor.


Select Add a new forest and give your root domain a name. I called mine devlab.local


Specify the DSRM administrator password.


Type in your administrator password.


Press Next


Press Next > Next > Install. Reboot after.


Log in when the server is ready. Go to Server Manager press the yellow triangle. Select Complete DHCP configuration. 



Use your domain admin account and press Commit.


That's it.



Building a VMware Workstation Homelab - Part 04: Prepare the Template for Clones

Before we begin roll out clones we neet to "protect" our parent VM and make it a template. This ensure we don't delete it or power it on.

Select the Windows2012R2_Base VM and click Edit virtual machine settings.


Select the Options tab, go to Advanced item and check the Enable Template mode checkbox.


Next we need to make a snapshot the Base VM. All our linked clones will be based on this snapshot.
Click on VM select  Snapshot > Take Snapshot...


Give it a name like Version 1.0 and provide a good description of it.


That's it - Now we are ready to start deploying the first VMs..



Part 26 - How To Deploy Bginfo Using SCCM 2012 R2

We a using a powershell script to install and config Bginfo from Sysinternals . Download the script from here: psBginfo - For simpl...