Sync Center and Network Drives 2021

Non-Profit IT Manager 96 Reputation points
2021-01-07T22:19:04.817+00:00

I am using FolderRedirection GPO on a Windows Server 2019 Standard, most of our client computers are Windows 10, we have a few that are Windows 8.1.

Some client computers of users who use heavily network drives (which are provided by a centralized QNAP Linux-based NAS) are experiencing the following:

I found this on another locked thread from a home user having exactly the same issue I am having:

https://answers.microsoft.com/en-us/windows/forum/windows_7-networking/sync-center-and-network-drives/6b22ff59-0687-4092-bd9c-e3f29353541a

"I have been having a strange problem where Sync Center seems to be storing network drives as offline folders.
Even though I am connected to the network all the time and the network drives never go offline they still become unavailable.

The network drive appears in the sync partnerships but I have not set these up and have been unable to remove them even when turning offline files off and back on again.

The only Sync which should be there is the folder for eel1651 the rest are network drives which it should not be trying to Sync. It is causing files to become unavailable even when I am currently working on them, so I can't save them..."

I am using "net use" as netlogon scripts to mount different shares from the NAS, I mount them as a drive "P:\," but two of our sever users needs to constantly access one of the shares in that NAS. Every few days (sometimes only hours) the Sync Center adds that drive as a sync partnership and it renders the P:\ drive useless since it only lets the user see very few files and not the entire directory.

I tried enabling the "Remove "Make Available Offline" for these files and folders" from the FolderRedirection GPO adding every NAS Shared folder, I also tried the 'Remove "Make Available Offline" command" from the same GPO (not at the same time, because those two policies are contradictory) to no avail, it keeps coming back.

Every few days (sometimes hours), I have to remote-in, disable the "Offline Files," restart, the login as Administrator, browse to 'C:\Windows\CSC', play around for a while with the permissions, and remove the additional namespace "\10.0.0.66\Legal" and then I log out, go back to the user to whom this is happening to, re-enabled "Offline Files" and then when I restart it is gone.

And, it comes back later, for the user that was having the same issue, somehow it just did not happen again after resetting his Windows back to default, then it just stopped. But, with this other user, I already reset the computer back to default twice, and the issue keeps coming back.

Any ideas... Please help...

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,797 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,645 questions
Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
553 questions
0 comments No comments
{count} votes

Accepted answer
  1. Non-Profit IT Manager 96 Reputation points
    2021-01-19T01:24:12.587+00:00

    I thought about a workaround, since there seems to not be any permanent solution from a GPO level, how about I run a startup script for all users. It would need to check the CSC\namespace folder for the existence of 10.0.0.66, take ownership of the folder and delete it. That way, once the boot sequence is completed and the Sync Center starts, that Sync Partnership is already deleted.

    To avoid any time-consuming processes that could delay the boot up, I would need it to check if CSC\v2.0.6\namespace\10.0.0.66 exists, and if it does, to take ownership of it as Administrator and then delete it.

    I imagine it will first check the echo of the CMD dir command, and then if 10.0.0.66 exist, goto take ownership, and when the ownership is done, then delete and exit.

    I am not even sure how to check the echo of a command like dir, anyone who could give me any suggestions?

    I am thinking it would have to be something like this:

    ::::::::::::::::::::::::::::::::::::::::::::
    :: Automatically check & get admin rights
    ::::::::::::::::::::::::::::::::::::::::::::
    @echo off
    CLS
    ECHO.
    ECHO ===============================
    ECHO Running Admin Command Prompt
    ECHO ===============================
    
    :init
    setlocal DisableDelayedExpansion
    set "batchPath=%~0"
    for %%k in (%0) do set batchName=%%~nk
    set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
    setlocal EnableDelayedExpansion
    
    :checkPrivileges
    NET FILE 1>NUL 2>NUL
    if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
    
    :getPrivileges
    if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
    ECHO.
    ECHO **************************************
    ECHO Invoking UAC for Privilege Escalation
    ECHO **************************************
    
    ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
    ECHO args = "ELEV " >> "%vbsGetPrivileges%"
    ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
    ECHO args = args ^& strArg ^& " "  >> "%vbsGetPrivileges%"
    ECHO Next >> "%vbsGetPrivileges%"
    ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
    "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*
    exit /B
    
    :gotPrivileges
    setlocal & pushd .
    cd /d %~dp0
    if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul  &  shift /1)
    
    ::::::::::::::::::::::::::::
    ::START
    ::::::::::::::::::::::::::::
    
    :start
    cd C:\Windows\CSC\v2.0.6\namespace
    dir
    if '%1' == 'dir' ( echo 10.0.0.66 /1 & goto takeOwnership ) else ( goto Exit )
    
    :takeOwnership
    takeown /f C:\Windows\CSC\v2.0.6\namespece\10.0.0.66\* /R /A
    ::::::::::::::::::::::::::::::
    ::Incomplete step
    ::::::::::::::::::::::::::::::
    if '%1' == 'takeown' ( echo ::missing text:: goto delPartnership ) else ( goto Start )
    
    :delPartnership
    del C:\Wndows\CSC\v2.0.6\namespace\10.0.0.66 /y
    cd C:\Windows\CSC\v2.0.6\namespace
    dir
    if '%1' == 'dir' ( echo 10.0.0.66 /1 & goto Start ) else ( goto Exit )
    
    :Exit
    exit
    

    Can anyone check if I am correct?


5 additional answers

Sort by: Most helpful
  1. Non-Profit IT Manager 96 Reputation points
    2021-01-18T22:05:26.65+00:00

    The two computers I have been able to run gpresults /h on (now I have more computers having this issue), both are applying the policy:

    Policy Setting Winning GPO
    Remove "Make Available Offline" for these files and folders Enabled Folder Redirection
    Click Show and enter a UNC path for each file or folder

    Files and Folders: Source GPO
    \10.0.0.66\Probte Power Folder Redirection
    \10.0.0.66\Executive Director Folder Redirection
    \10.0.0.66\ValerieSc Folder Redirection
    \10.0.0.66\AdvoPueblo Folder Redirection
    \10.0.0.66\CommunityOrg Folder Redirection
    \10.0.0.66\Legal Folder Redirection
    \10.0.0.66\Advocacy1 Folder Redirection
    \10.0.0.66\AngelaNevin Folder Redirection
    \10.0.0.66\Reception 1 Folder Redirection
    \10.0.0.66\TransportationAdv Folder Redirection
    \10.0.0.66\ExecutiveAssist Folder Redirection
    \10.0.0.66\Advocacy 2 Folder Redirection
    \10.0.0.66\DevelopmentDir Folder Redirection

    After looking at some other policies, I think two policies are in contradiction because I have the following policy;

    Network/Offline Fileshide
    Policy Setting Winning GPO
    Action on server disconnect Enabled Folder Redirection
    Specify how the system is to respond when a network server
    becomes unavailable.

    Action: Work offline

    Never go offline = Server's files are unavailable to local computer
    Work offline = Server's files are available to local computer

    Which if I am interpreting it correctly, the local machine keeps trying to apply both policies thereby adding the extra sync partnership.

    Maybe if there was a GP to allow "Cashed files only from \[servername]" ... Every time that the additional Sync Partnership gets added, I do what is suggested in the links you sent, and delete the CSC, after a day or more (depending on how much the user has direct interaction with it) it comes back.

    The real problem with thi6s extra partnership is that most of the network folder's content becomes unavailable, and only a few directories are accessible.

    Thank you for trying...

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.