Jump to content

Recommended Posts

Posted

Hi,

since i am new to AU3 could someone please help me translate below script to AU3

Thanks

Dim strDomain         'string containing the NT domain name
Dim objDomain        'ADSI Domain object
Dim objComputer   'ADSI Computer object
 
strDomain = "MyDomain"
Set objDomain = GetObject("WinNT://" & strDomain)
objDomain.Filter = Array("computer")
 
For Each objComputer In objDomain
    WScript.Echo objComputer.Name
Next
Posted

@tbaror

#include <array.au3>

$strDomain = "MyDomain"
$objDomain = ObjGet("WinNT://" & $strDomain)
$objDomain.Filter = _ArrayCreate("Computer","User")

For $objComputer In $objDomain
    ConsoleWrite ("Computer ... "  &  $objComputer.Name & @CRLF)
Next

Enjoy !!

ptrex

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...