rikho Posted August 26, 2009 Share Posted August 26, 2009 (edited) Hi all This script work's perfectly #include <Array.au3> Dim $strDomain Do $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 msgbox(4096,'pause',$report,10000) Next EndFunc 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 August 26, 2009 by rikho Link to comment Share on other sites More sharing options...
rikho Posted August 26, 2009 Author Share Posted August 26, 2009 There is absolutly no problem it work's if u let all file on local drive >_< Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now