Contrary to common belief, Citrix printing CAN be reliable.
The following steps will guide you in attaining that.
The environment is Windows 2003 Server, Xenapp 4.5, and a wire array of clients; standard metaframe server.
So, probably a dumb question – what is the print spooler. Keep in mind that with this excercise we are looking to tie in the windows spooler and citrix spooler service.
The considerations are:
- The printing policy
- Native/Non-native drivers
- Discovering and Eliminating unreliable drivers
- Deleting faulty drivers
The printing policy:
- Auto creation – Auto create all client printers
- Print job routing: If you have a print server this will help skip another loop.
- Native driver auto-install. This determines if your server will get cluttered with bad drivers in the long run. Do not automatically install drivers.
- Universal driver: Use the Citrix Universal Print Driver:
Native/Non Native Drivers:
The best practice with drivers is to avoid both if Citrix was questioned. In real life, most environments will have a few native/non-native drivers which you HAVE to install. This is usually due to photocopier options, security and in general just something the Citrix Universal print driver does not handle.
BUT – We also need to make sure these drivers are safe and will not compromise stability.
This is a two part process, A. ensuring whether the driver in question is native (preferred), B. making sure the driver is reliable.
For this we need to two tools:
- Citrix’s Stress Tools – this will work on all windows environments and can be found in 32&64 bit flavours.
This ZIP will need to be extracted to a local drive on the server you’re looking to test.
- Citrix’s Print Detective – this will also need to run locally.
- You will use this to identify what drivers are native or otherwise. Run the application from where you unzipped it. Right click and “Show Non-Native/Non-Citrix drivers only”.
- The main aim is to test the Drivers identified in step 1. Yes I know, there are some Microsoft printers in there, doing this exercise is adhering with Citrix’s guidelines and these drivers we “should” test.
Stressing the server
- Run your Stress Printer application from where you unzipped it.
- The options you need to look at are “The number of concurrent add events”, 5 is recommended, and “The number of times to repeat the test”, 5 as well. “Verbose mode” and “Apply these settings to all printers” will need to be checked. The selected printers will be the ones we identified in the previous paragraph.
- Ignore Warnings in the log. You are looking for 0 Errors.
Deleting Faulty drivers
- The identified faulty drivers will need deletion.
- Go to Start, Printers and Faxes, on the top right click on File, Server properties, then choose the drivers tab. Select the appropriate driver then “Remove”
You now have a stable Citrix printing environment.
I intend on putting this up as pdf soon.
Replace DFS with a monitored robocopy script.
DFS has been a great system you would use to replicate files from one site to another; however one of the biggest limitations is the inability of monitoring it, IE – daily log to show that:
- It is still working
- To show WHAT is getting replicated
As a replacement I have taken a step backwards and setup a robocopy script as a scheduled task to mirror a source in a different location and a second script to send you the logs. Plain and simple.
The robocopy script is as follows:
::SET _source=”c:Example Source Folder”
SET _dest=”d:Example Destination Folder”
SET _what=/COPYALL /B /SEC /A-:H /MIR /XD “C:System Volume Information”
:: /COPYALL :: COPY ALL file info
:: /B :: copy files in Backup mode.
:: /SEC :: Copy security Descriptors
:: /MIR :: MIRror a directory tree
:: /XD :: Copy except for the following folders
:: /XF :: Exclude file(s) – ie the log file
:: /A :: Set attributes
SET _options=/R:3 /W:5 /LOG:C:robolog.txt /NP /NDL
:: /R:n :: number of Retries
:: /W:n :: Wait time between retries
:: /LOG :: Output log file; can be placed of a network share
:: /NFL :: No file logging
:: /NDL :: No dir logging
:: /NP :: No Progress – does not show progress bar
ROBOCOPY %_source% %_dest% %_what% %_options%
Now that we have replication, lets get some logging:
Set objMessage = CreateObject(“CDO.Message”)
objMessage.Subject = “Replication logs”
objMessage.From = “email@example.com”
objMessage.To = “firstname.lastname@example.org”
objMessage.TextBody = “Please find attached you backup logs.”
(“http://schemas.microsoft.com/cdo/configuration/sendusing“) = 2
(“http://schemas.microsoft.com/cdo/configuration/smtpserver“) = “servername”
(“http://schemas.microsoft.com/cdo/configuration/smtpserverport“) = 25