Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Map a Drive Based on a Users Name and OUContent of Map a Drive Based on a Users Name and OU.vbsMD5 Hash: B37B1CA98F3063E636B3A18289965ECD |
||
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName Set objUser = GetObject("LDAP://" & strUser) strUserName = objUser.samAccountName strOUPath = objUser.Parent arrContainers = Split(strOUPath, ",") arrOU = Split(arrContainers(0), "=") strOU = arrOU(1) strDrive = "\\Mission\Apps\Timesheets\" & strOU & "\" & strUserName Set objNetwork = CreateObject("Wscript.Network") objNetwork.MapNetworkDrive "K:", strDrive | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |