Frist time scripter

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi guys I have a really dumb question. I copied this script from the
internet and cannot get it to run on my exchange server. I change the file
from *.txt to *.cmd and all I get is the path to each argument. So I get
lots of c:\blahh blahh stuff that maps directly to each argument in the
script. Now as I explain this I have to say that I am running this from my
exchange server and not a domain controller, is that the issue. I will run
it from a domain controller as soon as I get home.

here is the script;

On Error Resume Next

Const ADS_SCOPE_SUBTREE = 2

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection

objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE

objCommand.CommandText = _
"SELECT Name, altRecipient FROM 'LDAP://dc=domain,dc=com' WHERE
objectCategory='user' " & _
"AND altRecipient='*'"
Set objRecordSet = objCommand.Execute

objRecordSet.MoveFirst

Do Until objRecordSet.EOF
Wscript.Echo objRecordSet.Fields("Name").Value,
objRecordSet.Fields("altRecipient").Value
objRecordSet.MoveNext
Loop



--
Thanks for the help

TC
.



Relevant Pages

  • RE: Question about functionality of the Exchange_DSAccessDC class
    ... Script executed at Exchange Server ... LR3R ... Navneet Gupta ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Error create rules; insufficient space
    ... A "run a script" rule action actually uses not an external script but a VBA procedure with a MailItem or MeetingItem as its parameter. ... Set msg = olNS.GetItemFromID ... Sue Mosher, Outlook MVP ... that Exchange Server 2007 will help as the reason for the memory limit is ...
    (microsoft.public.outlook.installation)
  • Re: x.500 Addresses ?
    ... I wrote a script a few ... Function StampMembers (strGroupADsPath, dicSeenGroupMember) ... Currently we have Exchange Server 2003 SP1 servers in an AD forrest. ... Would a X.500 proxy address help, if so how do I do that? ...
    (microsoft.public.exchange.admin)
  • Re: Script urgent
    ... the Exchange Server and member of each distribution list? ... Distribution list email and Member. ... Maycon wrote: ... You can modify the script to add any additional ...
    (microsoft.public.exchange.admin)
  • Re: Scripts for users on different subnet
    ... our Exchange server for e-mail, etc. and authenticate this way to ... The place I work for is looking for a way to run a script, ... since they are coming onto our network to get e-mail and such. ... they're just being routed in to get access to the exchange server. ...
    (microsoft.public.windows.server.networking)