dgarcia15MemberDecember 11, 2015 at 11:08 am #166042
I am new to the community, I recently stumbled on this sire while looking for good reliable resources using widows server. I found your scripting section and thought I might see if anyone would be able to help with and idea i had.
Basically I want to create a script to map a network share, but the thing that makes it complex is that I want the script to prompt for windows credenitals when run and then based on the username entered the specific folder is mapped. But it cannot map based on the local user logged in. It needs to be other credentials because the user logged in will only be accessing their files
To be more clear I need to map the network share for a specific user but the script to ask the user name first because everyone has their own personal share and the location is different for everyone.
1. user runs script;
2. dialouge box asks for username (Student1)
3. script then amps share based on username entered (\servershareusername “from step 2”
4. Windows prompts for credentials for access to their folder.
I appreciate any help that can be given with this idea. I honestly don’t care what language it is in. As long as it performs.
Thanks again, I look forward to seeing what ideas people have.
wullieb1ModeratorDecember 13, 2015 at 3:25 pm #245383
Wouldn’t it be easier to set the Home Folder path in AD?
JeremyWModeratorJanuary 11, 2016 at 1:19 pm #271417
I assume this is for someone to access other users’ folders?
Here’s a quick Powershell script to do it:
$creds = Get-Credential
$driveLetter = “x”
New-PSDrive -Name $driveLetter -PSProvider FileSystem -Credential $creds -Root “servershare$($creds.UserName)”[/CODE][CODE]$creds = Get-Credential
$driveLetter = “x”
New-PSDrive -Name $driveLetter -PSProvider FileSystem -Credential $creds -Root “servershare$($creds.UserName)”[/CODE]
You must be logged in to reply to this topic.