I am trying to help someone with an Active Directory script, but since its been years since I've done one of these I'm not quite finding the exact problem.
The current script we have is as follows:
*** START SCRIPT Copyhelm.VBS ***
Const IT_GROUP = "ESFIT"
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshNetwork = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysinfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
ON ERROR RESUME NEXT
If InStr(strGroups, IT_GROUP) Then
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "\\originations2\Win2k50\remotehelm\bin\remotehelm.exe " "c:\remotehelm\bin", OverwriteExisting
** END SCRIPT Copyhelm.VBS ***
I'm pretty sure that the error is in the last line before EndIf, but am unsure of what I'm missing. Any assistance would be greatly appreciated!