Jump to content
Sign in to follow this  

Run it with a user of an other domain...

Recommended Posts


Hi all

This script work's perfectly

#include <Array.au3>
Dim $strDomain
    $strDomain = inputbox( "Information", "Domain : " )
until $strDomain <> ""

ListUsers( $strDomain )

Func ListUsers( $strDomain )
    $objComputer = ObjGet("WinNT://" & $strDomain )
    $objComputer.Filter = _ArrayCreate( "User" )
    For $objUser In $objComputer
    $1 = 'Name: ' & $objUser.Name & @CRLF & "Fullname: " & $objUser.Fullname & @CRLF & 'IsAccountLocked: ' & $objUser.IsAccountLocked 
    $2 = "AccountDisabled: " & $objUser.AccountDisabled 
    $report = $1 & @CRLF & $2 

Now it is compiled, and i need to run it from my computer in the Domain A but i need to query the AD on Domain B...

i use this script to run it :

RunAsSet($usr, $Domain, $pass)
Run(@ScriptDir & "\ad_devtest_2.exe", "", @SW_MAXIMIZE)

unfortunaltly i can not run this program with an account from another domain.

is there a system to do that ?

Edited by rikho

Share this post

Link to post
Share on other sites

There is absolutly no problem

it work's if u let all file on local drive >_<

Share this post

Link to post
Share on other sites

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
Sign in to follow this