Group Membership Problem
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Group Membership Problem

 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming
Author Message
Scot
Guest





Posted: Fri Jan 07, 2005 6:03 pm    Post subject: Group Membership Problem Reply with quote

Happy New Year all!

I been reading about VBS scripting for group membership for
USERS and not COMPUTERS.

Most of the example websites from this newgroup shows USER
login scripting for group membership but I like to know how
to add printers to COMPUTER group membership using vbs.

If InStr(strGroup, ORGANIZATIONAL GROUP NAME) Then
net.AddWindowsPrinterConnection "\\server\printer1"

I got many computers who are added to the domain inside one
organizational group called dell lab.

When any user login to that organizational group, the
printer will show up in their printer folder.

thoughts?
Back to top
Al Dunbar [MS-MVP]
Guest





Posted: Sat Jan 08, 2005 3:55 am    Post subject: Re: Group Membership Problem Reply with quote

"Scot" <anonymous@discussions.microsoft.com> wrote in message
news:046001c4f4b0$e553c3b0$a501280a@phx.gbl...
Quote:
Happy New Year all!

I been reading about VBS scripting for group membership for
USERS and not COMPUTERS.

Most of the example websites from this newgroup shows USER
login scripting for group membership but I like to know how
to add printers to COMPUTER group membership using vbs.

If InStr(strGroup, ORGANIZATIONAL GROUP NAME) Then
net.AddWindowsPrinterConnection "\\server\printer1"

I got many computers who are added to the domain inside one
organizational group called dell lab.

When any user login to that organizational group, the
printer will show up in their printer folder.

thoughts?

Have you tried simply changing th ecode that builds the strGroup variable so
that it operates on the workstation rather than the user? I am not sure
whether or not a computer object in AD has a "members" property to work
with. If not, you might need to bind to the group to see if the computer is
a member.

We use a few security groups to keep track of which workstations have
certain non-standard functionality. But I do not think that a computer
object participates in security in the same manner as user accounts do. For
example, if your account has access to some resource and you logon from a
workstation that is in a group that is given NONE access to that resource, I
strongly suspect that you will have the access, and the workstation-based
permissions will not apply.

That said, perhaps there would be a simpler method to accomplish your goal,
as group membership testing can be tedious, especially if security group
nesting is used. You could, for example, find an available attribute and
populate it with the printer to be connected - or a delimited list of them.

The only attributes easily visible from MMC-ADU&C is Description (1024
bytes) and Location (255 bytes), but there might be others that could be
managed through script.

One way to simplify admin of this information would be to store a generic
label rather than specific printer share names. This could be a pointer to a
text file listing the actual print shares. In the event a printer was
replaced in an area, then only that file need be changed rather than all of
the affected computer accounts.


HTH - /Al
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB