General discussion
August 14, 2007 at 07:01 PM
mianr

dfs issues with map network drives in domain environment

by mianr . Updated 18 years, 11 months ago

when you are going to crete logon scripts on domain goin into windows, sysvol and then scripts. create logon.bat file there. put this all file there and try to change it according to your own requirements. it will map network drives on your domain.

@echo off

echo Drive mapping script
//please note this command. it is related to your dfs domain based namespace server. please remove these comments when you want to put into logon.bat.

if exist F:\ net use F: /delete /y
net use F: “\\local.com\file server” /PERSISTENT:YES /user:%USERDOMAIN%\%USERNAME% /y

if exist H:\ net use H: /delete /y
net use H: \\fullyqualified netbios name\Users(test) /PERSISTENT:YES /user:%USERDOMAIN%\%USERNAME% /y

if exist M:\ net use M: /delete /y
net use M: \\fullyqualified netbios name\Management /PERSISTENT:YES /user:%USERDOMAIN%\%USERNAME% /y

if exist O:\ net use O: /delete /y
net use O: “\\fullyqualified netbios name\Finance” /PERSISTENT:YES /user:%USERDOMAIN%\%USERNAME% /y

if exist Z:\ net use Z: /delete /y
net use Z: “\\fullyqualified netbios name\Sales(test)” /PERSISTENT:YES /user:%USERDOMAIN%\%USERNAME% /y

if exist s:\ net use s: /delete /y
net use s: \\fullyqualified netbios name\myshare /PERSISTENT:YES /user:%USERDOMAIN%\%USERNAME% /y

C:
md C:\testscript
echo Test Startup Script Complete

//finish here.

if you want show therse network drives for your users then you need to add this file into your active directory users and computers and go to any organization unit or any where where you want to apply this group policy. crete new policy and then edit it. go to user configuration and then go to logon scripts and add this file again. there is little bit change with these lines

echo Login script complete for %date% > C:\scriptlog.txt
echo Login script complete for %date%

//please remove these comments when you want to add above lines. add above lines into logon.bat files and save it. you are ready to go.

This discussion is locked

All Comments