2010-03-01 09:44 AM
I am looking for a way to make sure all my shares are setup using novscanread, my operations team pefers to use the windows management functions to create shares. However this does not give the option to set novscanread, which is required for my environment. Has anyone been able to set this as the default option for all new shares or possibly a script that runs on the filer each day to change the shares to novscanread?
Solved! SEE THE SOLUTION
2010-03-09 06:10 AM
I've found no way to automate the process you're looking for. What I did to retro fit my environment where
vscan was not requires was to do the following.
1) Connect to your filer using computer management, export a list of shares
2) Open the exported list in Excel, delete everything but the column of cifs shares (leave shares in column B for example)
3) In column A, enter 'cifs shares -change ' (be sure to include the space, you'll need it in the command)
4) In column C, enter '-novscan'
5) In column D, enter '=concatenate(A1,B1,C1) - this will put the entire command together (you can click the cells you want to select)
6) Copy column D, and paste special (values) into column E.
7) Open up a CLI to your filer, paste the content of column E
|cifs shares -change||share_name||-novscan||=concatenate(A1,B1,C1)||cifs shares -change share_name -novscan|
I would suggest that you try one or two to make sure that you've scripted it correctly...most common mistakes are the spaces required between the command.
2010-03-09 06:12 PM
I should also mention that depending on the number of cifs shares this needs to be applied to, you'll likely want to use the 'source' command to make life a little easier. Sometimes a copy/paste from excel or wordpad will mess up in the buffer...'source' has always been 100% in all my attempts.