Subscribe
Accepted Solution

Powershell - Changing the offline file settings on a CIFS share

[ Edited ]

Hi all,

 

I am writing a Powershell script (using the Netapp Powershell Toolkit), that prompts for some input, which it then uses to provision a volume and an associated share whilst applying all of the desired config (eg snapmirror, vfiler DR, snapshots schedules, CIFS share permissions and so on)

 

This all works nicely apart from one setting. I want to set the offline settings for the share to 'No files or programs are available offline'. I cannot find any way of doing this for a share that resides on a Netapp.

 

Does anyone know if this is possible, and if so, how to do it?

 

TIA

 

Mark

Re: Powershell - Changing the offline file settings on a CIFS share

Assuming you're using clustered Data ONTAP, use the "Set-NcCifsShare" cmdlet with the "-OfflineFilesMode none" option.  For 7-mode, use "Set-NaCifsShare" with the option "-Caching no_caching" (which is the default).

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Powershell - Changing the offline file settings on a CIFS share

Great, that works perfectly, Many Thanks Smiley Happy