RE: Adding Groups on the basis of text in a VBScript
- From: "verge" <verge@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 13 Nov 2005 12:25:12 -0800
Hi Mark
Thanks for getting back to me!
We can break the issue down into the following steps.
Firstly we need to read multiple text files, which are acting as logon
scripts.
All we need to determine from EACH of these text files is whether either or
both of the following two strings are present.
WshNetwork.MapNetworkDrive "G:", "\\***\DataLink"
WshNetwork.MapNetworkDrive "K:", "\\***\AppLink"
If the Datalink string is present the filename of the file being read should
be appended to a datalink text file.
If the Applink string is present the filename of the file being read should
be appended to an applink text file.
And thats it!
Thanks,
Verge
"Mark" wrote:
> Hi Verge,
>
> Not entirely sure what you are asking. If you trying to do a "If member of
> group then" in vbs, then the below should do it.
>
> set adinfo = CreateObject("ADSystemInfo")
> Set objuser = GetObject("LDAP://" & adinfo.UserName)
> Const domainadmin = "CN=Domain Admins"
> Const anothergroup = "CN=Another Group"
> strGroup = Join(objUser.MemberOf)
> If InStr(strGroup, domainadmin) Then
> WScript.Echo " You are a member of Domain Admins "
> end if
> If InStr(strGroup, anothergroup) Then
> WScript.Echo " You are a member of Another Group"
> end if
>
> Let me know if I am answering the wrong question here :)
>
> Thanks,
>
> Mark
>
> "verge" wrote:
>
> > User drive mappings are currently assigned through individually created logon
> > scripts which utilize vbscript.
> >
> > These drive mappings will now be assigned through two GPOs, which have each
> > have an associated group.
> >
> > My task is to assign particular groups to the users in question based on the
> > uniform text in each users logon script.
> >
> > Possible? Easy?
> > Please let me know
> >
.
- Prev by Date: [MSH] Need for C#'s using dispose block
- Next by Date: Re: [MSH] More Function
- Previous by thread: [MSH] Need for C#'s using dispose block
- Next by thread: Re: Copy file to multiple remote servers
- Index(es):
Relevant Pages
|