Results 1 to 6 of 6

Thread: Remove old server from offline sync using CSCCMD.exe?

  1. #1
    Join Date
    Nov 2010
    Posts
    4

    Remove old server from offline sync using CSCCMD.exe?

    Hi all

    There are 500+ profiles and redirected My Docs on serverA. We need to move all profiles and redirected My Docs to serverB. We are using the Microsoft CSCCMD.exe utility to manipulate the local CSC folder with the following logon script:-

    \\domain.com\NETLOGON\csccmd.exe /moveshare:\\serverA\mydocs$ \\serverB\mydocs$
    \\domain.com\NETLOGON\csccmd.exe /disconnect:\\serverA\mydocs$
    \\domain.com\NETLOGON\csccmd.exe /delete:\\serverA\mydocs$ /recurse2

    We're having real trouble getting consistency from the script, some machines process fine but others still insist on synch'ing the serverA on logon and logoff which will cause a real headache if hundreds of users report "failed to connect to serverA" messages.

    We've also tried csccmd.exe /UNPIN2 command with similar results.

    Any ideas please?

    Thanks
    Scott

  2. #2
    Join Date
    Nov 2010
    Posts
    4

    re: Remove old server from offline sync using CSCCMD.exe?

    All machines are XP SP3.

  3. #3
    Join Date
    Dec 2007
    Posts
    1,736

    Re: Remove old server from offline sync using CSCCMD.exe?

    Are you running the correct command that is used to configure and control offline files operation. I will list a few of those below for your refrence, just double check it:

    1. To check if Offline Files is enabled from the command line run the following command
      csccmd.exe /ISCSCENABLED
    2. To enable offline files from the command line
      csccmd.exe /ENABLE
    3. To disable offline files from the command line
      csccmd.exe /DISABLE
    4. To get the list of files/folders marked for offline availability
      csccmd.exe /RESID
    5. To examine offline files cache folder and report if there are any errors in the cache.
      [csccmd.exe /CHECKDB
    6. To display the folders in the local cache that are from \\server\share\path :
      csccmd.exe /ENUM[:\\server\share\path]
    7. To pin a file/folder for offline availability:
      csccmd.exe /PIN:<\\server\share\path
    8. Note that this will not synchronize the file to local cache folder. To invoke synchronization we need to run the below fill command
      csccmd.exe /FILL:\\server\share\path
    9. To unpin a folder(remove offline files feature):
      csccmd.exe /UNPIN:\\server\share\path
    10. To delete a folder from CSC cache:
      csccmd.exe /DELETE:\\server\share\path
    11. To check if server is offline:
      csccmd.exe /ISSERVEROFFLINE:\\server
    12. To disconnect a share from client side cache:
      csccmd.exe /DISCONNECT:\\server\share

  4. #4
    Join Date
    Nov 2010
    Posts
    4

    Re: Remove old server from offline sync using CSCCMD.exe?

    Hi James

    Yes. We are using the following csccmd.exe command lines:-

    \\domain.com\NETLOGON\csccmd.exe /moveshare:\\serverA\mydocs$ \\serverB\mydocs$
    \\domain.com\NETLOGON\csccmd.exe /disconnect:\\serverA\mydocs$
    \\domain.com\NETLOGON\csccmd.exe /delete:\\serverA\mydocs$ /recurse2

    I can see the GPO is being applied when I use AutoRuns to see all processed logon scripts. Also output of the logon script is piped to a text file (C:\Temp\%username%_%computername%.txt). Here are the contents of the text file (I've replaced real names with fictional names):-

    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /moveshare:\\serverA\mydocs$ \\serverB\mydocs$
    The command completed successfully.

    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /unpin2:\\serverA\mydocs$ /user /recurse2
    Unpinning "\\serverA\mydocs$" -> SUCCESS (PinCount = 0, HintFlags = 0x0)
    The command completed successfully.

    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /delete:\\serverA\mydocs$ /recurse2
    Deleting "\\serverA\mydocs$" -> ERROR 5
    System error 5 has occurred.
    Access is denied.

    We get inconsistent results when csccmd.exe tries to delete \\serverA\mydocs$. We have also tried /recurse and without any switches, again with mixed results. I have seen the '/delete /recurse2' work in the past but it doesn't work everytime for some bizarre reason, as is the case here. Is there a file locked somewhere perhaps?

    Here are 2 errors in the App Event Log:-

    Event Type: Error
    Event Source: Userenv
    Event Category: None
    Event ID: 1085
    Date: 29/11/2010
    Time: 11:34:17
    User: NT AUTHORITY\SYSTEM
    Computer: computerA
    Description:
    The Group Policy client-side extension Folder Redirection failed to execute. Please look for any errors reported earlier by that extension.

    Event Type: Error
    Event Source: Folder Redirection
    Event Category: None
    Event ID: 107
    Date: 29/11/2010
    Time: 11:34:16
    User: domain\userA
    Computer: computerA
    Description:
    Failed to perform redirection of folder My Pictures. The folder is configured to be redirected from <\\serverA\mydocs$\userA\My Documents\My Pictures> to <\\serverB\mydocs$\userA\My Documents\My Pictures>. The following error occurred:
    The directory name is invalid.

    I can browse to \\serverB\mydocs$\userA\My Documents\My Pictures fine so why would this be?

    When userA logs in, only \\serverB\mydocs$ synchs but when I launch mobsync.exe or run csccmd.exe /enum, \\serverA\mydocs$ is listed even when the text file reports that /delete successfully deleted this share. However, when I manually run csccmd.exe /delete:\\serverA\mydocs$ /recurse2 then csccmd.exe /enum \\serverA\mydocs$ is removed. But then it sometimes returns at next logon. What is causing it to come back from the dead? Is it because it cannot redirect the My Pictures folder and if so, why not please?

    Many thanks
    Scott

  5. #5
    Join Date
    Dec 2007
    Posts
    2,291

    Re: Remove old server from offline sync using CSCCMD.exe?

    Try the below steps that was discussed in the microsoft website:

    csccmd.exe /moveshare:\\Oldserver\Share \\new server\share
    eg: csccmd.exe /delete:\\mailserver\mydocs$ /recurse2
    Followe the KB# 230738
    To re-initialize the cache by pressing the CTRL+SHIFT key and hitting delete
    files option.
    Rebooted the system.
    If the reference to the old server is still present.
    Check the following key on the client machine.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache
    Saw some entries related to old server share listed under the key NetCache.
    Take a backup of the NetCache key and delete the keys related to old server
    ref.
    Reboot the system and we would able to synchronize the offline files with the
    new server and ref. to the old server should be removed successfully.

  6. #6
    Join Date
    Nov 2010
    Posts
    4

    Re: Remove old server from offline sync using CSCCMD.exe?

    It has been suggested elsewhere that the the XP SP3 version of fdeploy.dll creates misleading errors in Event Log and that are remedied by reverting to the XP SP2 version of fdeploy.dll. Does this tally with the "known issue" you allude to? Are there any other negative side-effects of fdeploy.dll we need to be aware of? I have tried to replace fdeploy.dll with the XP SP2 version for testing purposes but the XP SP3 version persistently restores itself, so I assume fdeploy.dll is a protected Windows file safeguarded by the System File Checker (SFC)?

    We have since managed to get more consistent results and remove the old server synch'ing altogether during logon and logoff with the following approach:-
    1 Run the following Logon script at every logon:-
    \\domain.com\NETLOGON\csccmd.exe /moveshare:\\serverA\mydocs$ \\serverB\mydocs$
    \\domain.com\NETLOGON\csccmd.exe /unpin2:\\serverA\mydocs$ /user /recurse2
    \\domain.com\NETLOGON\csccmd.exe /delete:\\serverA\mydocs$ /recurse2
    2 Run the following Logoff script at every logoff:-
    \\domain.com\NETLOGON\csccmd.exe /unpin2:\\serverA\mydocs$ /user /recurse2
    \\domain.com\NETLOGON\csccmd.exe /delete:\\serverA\mydocs$ /recurse2

    We had to run both of these Logon and Logoff scripts everytime because users ‘roaming’ to different laptops/desktops were seeing the old server reappear, I assume because each local CSC caches the old server until ‘csccmd.exe /moveshare’ updates it to the new server.
    We are piping the results for each user's logon and logoff scripts to a txt file for analytical purposes. Even though all appears well we are finding inconsistent results within these logfiles. For example, one machine records no errors such as:-

    ---------------------------------------------
    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /moveshare:\\serverA\mydocs$ \\serverB\mydocs$
    The command completed successfully.
    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /unpin2:\\serverA\mydocs$ /user /recurse2
    Unpinning "\\serverA\mydocs$" -> SUCCESS (PinCount = 0, HintFlags = 0x0)
    The command completed successfully.
    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /delete:\\serverA\mydocs$ /recurse2
    Deleting "\\serverA\mydocs$" -> SUCCESS
    The command completed successfully.
    ---------------------------------------------

    …while another machine reports errors have occurred even though the old server is no longer synch’ing, such as:-

    ---------------------------------------------
    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /moveshare:\\serverA\mydocs$ \\serverB\mydocs$
    The command completed successfully.
    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /unpin2:\\serverA\mydocs$ /user /recurse2
    Unpinning "\\serverA\mydocs$" -> ERROR 1
    System error 1 has occurred.
    Incorrect function.
    C:\WINDOWS>\\domain.com\NETLOGON\csccmd.exe /delete:\\serverA\mydocs$ /recurse2
    Deleting "\\serverA\mydocs$" -> ERROR 5
    System error 5 has occurred.
    Access is denied.
    --------------------------------------------

    … and those machines that were reporting no errors previously have been showing errors at a later date and vice versa, so we have a mixed bag of random errors, despite the old server no longer synch'ing on any of these machines. “Why worry then?” you ask. Well, we need to understand the significance of these errors in case we hit problems further down the line. For example, 2 of the 8 testers have already lost the contents of their MyDocs folder but managed to manually restore them from a previous date. But how and why did this happen? We cannot roll out this solution to the wider audience until these issues are understood and resolved. We couldn’t find anything useful in the Event Logs or userenv.log file.

    Any help would be much appreciated.

    Scott

Similar Threads

  1. Unable to sync offline files on Windows 7.
    By Glenn Willis in forum Operating Systems
    Replies: 5
    Last Post: 29-04-2011, 11:17 AM
  2. Software to sync offline files between two computer
    By Bees in forum Windows Software
    Replies: 7
    Last Post: 15-03-2011, 08:35 AM
  3. Cannot Remove Offline Files from Sync Center
    By Kanakpriya in forum Operating Systems
    Replies: 5
    Last Post: 03-04-2010, 04:55 AM
  4. How to Remove Old Server Sync
    By DarenHawk in forum Operating Systems
    Replies: 5
    Last Post: 20-04-2009, 02:34 PM
  5. Problem with Offline Files Sync
    By Bryan L in forum Windows Server Help
    Replies: 0
    Last Post: 21-11-2008, 09:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,619,354.52574 seconds with 17 queries