Windows Server Administration

Server Administration Articles and Tips for Network Admins

Archive for the ‘Windows Server 2008’ Category

What Everyone Ought to Know About Hyper-V

with 2 comments

Virtual World - Windows Server Hyper-VVirtualization, Virtualization, Virtualization, that is the buzz at the moment with the release of Microsoft’s Hyper-V in Windows 2008 Server. I have working with Hyper-V a bit over the past couple of weeks and my impression is both good and bad. Now I must admit that I have not really had a lot to do with Virtual Server 2005 and other virtualization technologies in the past, but I have decided to consolidate alot of my servers, considering I have had to run a lot on souped up desktops!

One thing that I am getting my head around is “Snap Shots”. I was reading a post about another Nightmare Hyper-V Story, and it was pretty close to the mark in terms of what I experienced when I arrived at work on Monday morning this week. I have been working on moving our Exchange Server over to Hyper-V and upgrading to Exchange 2007, we seemed to have things sorted and then over the weekend (Saturday morning to be exact) our mailstore server ground to a halt and was paused due to a lack of disk space on C Drive! In the midst o trying to free up some space and sort things out another network admin cut and pasted a file with an AVHD extension from an obscure location ProgramData\Microsoft\Windows\Hyper-V\GUID Number. Freed up some space, but when trying to start the Virtual Machine it spat out some errors and would not start. Note to Self: Make sure you have plenty of disk space !

Luckily enough I had just taken a copy of the VHD File a couple of day earlier and was able to just point to that VHD File and start the machine up and it seemed to work OK. Now according to HyperVoria these AVHD Files are to do with these “Snap Shots”, now there were snap shots created a while ago but they were deleted? I am not sure why these AVHD Files are still there? Anyway from what I can gather the merging of these AVHD Files to the Parent VHD File need to happen while the VM is powered off. So on Friday Night I am going to test this theory and power off this VM and let the merge take place and see if the AVHD Filed disappear and leave me with one VHD File.

Make sure you subscribe to my RSS Feed and keep updated with this process and the other articles that will be coming your way.

Written by Daniel Anderson

November 11th, 2008 at 1:18 pm

Schedule a Mailbox Export with Exchange 2007

without comments

A while ago I wrote about how to easily export Exchange 2007 MailBoxes to PST Files for archiving and backup purposes. Now that is OK if you want to run the process manually but what about scheduling the export for out of hours?

If you have followed the previous post and have successfully completed and export to PST File you will notice that you have to confirm that you want to proceed with the operation. Very annoying if you want to schedule this script and in fact the task will fail. This is how I managed to get around the need to confirm before proceeding prompt in the Exchange 2007 Management Shell.

If you remember from the previous post this command will export Mailboxes from a specific Database to individual PST Files.

get-mailbox -database “SERVER_NAME\DATABSE_NAME” | export-mailbox -PSTFolderPath C:\PSTFiles

With this command you will get a prompt asking you to Press A for All Y for Yes N for No etc etc. Not good if you want to schedule this.

Here is the KEY to avoid the prompts. Add -Confirm:$false to the end of the Export-Mailbox String. Therefore the new String would be:

get-mailbox -database “SERVER_NAME\DATABSE_NAME” | export-mailbox -PSTFolderPath C:\PSTFiles -Confirm:$false


All Done, Now you can Schedule away…….

Written by Daniel Anderson

November 6th, 2008 at 1:29 pm

WPAD Via DHCP Works Better Than Using DNS

with 2 comments

If anyone is using the Automatic Discovery for Web Proxy Clients, then you will know that you can deploy these settings either via DNS and or DHCP. For those who haven’t used this then here is a bit of an insight into how it works.

ISA 2004 and 2006 provides the ability for Web Proxy Clients to automatically locate the ISA Server to use for it’s clients requests. ISA Server uses the WPAD Protocol so that clients can locate the server that is hosting the Wpad.dat and Wspad.dat files. The Wpad.dat file is used by Web Proxy clients for automatic discovery information.

To make your proxy clients aware of it’s existance you can either use a DNS Ailias Entry or you can push the settings out via DHCP. First things first you need to configure Internet Explorer to use Automaic Discovery. Go to Tools > Internet Options > Connections > LAN Settings and tick Automatically Detect Settings.

On the ISA Server, I’m using ISA 2006, you need to goto Configuration > Networks > Network Tab. Right Click your “Internal Network” and then go to the Auto Discovery Tab. Place a tick in the Publish automatic discovery information for this network. You can test to see if you can get to the wpad.dat file by typing this URL into IE – http://servername:portnumber/wpad.dat and you should get the file.

Next you can either Configure a DNS Alias called WPAD and point that to the ISA box or you can configure the options on your DHCP Server. Now in my environment for some reason, which I am yet to work out, the DNS option seems to be a bit dodgy. So today I though I would configure the DHCP options, keeping in mind that remote access client will not be able to access the DHCP Server so this will not work for them, but for a Local Lan this will be fine, and an upside is that is provides faster access.

On your DHCP Server you need to Right Click the Server in the DHCP Manager Snap In and select Set Pre Defined Options, then click the Add Button. Name the Entry WPAD, Select String as the Data Type, and the code needs to be 252. The String Value needs to be this:

http://Computer_Name:Port/wpad.dat

Obviously substituting the computer name and port number to the ones relevant to your environment. Next you need to Right Click Server Options > Configure Options and then scroll right down to the bottom of the list until you find the 252 – WPAD Entry and place a tick in the box.

To make this work for my clients that already had DHCP Leases what I did was to go to the Address Leases and manually delete the current Leases and for the clients to options a new Lease and therefore the new Server Options. So far so good and it is all working extremely well.

Written by Daniel Anderson

November 1st, 2008 at 9:00 am

How To Use PowerShell to Bulk Import Users into Active Directory

with 2 comments

Well it is coming to that time of year again where we will be given a list of new students that will be enrolled for the 2009 School Year, and of course it is up to the IT Department to created the hundreds of accounts. This year I thought I would have a crack at using PowerShell to do a bulk import into Active Directory.

The first thing that I found was that PowerShell doesn’t have any specific Active Directory CMDLets, so I found these PowerShell CMDLets from Quest. A must have if you are working with Active Directory and PowerShell. There are a few pre requesests before installing so grab the PDF document associated and have a read. Let’s build the script!

I want to be able to import users from a CSV file so the the cmdlet that I amm interested in is Import-CSV which takes a parameter for the file name like so:

Import-CSV C:\New.csv

Next Step is to iterate through the file. This is done by piping the contents of the csv file to the For-EachObject cmdlet which inturn uses the New-QADUser cmdlet.

ForEach-Object {New-QADUser -ou domain.local/Students/2009 -name $_.Name -Description $_.Description -City $_.City -UserPassword $_.Password -SamAccountName $_.sAMAccountName -FirstName $_.FirstName -LastName $_.LastName -DisplayName $_.Name -UserPrincipalName $_.UPN}

If you type in get-help New-QADUser you will see the syntax and all the parameters you can include. In the above script you will see $_.Name etc etc. These correlate to the CSV File. My CSV File had Name, Description, UserPassword, sAMAccountName, FirstName, LastName, DispplayName and UPN. You can see the connection above. It doesn’t even matter what order they are in in the CSV File!

Did you Like This Post? Stay Updated with more How To’s and Tips by Subscribing to My RSS Feed

Written by Daniel Anderson

October 31st, 2008 at 11:20 am

Windows Server 2008 R2 Announced!

without comments

Oliver over at the Windows Server Division Weblog has just written a post on the Announcement of Windows Server R2, among the enchancements that caught my eye were the ones to do with virtualization, a new Hyper-V is built in offering some great new features.

Considering I will be consolidating alot of my servers over the coming months this will add some great benefits. I currently have 2 Exchange 2007 servers riunning on a Hyper-V box and seem to be going OK. One is running the CAS and Hub Transport Roles and the other is running the MailStore Role.

Make sure you check out the other inclutions in R2 on the Windows 2008 Server Website.

Written by Daniel Anderson

October 29th, 2008 at 3:15 am