Jump to content

jobejoe

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by jobejoe

  1. I got this working how I wanted, below is the final script I used. I needed FQDN for the shares it seems, but it's all working now thankfully. Really appreciate your help themightymrp, thanks once again. Code:
  2. This does work, the only issue I am having is when a student logs off and another comes along and logs in, the script runs and they input their details. It won't map the shared drive as it's already been logged into by the previous user. Which is strange as it works perfectly fine when doing the same thing with the batch script.
  3. Thank you, I will give this a try and see how I get on One thing I did see when trying to figure this out is the get-credential command for the username and password, it also seems to bring up a more user friendly login interface, can that be used here or is the way you have done it the best way. It's school kids using this so just want it as simplified for them as possible, haha. THank you so much for your help so far, life saver.
  4. Hi people, I have a script that we use to map network drives on our Surface RTs, it runs on login asks them for their username and password and then maps the drives dependent on what they input. I'll copy the script below for you to see. I've been asked if I can create a powershell script to do the same thing, but I am struggling to get it to work how I intend as I am completely new to powershell. Any help would be greatly appreciated. I think the original script was taken from here and edited a bit to fit our needs. I just looked and it was Sted from this forum that originally created this script, so thank you! echo off rem mapdrive prompt v3 20-09-13 net use N: /delete net use T: /delete net use W: /delete rem echo %mapu% set /p str=Enter Username: rem echo %str% set str2=%str:~0,2% rem echo %str2% rem echo %stra% rem decide what year group by first character if %str2%==08 goto equals1 if %str2%==09 goto equals2 if %str2%==10 goto equals3 if %str2%==11 goto equals4 if %str2%==12 goto equals5 if %str2%==13 goto equals6 if %str2%==14 goto equals7 if %str2%==15 goto equals8 rem echo not 0-15 so presumably staff net use N: \\fpg-fs01\%str%$ /user:%str% * net use W: "\\fpg-fs02\RMShared Documents" /user:%str% * net use T: \\fpg-fs01\StaffShared rem echo goto end :equals1 net use N: \\fpg-fs02\%str%$ /user:%str% * net use W: "\\fpg-fs02\RMShared Documents" goto end :equals2 net use N: \\fpg-fs02\%str%$ /user:%str% * net use W: "\\fpg-fs02\RMShared Documents" goto end :equals3 net use N: \\fpg-fs02\%str%$ /user:%str% * net use W: \\fpg-fs02"RMShared Documents" goto end :equals4 net use N: \\fpg-fs02\%str%$ /user:%str% * net use W: "\\fpg-fs02\RMShared Documents" goto end :equals5 net use N: \\fpg-fs02\%str%$ /user:%str% * net use W: "\\fpg-fs02\RMShared Documents" goto end :equals6 net use N: \\fpg-fs02\%str%$ /user:%str% * net use W: "\\fpg-fs02\RMShared Documents" goto end :equals7 net use N: \\fpg-fs02\intake14\%str% /user:%str% * net use W: "\\fpg-fs02\RMShared Documents" goto end :equals8 net use N: \\fpg-fs02\intake15\%str% /user:%str% * net use W: "\\fpg-fs02\RMShared Documents" goto end :end
  5. I'll give it a go, thanks for the quick response
  6. Sted, our student users usernames are 2 digits before the actual name for example 12woodj, 07nunnm How do I modify the script so it decides the year group by the first 2 characters rather than just 1. Any help appreciated.
×
×
  • Create New...