You know, I had trouble finding it in the archives, too... and I posted one
of them.
Anyway, below is a merged script that lists users, indicates which users are
admin, and lists aliases along with the forwarding address. Save it to you
machine as a vbs file and runn from the command prompt as
cscript enumIMailAll.vbs
You can strip out what you don't need, or reformat it to your heart's
content.
Hope this helps.
Darin.
------------------------------
SCRIPT : enumIMailAll.vbs
------------------------------
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Ipswitch\IMail\Domains"
' List the Domain keys
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
If left(subkey,8) <> "$virtual" Then
' Find the domains keys with a Users key
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath & "\" & subkey, arrSubKeys2
If not isnull(arrSubKeys2) Then
For Each subkey2 In arrSubKeys2
If subkey2 = "Users" Then
StdOut.WriteLine "Domain: " & subkey
' List the users
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath & "\" & subkey &
"\Users", arrSubKeys3
If not isnull(arrsubkeys3) Then
For each subkey3 in arrSubKeys3
If subkey3 <> "_aliases" and subkey3 <> "root" Then
StdOut.Write " " & subkey3
' Are they admins?
strValueName = "Flags"
oReg.GetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath & "\" &
subkey & "\Users" & "\" & subkey3, strValueName, dwValue
'bitHostAdmin = dwValue AND 0x100
If (dwValue AND &H100) Then StdOut.Write " (Host Admin)"
If (dwValue AND &H200) Then StdOut.Write " (Imail Admin)"
If (dwValue AND &H400) Then StdOut.Write " (List Admin)"
StdOut.WriteLine
End If
Next
End If
' List the aliases
oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath & "\" & subkey &
"\Users\_aliases", arrValueNames, arrValueTypes
If not isnull(arrValueNames) Then
For i = 0 to UBound(arrValueNames)
' If ValueName <> "postmaster" Then
oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath & "\" &
subkey & "\Users\_aliases", arrValueNames(i), strValue
StdOut.Write " " & arrValueNames(i) & " (alias -> " &
strValue & ")"
StdOut.WriteLine
Next
End If
End If
Next
End If
End If
Next
---------------------
----- Original Message -----
From: "Matti Haack" <[EMAIL PROTECTED]>
To: "Darin Cox" <[email protected]>
Sent: Thursday, November 24, 2005 9:31 AM
Subject: Re[2]: [IMail Forum] Host list
Can somebody give me a hint for the right phrases to search the List
archive, as I couldn't find any usefull befor sending my original
post
Or does someone use such a script and could please mail it to me?
With best regards
Matti Haack
> There have been several VBS scripts posted in the past that you can use to
> extract these from the registry.
> Darin.
> ----- Original Message -----
> From: "Matti Haack" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Thursday, November 24, 2005 6:25 AM
> Subject: [IMail Forum] Host list
> Hello,
> is there a free tool to extract all domains from hostname and host
> alias to a file? I like to try assp and need the complete domain
> list to configure it...
> Matti
> -
> Matti Haack - Hit Haack IT Service Gmbh
> Poltlbauer Weg 4, D-94036 Passau
> +49 851 50477-22 Fax: +49 851 50477-29
> http://www.haack-it.de
> Dieses Dokument ist ausschliesslich fuer den Adressaten bestimmt.
> Jegliche Art von Reproduktion, Verbreitung, Vervielfaeltigung,
Modifikation,
> Verteilung und/oder Publikation dieser E-Mail-Nachricht ist untersagt,
> soweit dies nicht ausdruecklich genehmigt wurde. Jegliche Haftung fur
> Ansprueche, die aufgrund der Kommunikation per E-Mail begruendet
> werden koennten, ist ausgeschlossen, soweit der Haftungsausschluss
> gesetzlich zulaessig ist.
> -- Ausgehende E-Mail wurde auf Viren gescannt --
> To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
> List Archive:
> http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
> Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
> To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
> List Archive:
> http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
> Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
-
Matti Haack - Hit Haack IT Service Gmbh
Poltlbauer Weg 4, D-94036 Passau
+49 851 50477-22 Fax: +49 851 50477-29
http://www.haack-it.de
Dieses Dokument ist ausschliesslich fuer den Adressaten bestimmt.
Jegliche Art von Reproduktion, Verbreitung, Vervielfaeltigung, Modifikation,
Verteilung und/oder Publikation dieser E-Mail-Nachricht ist untersagt,
soweit dies nicht ausdruecklich genehmigt wurde. Jegliche Haftung fur
Ansprueche, die aufgrund der Kommunikation per E-Mail begruendet
werden koennten, ist ausgeschlossen, soweit der Haftungsausschluss
gesetzlich zulaessig ist.
-- Ausgehende E-Mail wurde auf Viren gescannt --
To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/