Welcome to ISAserver.org

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

ISAServer Scripting

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [ISA Server 2004 Misc.] >> ISA Server 2004 Programming >> ISAServer Scripting Page: [1]
Login
Message << Older Topic   Newer Topic >>
ISAServer Scripting - 30.Sep.2006 1:30:17 PM   
sally.de

 

Posts: 11
Joined: 27.Sep.2006
Status: offline
Hi everybody,
here you can see an script .
but It have a problem with the specified line.is there any one to describe this line.....
'====================================================================
'
' PURPOSE: Add all the Computers running Windows Server 2003 from
' Active Directory to a text file called c:\ExportedServers.txt
'
' NAME: ExportServers.vbs
'
' RUN: cscript ExportServers.vbs <Domain Controller>
'
' WHERE: Run on a domain member of Active Directory as an administrator
'of the local computer, which must be Windows Server 2003.
'
' COMMENT: The script will only return Windows Server 2003 computers.
'          This script was written by Jesper Hanno Hansen.
'
' VERSION: 1.0
'====================================================================

'Set ForAppending from OpenAsTextStream Method
Const ForAppending = 8

' Create an arguments Object to get the parameters from the input
Dim objArguments
Set objArguments = WScript.Arguments

' Count the input parameters, if less than 1, show help
If objArguments.Count < 1 Then
  ShowHelp
Else
  ' Set the parameter to the Computername
  Dim strServerName
  strServerName = WScript.Arguments(0)
  End If'

' Calling the Sub to connect to Active Directory
FindServers strServerName

WScript.Echo "Please check the file C:\ExportedServers.txt"
WScript.Echo "to verify the data..."

                    Sub FindServers(Server)
                             ' Show information on the screen
                              WScript.Echo "Connecting to server: " & strServerName
                              WScript.Echo ""

                             ' Create a Root Object of the LDAP namespace
**************>   Dim objRootSet objRoot = GetObject("LDAP:")


Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [ISA Server 2004 Misc.] >> ISA Server 2004 Programming >> ISAServer Scripting Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts