sample log on script to add network drive and shortcut

I am posting a working bat file to automate network drive and shortcut for AD users. This bat file works excellent if you desire to push network drive through AD logon script. You can copy these in a notepad and save it as filename.bat  and put this bat file  in \\yourserver\sysvol\yourdomainname\scripts  folder.

Here is sample file.

@echo off

echo !   _________________________     !  

echo !                                 !

echo !    MAPPING NETWORK DRIVES       ! 

echo !                                 !  

echo !    * * * LEAVE OPEN * * *       ! 


echo !                                 ! 

echo !  _________________________      ! 

net use r: \\yourserver\data


copy “\\yourserver\data\Shortcuts\company policy.lnk” “C:\Documents and Settings\%username%\Desktop\”

Here \\yourserver\data is the path of the folder. Make sure you got appropriate permission setup in network drive i.e. NTFS permission applied in the folder you want to use as network drive. Now go to Active Directory users and computers. Select number of users or individual user and right click on selected and click on to properties. Go to profile and type filename.bat  in log on script box.

About Raihan Al-Beruni

My Name is Raihan Al-Beruni. I am working as an Infrastructure Architect in Data Center Technologies in Perth, Western Australia. I have been working on Microsoft technologies for more than 15 years. Other than Microsoft technologies I also work on Citrix validated solution and VMware data center virtualization technologies. I have a Masters degree in E-Commerce. I am certified in Microsoft, VMware, ITIL and EMC. My core focus is on cloud technologies. In my blog I share my knowledge and experience to enrich information technology community as a whole. I hope my contribution through this blog will help someone who wants more information on data center technologies.
Gallery | This entry was posted in Windows Server and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s