Jump to content

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


rikho
 Share

Recommended Posts

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 by rikho
Link to comment
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
 Share

  • Recently Browsing   0 members

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