Licensing Windows Server in a Virtual Environment

Filed Under (Microsoft, Windows Server 2008) by Tariq Jaber on 26-01-2010

Tagged Under :

The following link provides a good description of “Licensing Windows Server in a Virtual Environment”:

http://blogs.technet.com/mattmcspirit/archive/2008/11/13/licensing-windows-server-in-a-virtual-environment.aspx

Your user profile was not loaded correctly! You have been logged on with a temporary profile

Filed Under (Microsoft, Windows Server 2008) by Tariq Jaber on 12-01-2010

Tagged Under : ,

If the user profile was deleted, then you will get this message:

Your user profile was not loaded correctly! You have been logged on with a temporary profile.

To solve this issue, open C:\Users\ and notice the name of the temp profile, if it is not “TEMP” it will be like “TEMP.DOMAIN.00X”.

Locate the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

Now locate teh subkey which contains the “ProfileImagePath” value with the data “<temp-profile-name>” which we noticed from C:\Users folder and delete this subkey. Logoff and login again.

If you were unable to login with the error message stating that the profile is not found, just restart the machine and you will be able to login.

Syspreping a Hyper-V machine

Filed Under (Microsoft, Windows Server 2008) by Tariq Jaber on 11-01-2010

Tagged Under : ,

If you want to sysprep a Hyper-V machine, make sure it has no snapshots.

I was syspreping one of my Hyper-V machines, I copied the syspreped vhd and created a new virtual machine linked to this existing syspreped vhd. When I start this new virtual machine it starts as it wasn’t syspreped with menu to select either to “Safe mode” or to “Start Windows normally”.

I deleted the snapshots that I don’t need and I applied others to the original virtual machine. After this, I was able to sysprep and create a new virtual machine successfully.

PS: Usually we will sysprep a clean machine, not a machine with applications and services installed on it with so many snapshots.

How to sysprep Windows Server 2008

Filed Under (Microsoft, Windows Server 2008) by Tariq Jaber on 11-01-2010

Tagged Under : ,

If you want to sysprep a Windows Server 2008 machine, it is an easy process :

  • Navigate to C:\Windows\System32\Sysprep
  • Run Sysprep.exe
  • Check “Generalize” (this regenerates SID’s)
  • Change Shutdown option to to Shutdown.

That is it :)

Adding DHCP Scopes using command line in Windows Server 2008

Filed Under (Microsoft, Windows Server 2008) by Tariq Jaber on 10-01-2010

Tagged Under : ,

Adding so many DHCP scopes to the server all at the same time, this will consume a lot of time, so it is good to know how to add, configure and activate DHCP scopes using command line in Windows Server 2008.

The following commands are used to add the scope 172.16.16.0 with the name of “HR Users” with the subnet mask 255.255.255.0.

The IP range for

netsh dhcp server \\DHCP-Server add scope 172.16.16.0 255.255.255.0 “HR Users”
netsh dhcp server \\DHCP-Server scope 172.16.16.0 add iprange 172.16.16.1 172.16.16.254
netsh dhcp server \\DHCP-Server scope 172.16.16.0 add excluderange 172.16.16.1 172.16.16.20
netsh dhcp server \\DHCP-Server scope 172.16.16.0 set optionvalue 003 ipaddress 172.16.16.1
netsh dhcp server \\DHCP-Server scope 172.16.16.0 set optionvalue 006 ipaddress 172.16.10.10 172.16.10.11
netsh dhcp server \\DHCP-Server scope 172.16.16.0 set state 1

Commands’ description:

netsh dhcp server \\<Server> add scope <Subnet> <Subnet mask> <ScopeName>
netsh dhcp server \\<Server> scope 172.16.16.0 add iprange <StartIP> <EndIP>
netsh dhcp server \\<Server> scope 172.16.16.0 add excluderange <StartExclusion> <End-Exclusion>
netsh dhcp server \\<Server> scope 172.16.16.0 set optionvalue 003 IPADDRESS <Gateway1>
netsh dhcp server \\<Server> scope 172.16.16.0 set optionvalue 006 IPADDRESS <Primary DNS> <Secondary DNS>
netsh dhcp server \\<Server> scope 172.16.16.0 set state 1