Software Development Kit (SDK) and API Discussions

Powershell - Changing the offline file settings on a CIFS share

markey164
2,992 Views

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

1 ACCEPTED SOLUTION

asulliva
2,970 Views

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.

View solution in original post

2 REPLIES 2

asulliva
2,971 Views

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.

markey164
2,951 Views

Great, that works perfectly, Many Thanks 🙂

Public