Hi Everyone,
I am rewriting a clients login script, and am trying to tackle the fact that there is a lot of computer and a lot of printers been mapped dependant on the computers whereabouts. Currently the login script is going through a painful process of using an IsMember function for every group that exists. i.e.
Is computer a member of the group GG-MBH-SECOND-NORTH
if so
map printer 1
map printer 2 (etc etc)
end if
Is computer a member of the group GG-MBH-THIRD-NORTH, well you get the gist
The problem is there is five floors in the building with four wings in each and as you can imagine the process is slow, and if a printer is replaced or a new one added, someone has to amend the login script - *GULP*
I have already externalised all the printer names into a CSV file, and have currently read this file in, (bear with me I'm getting to the root of the problem and to my question) what I am now trying to do is read into an array, for the current computer name, all the groups that the computer is a member of
I can then search the array for a group that starts with "GG-MBH" (there will only ever be one) and then search the printer file array and map all printers accordingly
I cannot seem to work out how to retrieve all of the groups that the computer is currently a member of ??
Can anyone help please
I am rewriting a clients login script, and am trying to tackle the fact that there is a lot of computer and a lot of printers been mapped dependant on the computers whereabouts. Currently the login script is going through a painful process of using an IsMember function for every group that exists. i.e.
Is computer a member of the group GG-MBH-SECOND-NORTH
if so
map printer 1
map printer 2 (etc etc)
end if
Is computer a member of the group GG-MBH-THIRD-NORTH, well you get the gist
The problem is there is five floors in the building with four wings in each and as you can imagine the process is slow, and if a printer is replaced or a new one added, someone has to amend the login script - *GULP*
I have already externalised all the printer names into a CSV file, and have currently read this file in, (bear with me I'm getting to the root of the problem and to my question) what I am now trying to do is read into an array, for the current computer name, all the groups that the computer is a member of
I can then search the array for a group that starts with "GG-MBH" (there will only ever be one) and then search the printer file array and map all printers accordingly
I cannot seem to work out how to retrieve all of the groups that the computer is currently a member of ??
Can anyone help please