Deploy with ease | A Windows Deployment Service guide | Windows Server 2012

Rolling out PC’s can be boring and a pain. Using Acronis Snap and Deploy can help (that was not a sponsored ad, however acronis if you want to pay me to post this please give me a copy the trial ran out.) but the software can be expensive.

So what does a sysadmin do then? Whats free with my Server 2012 installation that can help me roll out my PC’s faster? PXE and WDS. Using a simple mix of PXE and Windows Deployment Services you can guarantee a quick and painless roll out.

Issue: I want to deploy Windows to a bunch of hosts but I also want to play Portal 2.

Solution: Install WDS

First we need a Windows Server 2012 install and a DHCP server that works I am going to assume you have both. These dont have to be on the same host but you can if you like (as is this case).

If you are using Windows Server 2012 as your DHCP this will be super easy. Before you start I would reccomend adding a new virtual disk for your images. ~200GB would be good for working room but I used 40GB in my lab. In this example we are going to be using disk D:

5-10-2013 8-28-18 PMOnce the disk has been added and formatted simply go to the server manager and choose Add or Remove Roles. Click next till you get to server roles. Scroll down to Windows Deployment Services.

Install the role and reboot if necessary.

 

5-10-2013 8-32-59 PMNow you will see a new icon under the start menu (metro).

Click it to open it up.

 

You will be prompted for an  initial setup where you will be asking items like:
-Is this a DHCP server (this is the most important step).
-Where should I store the data for these images? Keep this path simple let it pick the path simply pick the disk. This will be covered in a different article where I show you how to add ISOs (memtest, konboot) and other items into WDS that  shouldn’t be there.

Once you have completed these steps its time to add some ISOs and Images. To be clear on this you will need some OEM ISOs, or  genuine  disks that came with the PC or something that came from MSDN. Simply take your iso and extract it with WinRAR or with Windows Server 2012’s built in ISO mounter.

Now you should have some files that look like this:
5-10-2013 8-43-30 PM

Inside this \sources\ folder you will find some WIM files. These are what you need you can leave them here though. We now need to tell the WDS about these disks.

5-10-2013 8-48-09 PMWith the WDS MMC still open choose Boot Images, then right click in the window on the right and choose Add Boot Image…

Please note I already had images in here you will not have.

 

 

5-10-2013 8-48-30 PM A menu will appear prompting you for the location of your DVD.

Simply go to the folder that you extracted the contents of your Windows installation DVD to and open the /sources/ folder.

 

Open the boot.wim file then choose Next. You then will be asked for some info on what you wanted it named fill out as desired.

5-10-2013 8-55-07 PM

5-10-2013 8-55-19 PM

This is great but you still cant install windows with just this added. We still need to add the install.wim to the WDS server. This is done by right clicking on Install Images and selecting Add Install Image… 

You will be prompted to make a group. Name accordingly. I use MSDN and OEM just so I am aware what is what. However you may wish to do it by OS level.

 

 

 

 

After you have added an image your basically good to go. Power up a VM and press F12.
5-10-2013 8-59-22 PM

You can now see all your new .wim installs there! This creates a easy method for booting into the install  environment. Now you will need to install and capture your image and your good to go!
5-10-2013 8-59-50 PM

Adding Deduplication to Windows 8 + 8.1!

2015-04-21 – Updated to support Windows 8.1

In a previous guide I covered managing data deduplication (the process that takes two files that are alike or similar and will store only one copy.) This process will save you time and in the end money since the more disk space you have the more you can store! I have been running this process for a number of months and the results are astounding. From the image below you can see how much I have saved on my volumes. Thats ~709GB of data over 5 disks!

3-8-2013 8-00-02 AM

This guide will sum up the process to install Data Deduplication on Windows 8. This is a service and product that is not avaible on any Windows 8 version that you can buy, only on the server version. Credit goes out to this guy for these files and guide. But I thought I would sum it up again with some more  pictures  for the average home user since the instructions were not very user friendly.

Issue – Windows 8 does not include data deduplication roles and features. Only Windows Server 2012

Solution – We use a extracted role-set from Server 2012 and install it on Windows 8.

Grab the files here: Win8Dedupe ( Windows 8.1 Dedupe here)

3-8-2013 8-08-52 AM

Once you have the Win8Dedupe.zip downloaded you need to extract it to a local folder, you will see a pile of files that look like this.

3-8-2013 8-10-21 AMNow you will need to open an elevated command promp or CMD. The simplest way to do this in Windows 8 is to click File in the top right of the folder where you extracted the files. Then hover your mouse over Open Command Prompt Open command prompt as administrator.

With the command line open you will want to type in the following command

3-8-2013 8-17-28 AM

(Please note this is one giant command.) I have attached a text document with the commands incase the code below is not copy paste friendly.

Windows 8.0

dism /online /add-package /packagepath:Microsoft-Windows-VdsInterop-Package~31bf3856ad364e35~amd64~~6.2.9200.16384.cab /packagepath:Microsoft-Windows-VdsInterop-Package~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.cab /packagepath:Microsoft-Windows-FileServer-Package~31bf3856ad364e35~amd64~~6.2.9200.16384.cab /packagepath:Microsoft-Windows-FileServer-Package~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.cab /packagepath:Microsoft-Windows-Dedup-Package~31bf3856ad364e35~amd64~~6.2.9200.16384.cab /packagepath:Microsoft-Windows-Dedup-Package~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.cab

dism /online /enable-feature /featurename:Dedup-Core /all

Windows 8.1

dism /online /add-package /packagepath:Microsoft-Windows-VdsInterop-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-VdsInterop-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab /packagepath:Microsoft-Windows-FileServer-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-FileServer-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab /packagepath:Microsoft-Windows-Dedup-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-Dedup-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab

dism /online /enable-feature /featurename:Dedup-Core /all

 

3-8-2013 8-17-37 AMAfter you enter the code you should see a The operation completed successfully. You need to enter one more command:

dism /online /enable-feature /featurename:Dedup-Core /all 

3-8-2013 8-19-48 AM

Again you should see an The operation completed successfully.

3-8-2013 8-20-39 AM

Now we just need to verify that the role was added to our Win8 host. To do this quickly press Start and typeTurn windows features on or off.

3-8-2013 8-21-08 AM

A new window will appear you can see the File Server Role is now installed.

We can now go ahead and configure Windows Deduplication and start saving some space! That is covered in another guide here: http://romcheckfail.com/using-powershell-to-manage-data-deduplication-server-2012-and-windows-8/ 

Creating Event ID’s Manually

If you have ever needed to test a monitoring system like Overseer that monitors Event ID’s in the system log then this article is for you.

Say for example you set up a monitoring system to look for low disk space, or attacks on your  database. These kinds of alters might be hard to set up since you would need the event to actually occur before it will show up in the event viewer. So how can you test low disk space without actually causing your fileserver to come to a griding halt?

Issue – I need to create a event ID  without  actually creating an the issue that would normally generate the ID.

Solution – Open up a new command line (Start > CMD).
Then type the following text into the command line, dont worry Ill explain it in a seconds just dont hit eneter yet.

EventCreate /S HOSTNAME /ID 18456 /L Application /SO TestHacker /T Information /D “The quick brown fox jumps over the lazy dog”

Ok now lets take a look and see what we have here.
EventCreate – this is the windows function we are calling.
/S – this tells the command that we want to create a event on a remote computer, if you want to create the event on the computer your logged onto right friggin now, dont put this in.
HOSTNAME – this is going to be the server name or IP address that you want the event created on.
/ID 18456 – fill in the EventID number you want to create.
Application – this states that the event will be created by an application not the system.
/SO TestHacker – this is the source name
/T Information– This is the type of the event, there are 4 levels Warning, Error, Information,
Success.
/D – This is the text that the event ID will contain.

And there you have it!

Enable Administrative C$ Shares on Windows 8

With every new OS there will be new challenges, and Windows 8 is no exception. For example in windows you can commonly access the files on a PC (provided you have the authority) by simply typing the hostname and the disk letter followed by a $. I have outlined an example below:

3-6-2013 3-11-46 PM\\hostname\c$
\\hostname\e$
\\192.168.0.101\c$
You get the point, well in Windows 8 these are disabled by default, I know right. So instead of setting up your shares again lets just re-enable it really quickly!

 

Issue – Unable to connect to Windows 8 C$ shares

Solution – First of all you will need to be an  administrator  to access the registry.
On the computer you want to add the shares to start a new notepad document and paste in the following information:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
“LocalAccountTokenFilterPolicy”=dword:00000001

Now click File > Save As > Enable Shares.REG 
Now that you have saved the file simply run it to add it to the registry, you may need to reboot before it takes effect but from here on you will be able to access the shares.

 

 

 

 

Using Powershell to manage Data Deduplication | Server 2012 and Windows 8

Here is a quick guide on how to quickly check how well and when data deduplication will occur on Server 2012, and Windows 8 (if you have that installed, covered in  another  guide). Deduplication is a great way to save tons of space, its also built into Windows Server 2012 and can be added to Windows 8.

Issue – (any of the below)
I want to see how well deduplication is working,
I want to see when its running,
I want to force a data deduplication right now.
I hacked Windows 8 and dont have the server manager to see my disk space savings.
Windows 2012’s Server Manager takes a year to open, I just want to see some stats here people.


Solution –  First open up PowerShell, if you have removed it from the task bar then do a search for it then open it up.

/ ! \ It is important to note, you can not enable deduplication on the partition that windows is on. This will throw an error when you attempt to try and do this.

Once powershell is open we will be using the Get-Dedup commands see below for them.

First if you have not already enabled dedupe on a disk thats ok we can do that now. I will be using the drive letter E:\ as my example you will fill in your own disk where ever you see E:\ Type in Enable-DedupVolume E:

Set-DedupVolume E: -MinimumFileAgeDays 0 (This will set deduplication to run 24/7 as the file age is set to nothing this may cause high resource usage if you have lots of storage as it constly will try to  optimize  the system, I  recommended  3 days for a home file server. Microsoft  recommends 5 days.)

Start-DedupJob E: –Type Optimization (Now we want to run a single dedupe job to see how much we can save, since I dont want to wait for the system to check the age on all my files on my disk so lets just run it now. Give it about a  minute  to kick off the job and then we will check and see if its running.)

3-6-2013 2-57-18 PMGet-DedupStatus (This will output a simple list of your disks and how much space you have saved on them).

 

There you go! Dont forget to set the file age on the command Set-DedupVolume E: -MinimumFileAgeDays 5 or it will run constantly in the background! If your looking to add data deduplication to Windows 8 follow my guide here.

 

 

 

Adding Files and Documents to Windows 8 Metro UI

Recently I we recieved some tablets for new users and seeing as these were the first Windows 8 devices there are going to be tons of new questions, how do you combat this? Guides. Since in Windows 8 the default screen is the Metro UI it just makes sense to pin documents (PDF’s and whatnot) right there so the user can see them right when they start.

3-6-2013 1-13-21 PMIssue – Unable to pin Documents or Files to the Metro UI
When you try to Send To… or right click on the file in the Metro UI you will notice there is no pin option. Good news is this can simply be resolved.

 

 

3-6-2013 1-1-28 PMSolution – Take your document and create a new shortcut to to it by right click > Send to > Desktop (Create Shortcut).

Now you will need to put that new shortcut into: C:\ProgramData\Microsoft\Windows\Start Menu\Programs

 

3-6-2013 1-34-47 PMOnce the shortcut file is there simply open the Metro UI and hit Windows  keys; this will open the charms, hit Search on the top right.

Dont search for anything yet, you will see your shortcut that you just copied in the last step under the Apps section.

 

3-6-2013 1-37-15 PMSimply right click it (or pull down for touch devices) and you will see a Pin to Start button. Press it and your done!

There you go now you can add a bunch of guides, documents, and files right to the start menu of the computer.

Disable Windows 8 Store | Group Policy and Registry Edit

If your looking to keep users from opening the store and running apps there is good news! There are settings in both the registry and in group policy that allow you to do this. Here is a quick little guide on how its done.

3-4-2013 12-26-51 PMIssue – Users are accessing the store and installing apps.

Solution –
 If your not on a domain or dont want to use Group Policy then scroll down to the bottom for the registry edit. If not then start here.

 

3-4-2013 12-24-24 PM

First create a new group policy and open the Group Policy Management  Editor.
You will be looking under User Configuration / Policies / Administrative Templates / Windows Components / Store.

You will want to Enable this option.

 

 

Non-Domain / Registry method will be quicker however it would be more efficient in the future to use  Group Policy.

3-4-2013 12-49-30 PM

First open regedit (Press Start > Run > type regedit).

 

 

Then navigate to: HKEY_CURRENT_USER\Software\Policies\Microsoft\WindowsStore\
Create a new DWORD called “RemoveWindowsStore” set the value to 1.

There you have it! Store is officially closed so your users can get back to work.

-store-enable-disable-windows-8-store-disabled

 

Black Bar in right side of Internet Explorer

Recently I noticed a trend where some users were getting a  strange  black bar on the right side of their screen. Clicking in the empty space or on the scroll bar would cause  weird  behavior on the system and in Internet Explorer 9. So I have written a little guide on how to resolve this!

1Issue – Unable to remove black bar from the right side of Internet Explorer. Here is an image of Internet Explorer in Windows 7, you can clearly see the black bar on the right side of the browser.

 

 

 

2Solution –  First with Internet Explorer open press the Alt button on your keyboard, a menu will appear.

Navigate to the Tools tab.

Go down to Internet Options and click it. A new window will appear.

 

4In the Internet Options windows select the Advanced tab.

After choosing the Advanced Tab you will see Accelerated Graphics, this box will be unchecked. Check the box so it is no longer empty.  Now you will need to close then re-open Internet Explorer

5And here you are! No more black bar!
If you found this guide helpful please leave a comment!

 

 

 

Did this post help you resolve your issue? if so please leave me a note!