Windows Tip Sheet
Managing Offline Files
Take command with CSC and Group Policy.
One Windows feature I’m often questioned about by readers
is Offline Files which, by the way, is also known as Client-Side
Caching, or CSC. It’s important to know that alternate name
because a lot of Microsoft Knowledge Base articles use it, so if
you’re a regular Knowledge Base browser (tells you what kind
of a life I have, huh?), searching on CSC can turn up some pretty
New and Improved!
Knowledge Base article 884739,
for example, was recently published and talked about a brand-new
version of the CSC command-line tool, which is used to manage CSC—okay,
Offline Files—on client computers. The new version provides
some cool new functionality that makes managing offline files just
a tad easier. You will need to contact Product Support Services
(PSS) to obtain the new tool, although I’m a bit unclear why
it can’t just be a download from the Microsoft Web site.
The tool is CSCCMD, and it has several options for client-side
caching management, such as:
- /ENABLE, which turns on CSC. Only local admins can use
- /DISABLE, which turns CSC off again. Again, only local
admins can use it.
- /ENUM:\\Server\Share, which enumerates all files in the
cache from the specified server and share. You can add a path,
if you like, to be more specific: /ENUM:\\Server\Share\Folder\Subfolder,
for example. Add /RECURSE to include subfolders. This is a keen
way to see what files from a particular share are being cached
by a client; you could use this in a batch file or logon script,
saving the results to a text file, to generate a network-wide
inventory of cached files.
- /DISCONNECT:\\Server\Share disconnects the client computer
from the specified share so that the synchronization manager no
longer tries to synchronize files from that share.
- /MOVESHARE:\\Server1\Share1 \\Server2\Share2 is complicated,
but what it does is tell the offline files manager that the files
which used to be on \\Server1\Share1 are now located on \\Server2\Share2.
Offline Files updates the cache to mark files appropriately. This
is a handy way of telling a disconnected client that its file
sources have moved so that when the client goes to re-synch again,
it can find everything.
There are nearly a dozen other command-line switches to check the
CSC database, force caching of files, check the status of CSC, specify
files to cache (what a great logon script trick—you tell the
users’ computers which files will be cached so the users don’t
have to), extract files from the cache, and so forth. Check it out.
| Did you know that Windows will automagically
cache files that are opened from network shares?
You (or the user) can specify the maximum amount
of disk space used for this automatic caching, and
the latest-opened files will replace older ones
when that disk space runs low.
You can use Group
Policy to specify many Offline Files options,
including a list of filename extensions which
may not be cached. Microsoft Access files are,
for example, part of the default do-not-cache
list since caching a database used by multiple
users will usually result in issues when the cached
copy is synchronized.
- Read KB article 884739
- Contact PSS to obtain the tool
(this may cost you depending on your relationship with PSS).
- Learn more about configuring Offline Files here.
- Learn about Offline Files and security here.
Don Jones is a multiple-year recipient of Microsoft’s MVP Award, and is Curriculum Director for IT Pro Content for video training company Pluralsight. Don is also a co-founder and President of PowerShell.org, a community dedicated to Microsoft’s Windows PowerShell technology. Don has more than two decades of experience in the IT industry, and specializes in the Microsoft business technology platform. He’s the author of more than 50 technology books, an accomplished IT journalist, and a sought-after speaker and instructor at conferences worldwide. Reach Don on Twitter at @concentratedDon, or on Facebook at Facebook.com/ConcentratedDon.