Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Listing all memebers of a group

HTVi
TV Discussion Newsgroups

Listing all memebers of a group
Solly 6/15/2007 12:38:00 PM
hello - i am studying wise scripting. I got the script in VBS to show all the
members of a group, but i cannot make it function in command line. I'm trying
to run a DSquery of the ldap server with the correct cn, ou, and dc
following. It keeps giving me an error that the path is incorrect, even
though i am copying it directly from my VBS script which seems to grab all
the correct info. Can anyone help me out with this?

Also my VBS script looks like this:

On Error Resume Next

Set objGroup = GetObject _
("LDAP://******/cn=*****,ou=groups,ou=ORS,ou=***,ou=AD,dc=***,dc=**")
objGroup.GetInfo

arrMemberOf = objGroup.GetEx("member")

WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next

Can someone tell me how to dump that into a text file rather than echo it?

Thanks

RE: Listing all memebers of a group
J Ford 6/15/2007 1:29:01 PM
from command line how are you doing it?

:/>cscript <scriptname>.vbs > dumpinfo2text.txt

"Solly" wrote:

[Quoted Text]
> hello - i am studying wise scripting. I got the script in VBS to show all the
> members of a group, but i cannot make it function in command line. I'm trying
> to run a DSquery of the ldap server with the correct cn, ou, and dc
> following. It keeps giving me an error that the path is incorrect, even
> though i am copying it directly from my VBS script which seems to grab all
> the correct info. Can anyone help me out with this?
>
> Also my VBS script looks like this:
>
> On Error Resume Next
>
> Set objGroup = GetObject _
> ("LDAP://******/cn=*****,ou=groups,ou=ORS,ou=***,ou=AD,dc=***,dc=**")
> objGroup.GetInfo
>
> arrMemberOf = objGroup.GetEx("member")
>
> WScript.Echo "Members:"
> For Each strMember in arrMemberOf
> WScript.echo strMember
> Next
>
> Can someone tell me how to dump that into a text file rather than echo it?
>
> Thanks
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen