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!
-
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
Please sign in to leave a comment.
Comments
3 comments