JohnQ,
Hate to "steal Howard's thunder!"
Here is another way to do this, no LDAP needed.
Borrowing from the follwing topics:
Re-Write of the KIX32.EXE Deployment tool
MS-Tech Article findings- 318689
We can take the code to modify the users from NTLOGON and change it to look for Domain Users that have no script.
code:
CLS
BREAK ON
$DomainString='DOMAIN' ;Replace with your domain
$GroupString='Domain Users'
$GroupObj = GetObject('WinNT://' + $DomainString + '/' + $GroupString)
For each $UserObj in $GroupObj.Members
IF $UserObj.AccountDisabled<>'True' AND $UserObj.LoginScript=''
?$UserObj.Name
?$UserObj.FullName
$error=@error
$logshare='H:\' ;Change to an available drive or UNC path
$logfile=$logshare+$DomainString+'NOSCRIPT.CSV'
$logdata=$UserObj.Name+','+$UserObj.FullName+','+$error+@CRLF
LOGGER($logfile,$logdata)
ENDIF
Next
?'--'
?'Script complete'
SLEEP 4
FUNCTION LOGGER($logfile,$logdata)
DIM $n
WHILE Open(1, $logfile, 5) OR $n=5
IF $n
'.'
ELSE
?'Please wait'
ENDIF
$n=$n+1
SLEEP 3
LOOP
$n=WriteLine(1, $logdata)
$n=Close(1)
ENDFUNCTION
HTH,
Kent