Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Login Bat file help needed

Posted on 2013-01-22
4
Medium Priority
?
301 Views
Last Modified: 2013-05-09
I need a simple login bat file that can be run on users profiles on our W2K8R2 enviorment. I need to be able to map the S drive which is our Sales share to all users and as a user home directory for each user. Once the drives map they want Hello %username today is %date Have a great day! to be displayed.

I have never written a login script so I am looking for some help. I dont want to do any powershell stuff just a simple bat file that I can pop in the sysvol folder under scripts.
0
Comment
Question by:MXadmin
  • 2
4 Comments
 
LVL 10

Expert Comment

by:ddiazp
ID: 38808337
what's the UNC path to the share?

Just save this as share.bat on your sysvol and point to that file on the logon script on AD for the accounts you want to use this on.

You can either mount the drive through that script, or via the 'Home Drive' fields on the AD user account properties. It would be redundant to do both and will give you an error if you do both:

@ECHO OFF

net use S: \\shareserver\Sales

echo "Hello %USERNAME%, today is %DATE%. Have a great day!"

Open in new window

0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 38808350
also think about using group policy preferences for mapping the drive

 thanks

 mike
0
 

Accepted Solution

by:
MXadmin earned 0 total points
ID: 38808359
That does not work. I already had that type of script done it maps drives but does not display the message.
0
 

Author Closing Comment

by:MXadmin
ID: 39150963
works
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question