Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Powershell - Changing the offline file settings on a CIFS share

2016-02-19
09:22 AM
3,780 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! See The Solution
1 ACCEPTED SOLUTION
markey164 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
2 REPLIES 2
markey164 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great, that works perfectly, Many Thanks 🙂
