Howto: Disable a NIC when running Sysprep


Disabling a network card when running sysprepping a Windows machine is easy.  Two things need to happen: 

1.  Add the following command to the [GuiRunOnce] section of your sysprep.inf file
 
Command0=”C:\temp\disablenic.cmd”
 
2.  On the machine you are sysprepping, create a C:\temp\disablenic.cmd file that contains the following:
 
netsh interface set interface “Local Area Connection 2” DISABLED
 
Change the name of the interface you want disabled as needed.  To determine the names of all network interfaces on a system, run the following command:
 
netsh interface show interface
 
Proceed with syspreping as normal. When the machine boots up, the specified network interface(s) will be disabled.

Howto: Enable Remote Desktop on a Windows 2008 Server Core System


Windows 2008 Server Core uses the SCregEdit.wsf script found in C:\Windows\System32 to configure Terminal Services (TS) behavior. TS is the method of remote controlling your Server Core system through Remote Desktop (RDP).

To view the current Terminal Server settings for Vista/Windows 2008 clients, at the server command prompt type:

c:\windows\system32\scregedit.wsf /AR /v

The following values correspond to the response generated by the scregedit.wsf script.

1 = Terminal Services Disabled (remote access disabled)

0 = Terminal Services Enabled (remote access enabled)

To enable Terminal Services access from Vista/Windows 2008, at the server command prompt type:

c:\windows\system32\scregedit.wsf /AR 0

To disable Terminal Services access from Vista/Windows 2008, at the server command prompt type:

c:\windows\system32\scregedit.wsf /AR 1

Note:

The /AR setting applies to Windows Vista/2008 machines. If you want to allow Terminal Services connections to the Windows 2008 server from Windows XP machines, you have to use the /CS switch.

To view the current Terminal Server settings for Windows XP clients, at the server command prompt type:

c:\windows\system32\scregedit.wsf /AR /v

To enable Terminal Services access from Windows XP, at the server command prompt type:

c:\windows\system32\scregedit.wsf /CS 0

To disable Terminal Services access from Windows XP, at the server command prompt type:

c:\windows\system32\scregedit.wsf /CS 1

You could also edit the registry directly to enable Terminal Services using the same registry entry I wrote about when describing how to enable remote access for Windows XP machines remotely.

Finally you will need to create a hole in your server’s Windows Firewall for inbound RDP traffic on port 3389. KB 947709 details how to use the netsh advfirewall firewall command to configure the firewall in several different ways. I suggest running the following at the server command prompt:

netsh advfirewall firewall set rule group=”remote desktop” new enable=yes

Solved: “The connection has been lost. Attempting to reconnect to your session…” when attempting to access a Windows 2003 server from a Windows Vista Remote Desktop Session


“The connection has been lost. Attempting to reconnect to your session…” had almost made me scrap Vista on my home PC. Ever since my hard drive died and I committed to Vista, I’ve received this error message when attempting to access my Windows 2003 SBS Server. I’ve had no problems accessing Windows XP based machines, but I experienced the exact same issue using Terminals from this machine.

I was sick of having to break out my XP laptop to administer my work network from home, so I decided today was the day to fix this problem. I searched and Googled and read the entire Vista Remote Desktop Connection Authentication FAQ, but did not find the answer.

I hoped setting the AuthenticationLevelOverride registry key would do it, but that didn’t make a difference.

Finally, when I thought all hope was lost (and dinner was on the table), I came across this post, which said to run the following from an elevated command prompt:

netsh interface tcp set global autotuninglevel=disabled

This disabled Vista’s TCP/IP autotuning feature. I didn’t even have to reboot, Remote Desktop has worked great ever since I made this change. No more problems, not even once.

If for some reason you want to re-enable TCP/IP auto tuning, the command is:

netsh interface tcp set global autotuninglevel=normal

Check out my other post concerning problems with Vista’s auto tuning and Microsoft Outlook 2007’s cached mode.

Spiceworks – a free IT management system


Today I finally got around to installing spiceworks. The spiceworks.com web site claims the software is an IT manager’s dream – asset management and help desk, all from a simple Windows PC.

The installation took all of five minutes to complete. I think the most difficult part of the install was figuring out if my machine was already running a web server, or if spiceworks could use the default port 80.

Once the program initialized, I was prompted to answer a few questions, then the program started probing my network for devices. Several devices were unreachable (due to firewall or permissions issues) , and spiceworks prompted me to manually login to each unreachable machine and manually hit the web server on my spiceworks PC.

In order for the firewall to allow access to spiceworks, I was instructed to execute

netsh firewall set service REMOTEADMIN enable

After executing the above command I was able to successfully inventory my firewalled machines.

I was very impressed with both the ease of use and functionality of the software. Many of the discovery, monitoring, and alerting items I have only seen previously in commercial (and expensive!) software.

If you’re looking for a help desk/asset management solution, give spiceworks a try.