Usage :: ROBOCOPY source destination [file [file]...] [options]

         source :: Source Directory (drive:\path or \\server\share\path).
    destination :: Destination Dir  (drive:\path or \\server\share\path).
           file :: File(s) to copy  (names/wildcards: default is "*.*").

:: Copy options :
             /S :: copy Subdirectories, but not empty ones.
             /E :: copy subdirectories, including Empty ones.
         /LEV:n :: only copy the top n LEVels of the source directory tree.

             /Z :: copy files in restartable mode.
             /B :: copy files in Backup mode.
            /ZB :: use restartable mode; if access denied use Backup mode.
        /EFSRAW :: copy all encrypted files in EFS RAW mode.

/COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT).
                   (copyflags : D=Data, A=Attributes, T=Timestamps).
                   (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).

       /DCOPY:T :: COPY Directory Timestamps.

           /SEC :: copy files with SECurity (equivalent to /COPY:DATS).
       /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
        /NOCOPY :: COPY NO file info (useful with /PURGE).

        /SECFIX :: FIX file SECurity on all files, even skipped files.
        /TIMFIX :: FIX file TIMes on all files, even skipped files.

         /PURGE :: delete dest files/dirs that no longer exist in source.
           /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

           /MOV :: MOVe files (delete from source after copying).
          /MOVE :: MOVE files AND dirs (delete from source after copying).

 /A+:[RASHCNET] :: add the given Attributes to copied files.
 /A-:[RASHCNET] :: remove the given Attributes from copied files.

        /CREATE :: CREATE directory tree and zero-length files only.
           /FAT :: create destination files using 8.3 FAT file names only.
           /256 :: turn off very long path (> 256 characters) support.

         /MON:n :: MONitor source; run again when more than n changes seen.
         /MOT:m :: MOnitor source; run again in m minutes Time, if changed.

  /RH:hhmm-hhmm :: Run Hours - times when new copies may be started.
            /PF :: check run hours on a Per File (not per pass) basis.

         /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines.

            /SL :: copy symbolic links versus the target.

        /MT[:n] :: Do multi-threaded copies with n threads (default 8).
                   n must be at least 1 and not greater than 128.
                   This option is incompatible with the /IPG and /EFSRAW options.
                   Redirect output using /LOG option for better performance.

:: File Selection Options :
             /A :: copy only files with the Archive attribute set.
             /M :: copy only files with the Archive attribute and reset it.
/IA:[RASHCNETO] :: Include only files with any of the given Attributes set.
/XA:[RASHCNETO] :: eXclude files with any of the given Attributes set.

/XF file [file]... :: eXclude Files matching given names/paths/wildcards.
/XD dirs [dirs]... :: eXclude Directories matching given names/paths.

            /XC :: eXclude Changed files.
            /XN :: eXclude Newer files.
            /XO :: eXclude Older files.
            /XX :: eXclude eXtra files and directories.
            /XL :: eXclude Lonely files and directories.
            /IS :: Include Same files.
            /IT :: Include Tweaked files.

         /MAX:n :: MAXimum file size - exclude files bigger than n bytes.
         /MIN:n :: MINimum file size - exclude files smaller than n bytes.

      /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
      /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
      /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
      /MINLAD:n :: MINimum Last Access Date - exclude files used since n.
                   (If n < 1900 then n = n days, else n = YYYYMMDD date).

            /XJ :: eXclude Junction points. (normally included by default).

           /FFT :: assume FAT File Times (2-second granularity).
           /DST :: compensate for one-hour DST time differences.

           /XJD :: eXclude Junction points for Directories.
           /XJF :: eXclude Junction points for Files.

:: Retry Options :
           /R:n :: number of Retries on failed copies: default 1 million.
           /W:n :: Wait time between retries: default is 30 seconds.

           /REG :: Save /R:n and /W:n in the Registry as default settings.

           /TBD :: wait for sharenames To Be Defined (retry error 67).

:: Logging Options :
             /L :: List only - don't copy, timestamp or delete any files.
             /X :: report all eXtra files, not just those selected.
             /V :: produce Verbose output, showing skipped files.
            /TS :: include source file Time Stamps in the output.
            /FP :: include Full Pathname of files in the output.
         /BYTES :: Print sizes as bytes.

            /NS :: No Size - don't log file sizes.
            /NC :: No Class - don't log file classes.
           /NFL :: No File List - don't log file names.
           /NDL :: No Directory List - don't log directory names.

            /NP :: No Progress - don't display percentage copied.
           /ETA :: show Estimated Time of Arrival of copied files.

      /LOG:file :: output status to LOG file (overwrite existing log).
     /LOG+:file :: output status to LOG file (append to existing log).

   /UNILOG:file :: output status to LOG file as UNICODE (overwrite existing log).
  /UNILOG+:file :: output status to LOG file as UNICODE (append to existing log).

           /TEE :: output to console window, as well as the log file.

           /NJH :: No Job Header.
           /NJS :: No Job Summary.

       /UNICODE :: output status as UNICODE.

:: Job Options :
   /JOB:jobname :: take parameters from the named JOB file.
  /SAVE:jobname :: SAVE parameters to the named job file
          /QUIT :: QUIT after processing command line (to view parameters).
          /NOSD :: NO Source Directory is specified.
          /NODD :: NO Destination Directory is specified.
            /IF :: Include the following Files.

XPERF – All that you would need to troubleshoot slow startups and logon times in Windows

I am going to talk something that I got really excited about as a tool that you must have if you are into IT support.

The tool is a Microsoft built tool named XPERF.

Xperf is an advanced troubleshooting tool that digs deeper into performance issues than Perfmon ever dreamed of. It is part of a product suite called the Windows Performance Toolkit (WPT), which is part of the Microsoft Software Development Kit (SDK). Xperf leverages Event Tracing for Windows (ETW), a built-in component of the server operating system that provides detailed performance and system data.

The Xperf utility excels in troubleshooting areas like responsiveness issues, slow boot times, high CPU and disk usage, application delays and slow transitions. It’s supported across x86, x64 and IA-64 architectures with less than 2.5% CPU overhead while gathering over 20,000 events per second.

In other words, this is one tool you’ll definitely want to add to your toolbox. But before we get into the many features Xperf has to offer, let’s first go through a short tutorial of how to install and use the tool for troubleshooting Windows performance issues.

Installing Xperf
As previously mentioned, the Windows Performance Toolkit is distributed with the Windows Software Development Kit. To install the SDK, however, you must first install Microsoft .NET Framework 4. Unless you want to install the entire 4 GB SDK, you should only select the Windows Performance Toolkit and the Debugging Tools for Windows options, as shown in Figure 1.

You will also want to select Redistributable Packages for the WPT and Debugging Tools options so that individual kits are available for future installations without forcing you to reinstall the SDK. The resulting Windows Performance Toolkit and debugging kits can be found in:

C:\Program Files\Microsoft SDKs\Windows\v7.1\Redist\Windows Performance Toolkit

Figure 1: Installation options for Windows SDK (click to enlarge)
Installation options for Windows SDK

If you run into any problems during the SDK installation, you can refer to this troubleshooting page for assistance with things like clearing the AppData\Local\Temp folder (which I had to do). After the installation, a new program group will be created for the WPT, as shown in Figure 2. The corresponding folder for the tools will be found in:

C:\Program Files\Microsoft Windows Performance Toolkit

Figure 2: Windows Performance Toolkit program group
Windows Performance Toolkit program group

Leveraging and using xPerf
Once you have WPT (Xperf) installed on the troublesome server, the next thing to do is start a collection of event tracing. There are numerous potential events that can be traced depending on the issue you are troubleshooting. A good place to start is with the Xperf CLI command:

Xperf –on DiagEasy

This will start a collection of events with several kernel providers, including PROC_THREAD, LOADER, DISK_IO, HARD_FAULTS, DPC, INTERRUPT, CSWITCH and PERF_COUNTER, which log the data to an event trace log file called kernel.etl. For a list of all kernel providers, issue this command:

Xperf –providers KG

Note: Extensive online help is available that explains each provider in detail.

Once you have started the collection, allow the server to exhibit the behavior you are troubleshooting and then stop the collection with this command:

Xperf –d trace.etl

This will merge the data that was buffered in kernel.etl and create a final trace file called trace.etl. This trace file can be analyzed on the server where the problem is occurring or on a different server where WPT is also installed. To view the resulting graphs and charts, use this command:

Xperf trace.etl

The trace file will be processed in two passes, producing a variety of graphs. The default graphs include:

  • CPU usage by CPU
  • CPU usage by process
  • CPU usage by thread
  • CPU idle states
  • Disk I/O, Disk utilization
  • Disk utilization by process
  • Process lifetimes
  • DPC CPU usage
  • Interrupt CPU usage
  • Hard faults
  • Generic events

By hovering your mouse pointer over a particular line on the graph, additional details will be provided such as the name of the process that is accumulating all the CPU time. For instance, in Figure 3 you can clearly see how the antivirus process Rtvscan.exe is dominating the CPU usage.

Figure 3: CPU Usage by Process graph (click to enlarge)
CPU Usage by Process graph

Another nice benefit of using Xperf is the ability to zoom in on a particular time range to take a closer look at the graph. In Figure 4, you can see the Disk Utilization graph shows a spike in activity after the first 60 seconds. Zoom in on the time period in question by using the mouse pointer to click and drag over that area of the graph, then right-click and choose Zoom To Selection. This will produce another graph for just the time period you specified. To revert to the original graph, right-click the graph and select Unzoom.

Figure 4: Xperf zoom feature (click to enlarge)
Xperf zoom feature

To get even more detailed, you can right-click a graph and select Summary Table. This will produce a chart that documents all the corresponding counters and data associated with the graph. For instance, Figure 5 illustrates the Disk Summary Table for the Disk I/O graph. Line 1 of the chart clearly shows how the Rtvscan.exe process is accumulating massive read counts, which would be expected for an antivirus scan.

Figure 5: Disk Summary Table for the Disk I/O graph (click to enlarge)
Disk Summary Table for Disk I/O graph

As you can see, Xperf is a very powerful and intuitive tool that can really help you drill down on performance issues. I have just touched the tip of the iceberg with regards to Xperf’s capabilities, however, as the tool is also great for slow boot investigation, high kernel and interrupt times and hot file analysis. Each of these areas alone deserves its own discussion of the features and benefits.

How to Change the Default Settings on the Citrix Generic Universal Printer


This article describes how to change the default settings for the Citrix Generic Universal Printer by overriding the hard-coded default settings of the Citrix Generic Universal Printer with registry keys of the manual setting.


The Citrix Universal Printer in XenApp was originally created with static default printer settings. For examples, paper size, paper width, number of copies, and so on.


  • XenApp 5.0 for Windows 2008
  • XenApp 6.x for Windows 2008 R2 include the fix


Caution! This procedure requires you to edit the registry. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Back up the registry before you edit it.

Use the following registry values to override the default settings:

Name: see the following table
Data: see the following table

The following table provides information about the Registry Chart:





1 = portrait
2 = landscape


1 = letter
9 = A4

118 = last paper defined in paper table


1 – 65535


1 – 65535


1 – 1000


1 – 9999


1 – 15


1 = draft
4 = high


1 = monochrome
2 = color


1 = simplex
2 = horizontal
3 = vertical


32 – 65535


1 = bitmap
2 = download
3 = substitute
4 = outline


0 = false
1 = true


0 – 65535


0 – 65535


0 – 65535


0 – 65535


Form name, such as letter, A4, tabloid, or other available form options

Note: The Citrix Generic Universal Printer uses the preceding defined registry settings to override the default settings. Any changes to these settings using the printer preferences of the Citrix Universal Printer might be retained.

More Information

CTX089874 – Troubleshooting and Explaining the Citrix Universal Print Driver

CTX106812 – How to Auto-Create the Generic Citrix Universal Printer in User Sessions

CTX119690 – The Printing Jobs Take More Time When Using the Citrix Universal Printer