Reference thread329-1200699
I would like to do the same login script as mentioned in thread329-1200699. Thanks to who ever created this script? I have been able to successfully run the first part of this script to get a home directory mapped. I am getting an error on line 23 char 1. set CurrentUser = GetObject("LDAP://pways50-fs1" & ADSysInfo.UserName) the error that comes up is the specified domain either does not exist or could not be contacted. Code 8007054B Source (null). Anyone have any ideas why I am getting this error. Posted is the script with my changes.
Thanks
' ======================================================
' DEFINE AD GROUP CONSTANTS
' ======================================================
Const IT = "cn=it"
Const CORPORATE = "cn=corporate"
Const SERVICES = "cn=services"
Const UNIVERSITY = "cn=university"
' ======================================================
' MAP HOME DRIVE H:
' ======================================================
Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "h:", "\\pways50-fs1\Profiles\" & wshNetwork.UserName
' ======================================================
' COMPILE USER GROUP MEMBERSHIPS
' ======================================================
set ADSysInfo = CreateObject("ADSystemInfo")
set CurrentUser = GetObject("LDAP://pways50-fs1" & ADSysInfo.UserName)
if IsArray(CurrentUser.MemberOf) then
strGroups = LCase(Join(CurrentUser.MemberOf))
else
strGroups = LCase(CurrentUser.MemberOf)
end if
set ADSysInfo = nothing
set CurrentUser = nothing
' ======================================================
' MAP DRIVES
' ======================================================
If InStr(strGroups, IT) Then
wshNetwork.MapNetworkDrive "i:", "\\pways50-fs1\IT"
ElseIf InStr(strGroups, CORPORATE) Then
wshNetwork.MapNetworkDrive ":", "\\pways50-fs1\corporate"
ElseIf InStr(strGroups, SERVICES) Then
wshNetwork.MapNetworkDrive "s:", "\\pways50-fs1\services"
ElseIf InStr(strGroups, UNIVERSITY) Then
wshNetwork.MapNetworkDrive "u:", "\\pways50-fs1\university"
End If
WScript.Echo "Script is complete.
I would like to do the same login script as mentioned in thread329-1200699. Thanks to who ever created this script? I have been able to successfully run the first part of this script to get a home directory mapped. I am getting an error on line 23 char 1. set CurrentUser = GetObject("LDAP://pways50-fs1" & ADSysInfo.UserName) the error that comes up is the specified domain either does not exist or could not be contacted. Code 8007054B Source (null). Anyone have any ideas why I am getting this error. Posted is the script with my changes.
Thanks
' ======================================================
' DEFINE AD GROUP CONSTANTS
' ======================================================
Const IT = "cn=it"
Const CORPORATE = "cn=corporate"
Const SERVICES = "cn=services"
Const UNIVERSITY = "cn=university"
' ======================================================
' MAP HOME DRIVE H:
' ======================================================
Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "h:", "\\pways50-fs1\Profiles\" & wshNetwork.UserName
' ======================================================
' COMPILE USER GROUP MEMBERSHIPS
' ======================================================
set ADSysInfo = CreateObject("ADSystemInfo")
set CurrentUser = GetObject("LDAP://pways50-fs1" & ADSysInfo.UserName)
if IsArray(CurrentUser.MemberOf) then
strGroups = LCase(Join(CurrentUser.MemberOf))
else
strGroups = LCase(CurrentUser.MemberOf)
end if
set ADSysInfo = nothing
set CurrentUser = nothing
' ======================================================
' MAP DRIVES
' ======================================================
If InStr(strGroups, IT) Then
wshNetwork.MapNetworkDrive "i:", "\\pways50-fs1\IT"
ElseIf InStr(strGroups, CORPORATE) Then
wshNetwork.MapNetworkDrive ":", "\\pways50-fs1\corporate"
ElseIf InStr(strGroups, SERVICES) Then
wshNetwork.MapNetworkDrive "s:", "\\pways50-fs1\services"
ElseIf InStr(strGroups, UNIVERSITY) Then
wshNetwork.MapNetworkDrive "u:", "\\pways50-fs1\university"
End If
WScript.Echo "Script is complete.