title: C# / Powershell Sync offline files
body: <p>Having some trouble with offline files in our organization.
  Our config is to have the offline files in online mode and this causes problems with users shutting down their computers and then the changes have not synchronized down to the local cache.
  This function existed in Windows XP but we are now running Windows 7 and need a solution for this.
  I don't have any code of my own except this powershell snippet:</p>
  
  <pre><code>$wmiCSC = [wmiclass]"Win32_OfflineFilesCache" 
  $wmiCSC.Synchronize("\\contoso.com\users\",0x00000002)  
  </code></pre>
  
  <p>From what I understand of this page: <a href="http://msdn.microsoft.com/en-us/library/bb530502(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb530502(v=vs.85).aspx</a>
  When I execute the lines of code it Thinks for a while and then returns 0 but no sync has been done.
  I was hoping maybe someone already have done this or had the same problem and maybe can offer a solution, I am not really clear on how to use the Synchronize method and all it's parameters :)
  It by no means HAVE to be a WMI solution, any solution is a good solution :)</p>