VBScript to list all Windows Domain in your network
Today when cleaning some old unused folders in my computer, found few VB Scripts which I wrote few years back. I am planning to post them here, regularly. Hope these scripts will be useful for others.
-----
' This vbscript will list all the Windows Domain in the network - using the WinNT namespace
' author email : prathees dot r at gmail dot com
Set nameSpaceObject = GetObject("WinNT:")
For Each domainObject In nameSpaceObject
WScript.Echo domainObject.Name
Next
For Each domainObject In nameSpaceObject
WScript.Echo domainObject.Name
Next
-----
How to run the script:
1. Copy the above script to a file - say ListDomain.vbs
2. Execute the script using CScript program. Eg:
C:\> CSCRIPT ListDomain.vbs
C:\> CSCRIPT ListDomain.vbs
Labels: List Windows Domains, VBScript
0 Comments:
Post a Comment
<< Home