Tuesday, January 26, 2010

Printer Deployment with Group Policy Step by Step

Here at Mount in the past we have done our printer deployment to all the various computers across campus with vb scripts that run at user logon. For a while, this worked well and delivered the printers people need to computer according to where they were placed in an OU structure that matched printer associations. Recently however certain sections of computers have simply stopped receiving the printers, so we went about finding a new way to deploy them without using vb scripts.

As a background about our infrastructure, our public computers are all running Windows XP which makes the deployment of printers slightly more complicated.

To accomplish this we followed the Microsoft article here.
1. Open the Group Policy Management Console and browse to a policy you want to use to deploy the file PushPrinterConnections.exe this allows the XP machines to accept printers deploy via the deploy printers option in the Management Console.

2. We chose to push the file out during the computer startup which seems to help save time during the user logging on. Copy a x86 version of the file to the folder for the GPO, then add file as in the image below.

3. At this point we went to the GPO that was assigned to the computers we have been having difficulty with, ie. the Mezzanine section of the library. You can add the printer to the deployed printers under Computer Configuration > Policies > Windows Settings.
Note: The one weakness of this setup is not being able to currently specify a default printer. For now we will just have the default added. There are 2 possible remedies to this problem, the first is creating another vb script to assign the default printer. The 2nd, is to upgrade your AD to Windows Server 2008 R2 and take advantage of the Group Policy Client Side Extensions. We are not at the level of AD yet, but our plan is to upgrade to it in the near future. So for now we will live with only having one printer installed in those couple areas where problems occurred with the vb scripts.

Tuesday, January 5, 2010

Reconnecting VMhost after losing connections due to config problems

In trying to figure out our VMware setup, configure the switches and virtual switches many times I ended up losing connectivity to the vmhosts. The majority of the time this was caused by moving the vmnics into and out of the different switches or switch groups.

When ever this occurs the only way I have found to correct it is by going to the host console, for us this is accomplished via the remote console. When using the remote console I have found the following commands to be a great deal of help.

Many of these were taken from various VM sites including here, here or here.

To view the current configuration you can use
esxcfg-vswitch -l
which will create an output like.
For a virtual switch you can use commands like
esxcfg-vswitch -U {$vmnicid#} {$virtualSwitchName} this will remove or unlink the vmnic from the switch.

To link or add a vmnic to a virtual switch use the command
esxcfg-vswitch -L {$vmnicid#} {$virtualSwitchName}

To link or add a vmnic to a Distributed virtual switch or DVP use the command
esxcfg-vswitch -P {$vmnicid#} -V {$dvportId} {$dvswitchName}

To unlink or remove a vmnic from a Distributed virtual switch or DVP use the command
esxcfg-vswitch -Q {$vmnicid#} -V {$dvportId} {$dvswitchName}