0

I have configured a drive to be available offline. This drive maps to my user's home drive. The only setting that I cannot figure out is how to automatically select the "Always available offline" option on the drive at each domain user's computer. Is there a command or PowerShell cmdlet I can run to do this? Or perhaps using WMI?

I say Reinstate Monica
  • 3,132
  • 7
  • 28
  • 52
veel84
  • 288
  • 1
  • 6
  • 14
  • i found this powershell script $o = New-Object -ComObject Shell.Application $o.Namespace("Z:\").Self.verbs() | Where-Object { $_.Name -eq 'Always &available offline' } | ForEach-Object { $_.DoIt() } here [link](https://social.technet.microsoft.com/Forums/scriptcenter/en-US/9fc4fe46-1bc5-4e58-9eb8-a01b7c83e135/script-always-available-offline-for-subfolder-of-share-on-windows-7-x64-client?forum=ITCG) – veel84 Jan 11 '17 at 16:12

1 Answers1

1

Use the Administratively assigned offline files group policy setting to make the desired location always available offline as follows:

  1. In Group Policy editor, navigate to User Configuration\Administrative Templates\Network\Offline Files
  2. Enable the Specify administratively assigned offline files policy
  3. Configure the policy by clicking Show... and in the Value name column specify the fully qualified UNC path to the folder to always make available offline (e.g. \\Server\Share\%USERNAME%). Leave the Value field blank.
    Note: According to this SpiceWorks thread you should be able to use environment variables when specifying the UNC path name.
I say Reinstate Monica
  • 3,132
  • 7
  • 28
  • 52