RE: Internet file formats (file extensions)

  • From: "Michael B. Smith" <michael@xxxxxxxxxx>
  • To: "[ExchangeList]" <exchangelist@xxxxxxxxxxxxx>
  • Date: Thu, 8 Sep 2005 02:31:52 -0400

1. See below.
 
2. Such as? This is generally non-trivial.
 
Option Explicit
 
Dim obj, objCollection
Dim str, strConfigNC
 
Set obj = GetObject ("LDAP://RootDSE";)
strConfigNC = obj.Get ("configurationNamingContext")
Set obj = Nothing
 
str = "CN=Microsoft Exchange,CN=Services," & strConfigNC
 
Set objCollection = GetObject ("LDAP://"; & str)
 
For Each obj in objCollection
 If obj.Class = "msExchOrganizationContainer" Then
  wscript.echo "Exchange organization name: " & Mid (obj.name, 4)
 End If
Next
 
Set objCollection = Nothing

________________________________

From: Sadanand K. Prabhakar [mailto:sadanand@xxxxxxxxxxxxxxx] 
Sent: Monday, September 05, 2005 11:45 AM
To: [ExchangeList]
Subject: [exchangelist] RE: Internet file formats (file extensions)


http://www.MSExchange.org/


Hey!! It works fine. Thanks a lot for your help. 

   I have two more queries:

 1.   How to get the  organization name from the vb script.

 2.   How to get the protocol properties info like IMAP4, POP3, NNTP,
X.400 etc.

 

 Thanks & Regards,

    Sadanand

________________________________

From: Michael B. Smith [mailto:michael@xxxxxxxxxx] 
Sent: Monday, September 05, 2005 9:02 PM
To: [ExchangeList]
Subject: [exchangelist] RE: Internet file formats (file extensions)

 

http://www.MSExchange.org/

That is your Exchange SERVER, not your Exchange ORGANIZATION. The string
has to contain your Exchange Organization.

 

Your organization is found most easily in ESM, left pane, topmost item
that has the little "globe" as it's icon, and is followed by
"(Exchange)".

 

By default, this is "First Organization". 

 

________________________________

From: Sadanand K. Prabhakar [mailto:sadanand@xxxxxxxxxxxxxxx] 
Sent: Monday, September 05, 2005 11:17 AM
To: [ExchangeList]
Subject: [exchangelist] RE: Internet file formats (file extensions)

http://www.MSExchange.org/

Yes, I changed the strOrganization to "exch3test.com" which is my test
exchange server. I ran the script on the same exchange server installed
machine.

 I got error at line number 8 (ie: at GetObject()  ) .

 

  Here is my script: 

------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------------------

   Const strOrganization = "exch3test.com"

            Set objRootDSE = GetObject ("LDAP://RootDSE";)

            strConfigNC = objRootDSE.Get ("configurationNamingContext")

            Set objRootDSE = Nothing

            strDN = "CN=Internet Message Formats,CN=Global Settings,CN="
& _

                        strOrganization & ",CN=Microsoft Exchange," & _

                        "CN=Services," & strconfigNC

            Set obj = GetObject ("LDAP://"; & strDN)

            str = obj.Get ("msExchMIMETypes")

            i = 0

            str1 = ""

            For k = 1 To Lenb (str)

                        If 0 = Ascb(Midb(str, k, 1)) Then

                                    If 0 < Len (str1) Then

                                                'wscript.echo str1

                                                wscript.echo "MIMEType
- " & Left (str1, InStr (str1, ";") - 1)

                                                Wscript.echo "Extension
- " & Right (str1, Len (str1) - InStr (str1, ";"))

                                                wscript.echo " "

                                                i = i + 1

                                    End If

                                    str1 = ""

                        Else

                                    str1 = str1 & chr(Ascb(Midb(str, k,
1)))

                        End If

            Next

            If 0 < Len (str1) Then

                        wscript.echo str1

            End If

            wscript.echo i & " total mappings present."

            Set obj = Nothing

 

------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------------------

 

 

 

------------------------------------------------------
List Archives: http://www.webelists.com/cgi/lyris.pl?enter=exchangelist
Exchange Newsletters: http://www.msexchange.org/pages/newsletter.asp 
------------------------------------------------------
Visit TechGenix.com for more information about our other sites:
http://www.techgenix.com
------------------------------------------------------
You are currently subscribed to this MSEXchange.org Discussion List as:
michael@xxxxxxxxxx
To unsubscribe visit
http://www.webelists.com/cgi/lyris.pl?enter=exchangelist
Report abuse to listadmin@xxxxxxxxxxxxxx 

Other related posts: