share

You are currently browsing articles tagged share.

I had to lately migrate some hidden shares from one server to another.
I wanted to use “File Server Migration Wizard”, but could not, as Windows 2008 R2 Standard edition will not let you do it, because you do not run enterprise or data-center edition. I got a little annoyed about this and quickly googled for solution. I found the solution described below here posted by Doug_H.

First thing, copy your folders, just use ROBOCOPY to do it for you and it will copy your security attributes too, like in example below:

SET _source="\\server01\d$\Users"
SET _dest="D:\Users"
SET _what=/COPYALL /B /SEC /MIR
SET _options=/R:0 /W:0 /LOG:C:\temp\Users_log.txt /NFL /NDL
ROBOCOPY %_source% %_dest% %_what% %_options%

Then we share the folders. My share names are the same as folders names, and hidden $.
So first you populate a file with the folder names, use cmd:

 DIR /A:D /B > c:\temp\dir_list.txt 

and then you query thru the file and use net share to share your folders with permissions you want like in example below:

 for /F %%X in (c:\temp\dir_list.txt) do (net share %%X$=d:\Users\%%X /GRANT:AdminGroup,FULL /GRANT:%%X,CHANGE) 

The command above has to be run in .bat file, so you need to create one, for example: sharefolders.bat and have the command entered in there, then you run it.

And we are done. Pretty simple, obvious and useful, so sharing.

The time has came, it is now time to migrate one of my File Servers from Microsoft Windows Server 2003 Enterprise to a new server with Microsoft Windows Server 2008 Enterprise. I want to migrate all my shares including share and folder permissions. To minimize time spent on this project I had to find a tool that could do it for me fairly easily. I know that there are tools you can purchase online that can do this for you, like for example: “Secure Copy”, but who wants to spend money those days for such a tools, and as always there are for sure alternative free tools somewhere out there to do it for you. After googling for a minute, I found a tool that Microsoft created for us for this scenario: “Microsoft Server Migration Toolkit“.
You can install it on your new Windows Server 2008 and run a File Server Migration Wizard that will guide you thru the whole process. One thing to mention is that, this tool is not perfect, unless I was maybe doing something wrong :)
When you add your shares, from a specific server, you have to make sure that for each share you check, the appropriate “Target Volume” is set, including share name and share location. If you will not do it, the shares copied will not be as identical as on your original server. Correcting each share might take some time, it all depends on how many of them you have.

So If you don’t want to bother to copy folders, and share them again, and set permissions on those folder again manually for a few hours, you can use that tool and save some time.

File Server Migration Wizard

File Server Migration Wizard

Or… You can always read this HOWTO
.

Locations of visitors to this page