+ Post New Thread
Results 1 to 5 of 5
Windows Server 2008 R2 Thread, Modifying shares caching options in Technical; i have a setup where due to macs the users areas are shared as \server\username$ rather than the simpler \server\users$\group\name ...
  1. #1


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,588
    Thank Post
    228
    Thanked 856 Times in 735 Posts
    Rep Power
    296

    Modifying shares caching options

    i have a setup where due to macs the users areas are shared as \\server\username$ rather than the simpler \\server\users$\group\name
    now these are all setup with caching set to disabled and im looking at setting up staff with roaming and synced documents. I could manually go hrough and turn syncing on all folders but there has to be a better way. I have a script tht will create shares with aching enabled but if the folder is already shared it just errors out (again i could possibly write a script to unshare the folders first then run this but if i can do it as 1 command id be happier

    current code is
    Code:
    for /f %%u in (users.txt) do net share %%u$="D:\test\%%u" /grant:everyone,full /cache:Documents
    does anyone know a way i can just use that or simiular to just change the caching options?

  2. #2

    Join Date
    May 2007
    Location
    Southampton
    Posts
    93
    Thank Post
    7
    Thanked 4 Times in 4 Posts
    Rep Power
    15
    You could do a search and replace on the registry entries for the shares. Entries for all of the shares are kept in HKLM\System\CurrentControlSet\services\Lanmanserve r\shares. You could export that and then do a search and replace on the CSCFlags value which governs caching. Then import your modified registry file and reboot. Be very careful that this doesn't affect the value on any shares that you do not want to change - and in fact, just be careful in general. Make sure that you keep your original registry export in case something goes awry and you need to put things back how they were.

  3. #3

    Join Date
    Apr 2008
    Posts
    853
    Thank Post
    111
    Thanked 112 Times in 108 Posts
    Rep Power
    45
    Windows server file manager have a option to tick for everything

  4. #4
    tommej's Avatar
    Join Date
    Oct 2009
    Location
    Lincolnshire
    Posts
    697
    Thank Post
    38
    Thanked 130 Times in 99 Posts
    Rep Power
    77
    Powershell can do this

    Code:
    $server="my_server_name"
    $share="my_share_name"
    ([wmiclass]"\\$server\root\cimv2:Win32_Process").create("cmd /c net share $share /cache:programs")

  5. #5


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,588
    Thank Post
    228
    Thanked 856 Times in 735 Posts
    Rep Power
    296
    in the end i found this worked
    Code:
    for /f %%u in (users.txt) do net share %%u$ /cache:documents

SHARE:
+ Post New Thread

Similar Threads

  1. Sharing option missing - Server 2003 64bit
    By greengate in forum Windows Server 2000/2003
    Replies: 1
    Last Post: 7th September 2010, 04:41 PM
  2. Modify Share Folder Permission
    By programmingnewbiee in forum Windows
    Replies: 1
    Last Post: 4th August 2010, 03:08 PM
  3. Sharing Outlook over network options
    By Shorty in forum Network and Classroom Management
    Replies: 1
    Last Post: 29th April 2008, 12:23 AM
  4. Bulk Modify Share Permissions
    By mitchell1981 in forum Windows
    Replies: 4
    Last Post: 11th July 2007, 12:33 PM
  5. stocks and shares
    By russdev in forum Other Stuff
    Replies: 0
    Last Post: 25th August 2005, 05:25 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •