TechShizz | All posts tagged 'Server Roles'

How to free up space used by Data De-Duplication in Server 2012

If Data De-Duplication is disabled, the system files will remain and actually occupy a lot of space. Here is how to clear it:

The unoptimise command:

start-dedupjob -Volume <VolumeLetter> -Type Unoptimization

 

Check the status:

get-dedupjob

 

Clean up the Garbage:

start-dedupjob -Volume <VolumeLetter> -Type GarbageCollection


Migrating Server Roles

This guide will demonstrate how to migrate a role from one server to another; for this example we will migrate DHCP but this method can be amended to suit other roles. You should always follow Microsoft's guides and checklists when migrating roles.

On source machine
Create a shared folder on the source machine called "Mig"

On destination machine
Next if not already, intsall Windows Server Migration Tools

Import-Module ServerManager
Add-WindowsFeature Migration

Cd \
cd C:\windows\System32\ServerMigrationTools\
dir

smigdeploy.exe /package /architecture amd64 /os WS08 /path \\sourceserver\Mig


On source machine
cd c:\Mig\<folder-name of your deployment>

.\Smigdeploy.exe


Before continuing
Make sure the role being migrated is Installed on the destination server.
Make a note of the source NIC MAC address = getmacgetmac

Stop Service on Destinartion server
Stop-Serve DHCP
Check with that it stopped with:
Get-Service DHCP


Export-SmigServerSetting -FeatureID DHCP -Group -IPConfig -path C:\StorageMig -verbose
Prompted with a password.
Export-SmigServerSetting

Remove DHCP from AD

netsh DHCP delete server.domain.local 10.10.10.10

On Destination server

We must import the snapin before we can use the Import-SmigServerSetting cmdlet.

Add-PSSnapin Microsoft.windows.servermanager.migration

Import-Smigserversetting -FeatureID DHCP -IPConfig ALL -SourcePhysicalAddress <M-A-C-A-D-D-R-E-S-S> -TargetPhysicalAddress <M-A-C-A-D-D-R-E-S-S> -Path \\sourceserver\c$\StorageMig -Verbose

Start-Service DHCP
netsh DHCP add server newserver.domain.local 10.10.10.20


Installing RemoteApp (formally Terminal Services) on Server 2012

Remote App is a technology that allows IT administrators to have end users remote onto a terminal server and use applications from a central location.

The server you intend to install Remote App on must be a memeber of th domain.

From server manager launch the add roles and services wizard

On the installation type selection, select Remote Desktop Services Installation.
Select Installation Type
Next select a deployment type. If your installing a single server just select quick start. Standard deployment is for a multiple server deployment.
Select deployment Type
Next select the deployment scenario. For Remote App as we knew it in Server 2008 we'd select Session-based desktop deployment. The Virtual machine-based desktop deployment would provide a VM for each user.

Select Scenario Type
Next select the server you wish to install the service on, click next and finish. The service will install and the server will require a reboot.

Once the service is installed you can test it by going to https://localhost/rdweb

Remote Desktop Web Access
Log in and you can see some basic pre-configured applications.

RemoteApp Work Resources

This pre-configured group of applications is called a Session Collection. In a real life scenario your likley to remove this default group called "QuickSessionCollection" and create your own. To administer these session collections go to Server Manager > Remote Desktop Services > Collections.

To remove the "QuickSessionCollection" right click on it and select Remove Collection.


RemoteApp Remove Collections

To create a custom collection, click on tasks, and then select Create Session Collection.
RemoteApp Create Collections
Next, name the collection.
RemoteApp Create Collection - Name
Next select which servers should host the collection.
RemoteApp Create Collection - Select Server
Next, you can select a security group from active directory that will be able to access this collection of applications.

RemoteApp Create Collection - Security Group
Next, a cool new feature in Windows 2012 is that you can redirect the user profiles to a separate disk. This could be a disk on a fast, highly available storage location rather than the local server.

RemoteApp Create Collection - Profile Storage
Complete the Wizard.

As this is a custom collection you'll need to add applications into the list. When installing application for use with Remote App you must install the applocation onto the server in s spacial state called Install Mode.

There are two ways to do this:

1. Use the Install Application on Remote Desktop Wizard from  the control panel.(Same process for Server 2008 onwards). This wizard will automatically change the server into install mode.
Install Applicaion on Remote Desktop

2. Change into Install Mode manually.

To do this press Windows Key + R to open th run dialogue box.
Next, run the command change user /install


RemoteApp - change user /install

How do you know if this worked?
In a command prompt type:

change user /query

3. Intall or configure your application. Any changes made will filter through to all user profiles while in this mode.

4. You must change the user mode back to exec mode. Only do this once the installation has completed fully.

To do this press Windows Key + R to open th run dialogue box.
Next, run the command change user /execute

RemoteApp - change user /execute

Once the application is installed, go to Server Manager > Remote Desktop Services > Collections > <Collection Name> > Tasks > Publish RemoteApp Programs.
RemoteApp - Publish Programs
Find your applications in the list

RemoteApp - Publish programs list
Click Next > Publish and then close the wizard.

To test this, log on as a user scoped to be in the collection, and navigate to https://<yourrdwebserver.lab.local/rdweb.

Log in as a scoped user, and you should see the new applications you installed in your new collection.

RemoteApp - Create a new collection
If the applications need to be deployed outside of the organization, you can either have the clients dial on on VPN, or alternativly you can install the Remote Desktop Gateway.

Installing RemoteApp (formally Terminal Services)

Remote App is a technology that allows IT administrators to have end users remote onto a terminal server and use applications from a central location.

To install the server roles for Remote App, you need to install the Remote Desktop Session Host and the Remote Desktop Web Access server roles.

Installing RemoteApp Roles

Once insatalled you must reboot. You can now install applications for use by clients on the network. However, applications that are installed for use with RemoteApp must be installed correctly. The server needs to be put into Install Mode while installing the application.
There are two ways to do this:

1. Use the Install Application on Remote Desktop Wizard from  the control panel.(Same process for Server 2008 onwards). This wizard will automatically change the server into install mode.
Install application on remote desktop icon on control panel

2. Change into Install Mode manually.

To do this press Windows Key + R to open th run dialogue box.
Next, run the command change user /install


change user /install

How do you know if this worked?
In a command prompt type:

change user /query


3. Intall or configure your application. Any changes made will filter through to all user profiles while in this mode.

4. You must change the user mode back to exec mode. Only do this once the installation has completed fully.

To do this press Windows Key + R to open th run dialogue box.
Next, run the command change user /execute

change user /execute

Next we need to publish the application to the users.

Go to the RemoteApp Manager found in the terminal services folder in administrative tools in the start menu.

Here click the Add RemoteApp Programs button. You will be prompted with a list of applications you can make available. If you installed your own it should appear in this list.

List of programs to distribute with RemoteApp

Once you click next and finish the program is added to the list of available programs.

The last thing to do it to deploy this application to the users. This can be done either via and RDP icon or you can create an MSI installer package which can then be deployed to the relevent machines via group policy.


Select RemoteApp distibution method

Choose the method you wish to use, accept the defaults unless you have a reson to change them and click finish.
Once complete your RDP or MSI installer file will be in C:\Program Files\Packaged Programs.

If you create an MSI file you can choose how the user will access the application either from the start menu or a desktop icon. You can even change the folder which the application goes into. You could choose to change this value to an existing folder if you wish.

RemoteApp MSI Installer Wizard

Finally, deploy the MSI or distribute the RDP icon

Installing Exchange 2013

Prepare AD


Prerequisites

 

User installing Exchange must be member of 

 

Enterprise Admins

Domain Admins

Schema Admins

Local Admin on the Exchange Server

 

 

===================

Install .NET 3.5 on DC.

 

Server must be in domain.

On the DC that holds the Schema Master role, insert the Exchange ISO and run setup from CLI:

 

Setup /PrepareSchema /iacceptexchangeserverlicenceterms

 

Setup /PrepareAD /OrganizationName:Lab

 

Setup /PrepareDomain  -  OR setup /PrepareAllDomains


================

In Exchange 2013, the HUB and Mailbox servers are combined so that now instead of a HUB/CAS and Mailbox Server layout we now have a HUB/Mailbox and CAS layout.

 

X2 CAS

X2 HUB/MB

 

There are two versions of Exchange 2013

 

Standard - Only allows 5 mailbox databases per MB server

Enterprise - 100 mailboxes per MB server. (16TB)

 

Each mailbox database should be around 1-2 TB. This size guide is due to planning for the repair of the MB-DB should a repair by ESEUTIL be required.

 

Public Folders

 

In Exchange 2013 there is only one read/write hosted copy of a public folder to it is important to choose carefully when placing the read/write copy geographically.

 

Prerequisites

 

Mailbox or Client Access Role

 

  1. 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

 

After you've installed the operating system roles and features, install the following software in the order shown:

  1. .NET Framework 4.5.2
  2. Windows Management Framework 4.0 (included with Windows Server 2012 R2)
  3. Microsoft Unified Communications Managed API 4.0, Core Runtime 64-bit
  4. Ms Office 2010 Filer pack
  5. Ms Office 2010 Filter pack SP1

 

From <https://technet.microsoft.com/en-gb/library/bb691354(v=exchg.150).aspx>

 

Edge Transport Role

 

  1. Install-WindowsFeature ADLDS

 

From <https://technet.microsoft.com/en-gb/library/bb691354(v=exchg.150).aspx>


Finally, run the installation media and follow the on-screen instructions.

Installing via powershell will be covered in the future.