Windows File Sync

Is there any type of scan or script that I can run to see what computers have Windows File Sync enabled?  Over the past few months we have had numerous reports of file sync being enabled.  I turned this feature off when I made the golden image, but it seems to be turning itself on.  I do have a group policy that is tested and ready to deploy to disable file sync, but I'd like to know what computers have it turned on.

Thank you!

0

Comments

3 comments
Date Votes
  • Import-Module ActiveDirectory


    Function OfflineFilesStatus {

    $Computers = Get-ADComputer -Filter 'Operatingsystem -Notlike "*server*" -and enabled -eq "true"' -Properties dnshostname|Select dnshostname -ExpandProperty dnshostname

    Foreach ($Computer in $Computers)
    {Get-WMIObject win32_OfflineFilesCache -ComputerName $Computer|
    Select @{n="Computer";e={$Computer}}, @{n="Enabled";e={$_.Enabled}}, @{n="Active";e={$_.Active}}
        }
    }
     
    $report = OfflineFilesStatus|Sort-Object Computer
    $report|Export-CSV C:\Temp\OfflineFilesStatusReport.csv -NoTypeInformation

    0
  • This is the error message I am getting when I run that on a test machine:

    The specified module 'ActiveDirectory' was not loaded because no valid module file was found in any module directory.
       At line:1 char:1

    0
  • I figured a way to do this with a registry scan, report and then dynamic computer group.  If Offline File Sync is enabled, then the following registry key will be set to a value of 1:

    LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CSC\Start

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post