bobmothers
MIS
Hi
I have inherited a vbscript in my establishment that checks whether a user is in a security group and creates their user area and applies a range of permissions.
I've recently had to move 600 users to a new server and want to alter the script to include appropriate references to this new server.
I've looked through the FAQs here and trawled the web for some information but am drawing a blank - probably due to a poor understanding of the subject area.
However, this last line reports a type mismatch and yes this is the line I altered. I altered it from
which worked fine but not for my relocated users.
I want the next set of statements to apply to students not in either of these years. I could include another 6 Elseif statements but thought there may be a more elegant solution here.
I am not a scripter and so am learning as I go here so any help would be much appreciated.
Not sure here whether CN is referencing the OU or the Security Group (although objGroupDict would suggest Group membership as opposed to OU membership).
Any assistance greatly appreciated.
Bob
Fast, Cheap and Good pick two because if it's fast and cheap it won't be good, if it's cheap and good it won't be fast and if it's fast and good it won't be cheap
I have inherited a vbscript in my establishment that checks whether a user is in a security group and creates their user area and applies a range of permissions.
I've recently had to move 600 users to a new server and want to alter the script to include appropriate references to this new server.
I've looked through the FAQs here and trawled the web for some information but am drawing a blank - probably due to a poor understanding of the subject area.
Code:
' AD's MMC passes arguments to WScript
Set wshArguments = WScript.Arguments
Dim objUser, objGroupDict, objFSO, objShell
' The User Object and its Properties are passed as the first argument
Set objUser = GetObject(wshArguments(0))
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
Dim strOutput
CreateMemberOfObject
If CBool(ObjGroupDict.Exists("CN=Students" AND "CN<>Year 7 Students" OR "CN<>Year 8 Students")) = True Then
However, this last line reports a type mismatch and yes this is the line I altered. I altered it from
Code:
If CBool(ObjGroupDict.Exists("CN=Students")) = True Then
I want the next set of statements to apply to students not in either of these years. I could include another 6 Elseif statements but thought there may be a more elegant solution here.
I am not a scripter and so am learning as I go here so any help would be much appreciated.
Not sure here whether CN is referencing the OU or the Security Group (although objGroupDict would suggest Group membership as opposed to OU membership).
Any assistance greatly appreciated.
Bob
Fast, Cheap and Good pick two because if it's fast and cheap it won't be good, if it's cheap and good it won't be fast and if it's fast and good it won't be cheap