Le Café Central de
Deva             


                    ... Deva blogs!!



  • Le Café Central de DeVa

    Verify the status of an Web Directory Application using WMI

    • 1 Comments
    Here is a code snippet which is used to verify the status of an Web Directory Application using WMI, without opening IIS Manager. 


    strComputer = "."
    Set objWMIService = GetObject("winmgmts:{authenticationLevel=pktPrivacy}\\" & strComputer & "\root\microsoftiisv2")
    Set colItems = objWMIService.ExecQuery("Select * From IIsWebDirectory Where Name = " & "'W3SVC/2142295254/root/aspnet_client_folder'")

    For Each objItem in colItems
    strStatus = objItem.AppGetStatus
    If strStatus = 2 Then
    Wscript.Echo "The application is running."
    ElseIf strStatus = 3 Then
    Wscript.Echo "The application is stopped."
    Else
    Wscript.Echo "The status could not be determined."
    End If
    Next

    Supported Platform: Windows Server 2003
  • Le Café Central de DeVa

    Adding an Event Registration for a Folder

    • 0 Comments

    I found a Visual Basic code snippet creates a store item, sets its content class and schema, and saves it to the store. The store then processes the event registration.

    Please click here to get the Visual Basic Code snippet

  • Le Café Central de DeVa

    Create Application Pool using WMI

    • 1 Comments

    Here is an code snippet that creates application pool [here for example MSSharePointAppPool application pool] using WMI Script.

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:{authenticationLevel=pktPrivacy}\\" & strComputer & "\root\microsoftiisv2")
    Set colItems = objWMIService.ExecQuery("Select * From IIsApplicationPool Where Name = " & "'W3SVC/AppPools/MSSharePointAppPool'")

    For Each objItem in colItems
    objItem.Start
    Next

    Supported Platform: Windows Server 2003

  • Le Café Central de DeVa

    Available Services - Exchange Server 2007

    • 1 Comments

    As we know, Exchange Server 2007 have newly designed and with tons of new features. It also offers various services, likes its earlier versions. All previous versions of Exchange Server included components that were implemented as services.

    When we install Exchange Server 2007, setup runs a set of tasks that install new services. The Exchange Server 2007 setup will install all services whether they are immediately needed or not, some services will only become active when specific features are used.

    I found this interesting article, which tabulates by name and by short name the various services that are installed by Exchange 2007. Also included is a description of each service, the server role that installs the service, and whether the service is required or optional....

    Please click here to read more

     

  • Le Café Central de DeVa

    Exchange Web Services

    • 0 Comments

    Exchange Server 2007 introduced a new programming model by using the Web Services. 

    • It is a programmable interface can be used to provide client access to Exchange store data and information management functions.
    • It handles Simple Object Access Protocol (SOAP) messages sent over HTTP.
    • It will improve the efficiency & programmable access to core business data and functions.
    • It provides heterogeneous servers and clients access to the same business-critical data.

    EWS includes the following Web services:

    • Auto discover   Provides configuration information for setting up client applications that connect to mailbox servers.
    • Availability   Provides free/busy data about a user's mailbox. The free/busy data is also used to identify suggested meeting times and provides client Out of Office (OOF) management functionality.
    • Messaging Records Management    Enables the assignment of Managed E-Mail folders to mailbox users.
    • Notification   Notifies the client application of events that are associated with a mailbox. The subscription model can be either push- or pull-based.
    • Synchronization   Provides a one-way synchronized cached copy of a user's folders and items.
    • Exchange Data Service   Provides the following features:
      • Functions to create, update, delete, copy, find, get, and move folders that are associated with a mailbox user, and also the ability to find items that are contained in a folder.
      • Access to the Exchange data store. A client application can create, update, delete, copy, get, move, and send items by using the Exchange Data Service Web service.
      • Ambiguous name resolution.
      • The ability to return the members of distribution list.
      • Access to attachments in the Exchange store.
  • Le Café Central de DeVa

    Exchange .Net Framework Extensions

    • 1 Comments

    Exchange .NET Framework Extensions provide useful classes and data structures that enable you to access and manipulate the various parts of e-mail messages.

    Available Namespaces:

    • Microsoft.Exchange.Data.Mime
      Enables stream-based and DOM-based access to Multipurpose Internet Mail Extensions (MIME) data, including the ability to filter MIME content.
    • Microsoft.Exchange.Data.TextConverters   
      Provides classes and data structures that enable custom filtering of e-mail body content and conversion between several different formats, including HTML, RTF, and plain text.
    • Microsoft.Exchange.Data.iCalendar and Microsoft.Exchange.Data.Tnef   
      Provide classes and data structures that let you read and write calendar items for appointments, meetings, and events.
    • Microsoft.Exchange.Data.Encoders   
      Provides classes and data structures that let you easily convert the encoding of an e-mail message.
  • Le Café Central de DeVa

    Monitoring Event Sink # 2 - Required Permissions

    • 0 Comments
    Event Sink Permission
    • The account that is registering the event must be the same account as the mailbox owner, or an account that has full mailbox access on the mailbox where the event is being registered.
    • By default, the Exchange Administrator account does not have mailbox permissions.
    • You must give the administrator full mailbox permissions for the mailbox that you are registering the sink on.
  • Le Café Central de DeVa

    Exchange Server 2007 - Do you know?

    • 4 Comments

    Do you Know?

    Several features that are found in earlier versions of Microsoft Exchange Server have been removed (Discontinued features and De-emphasized functionality) from Exchange 2007.

    Some of the de-emphasized legacy technologies are,

    • Public folders - Free/busy calendaring functionality is provided by the Availability service.
    • Proxy address generators - Use the Exchange Management Shell.
    • CDO 1.2.1 - This functionality is provided by the Exchange Web Services.
    • MAPI32 - This functionality is provided by the Exchange Web Services.
    • CDOEX (CDO 3.0) - This functionality is provided by the Exchange Web Services.
    • Exchange WebDAV extensions - This functionality is provided by the Exchange Web Services.
    • ExOLEDB - This functionality is provided by the Exchange Web Services.
    • Store events - This functionality is provided by the Notification Web service.
    • Streaming backup APIs.
    • Exchange 2003 Virus Scanning Application Programming Interface (VSAPI).

     There is a fine Microsoft Technet article which give detailed information into it. Click here to find more 

  • Le Café Central de DeVa

    Exchange Server 2007 - Transport Agent

    • 0 Comments

    Transport Agent - Introduction

    Exchange Server 2007 provides a class library based on the MS.NET Framework that enables you to implement transport agents that programmatically check and take action on transport events. It can be used to change and read the message contents during these events.

    Transport agents enable you to access information about messages that travel through the Edge and Hub Transport servers. They have access to e-mail messages and their contents while the messages move through the transport services.

    Pre-requisites

    • An Exchange Server 2007 has Edge and Hub Transport server roles installed
    • Microsoft.Net 2.0 SDK installed
    • Microsoft Visual Studio .Net 2005 (recommended)

    Used Namespaces 

    • Microsoft.Exchange.Data.Transport            
    • Microsoft.Exchange.Data.Transport.Email    - to make use of common email elements
    • Microsoft.Exchange.Data.Transport.Smtp     - to make use of SMTP receive agent
    • Microsoft.Exchange.Data.Transport.Routing  - to make use of Routing agent

    Referencing Assemblies 

    • When we install Exchange Server 2007 in our system, Exchange Sever installer installs & registers in the global assembly cache (GAC) the assemblies that are required for the development of transport agents.
    • To begin implementing a transport agent, create a reference to the Microsoft.Exchange.Data.Transport assembly in a class library project

    Samples

    Installing an Agent

    Once you compile the agent to a .dll; you must install and enable the agent on development Exchange server. At Exchange Management Shell(EMS), use the Install-TransportAgent command to install your agent, and the Enable-TransportAgent command to enable your agent.

    For example you can make use of EMS to install and enable an agent named "MyAgeOne" by using a class derived from SmtpReceiveAgentFactory named MyAgentOne.MyAgeOneFactory.

    Install-TransportAgent -Name "MyCustomAgent" -TransportAgentFactory "MyAgeOne.MyAgeOneFactory" -AssemblyPath "C:\myagents\MyAgeOne.dll"

    Enabling an Agent

    For example the agent MyCustomAgent on the server on which the agent is installed:

    Enable-TransportAgent -Name "MyCustomAgent"

  • Le Café Central de DeVa

    EWS : Delegate Access using Exchange Web Services

    • 0 Comments

    Delegate Access

    Exchange 2007 enables delegates to access the mailbox of a principal and perform create/delete/update/copy/search operations using Exchange Web Services (EWS).

    There are two ways we can access the contents of other users mailboxes:

    • Exchange Impersonation - Enable one account to act as another account
    • Delegate Access - Account act on behalf of the account of principal

    EWS is a powerful tool for accessing other users mailboxes. Delegate access provides a convenient way for EWS clients to act on behalf of other user accounts and opens the way to create client applications that can work across mailboxes.

    For more information, please click here

  • Le Café Central de DeVa

    EWS : Best Practices for Using Exchange Web Services for Calendaring Tasks

    • 2 Comments

    Best practices for using Exchange Web Services for Calendaring Tasks 

    In Exchange Server 2007 - Exchange Web Services (EWS) provides,

    • Rich set of Web methods and types
    • can use to create/update/generate calendar work flow between Exchange 2007 mailboxes.

    These methods can also cause a lot of confusion and unforeseen consequences when they are used incorrectly.

    Here is an interesting article, which talks about the "Best practices for using Exchange Web Services for Calendaring Tasks"

  • Le Café Central de DeVa

    Public Folder

    • 0 Comments

    Public Folders

    They're intended to serve as a repository for information that is shared among many users. Public folders should be used when your business requires data replication to multiple servers. 

    Used for

    • Public folders can be used for shared communication, such as discussions through message posts, shared e-mail messages, contacts, group calendars, archiving of distribution list posts, and support for Network News Transfer Protocol (NNTP).
    • Public folders can be used for shared content management. Like file shares, public folders can be used to store content, such as documentation. Public folders are also good for sharing content if you do not require versioning and provisioning.

    If you require offline storage of information or replicated storage of information, public folders are an ideal repository.

    Not used @

    • Public folders were not designed for archiving data. Users who have mailbox limits sometimes use public folders, instead of personal folder (.pst) files, to archive data. This practice is not a recommended best practice because it increases storage on public folder servers and undermines the goal of mailbox limits.
    • Public folders were not designed for document sharing and collaboration. Public folders do not provide versioning or other document management features, such as controlled check-in and check-out functionality, and automatic notifications of content changes.
  • Le Café Central de DeVa

    Services - Exchange Server 2003

    • 0 Comments

    Services that are used by Exchange (Exchange Server 2003)

    As we know, Services are application types that run in the system background. Services provide core operating system features, such as Web serving, event logging, file serving, help and support, printing, cryptography, and error reporting.

    Here is another nice & interesting article, which gives detailed information about the Services that are used by Exchange (Exchange Server 2003). This article will give you an in-sight of Exchange related services.

    Please click here to read the article

  • Le Café Central de DeVa

    Tools used with Exchange Server 2003

    • 0 Comments

    Tools used with Exchange Server 2003

    Here's an interesting article that i found on MS Technet, which talks about the Tools that are used with Exchange Server 2003.

    Certainly this article is an eye-opener and handy one.

    Please click here to find more information

  • Le Café Central de DeVa

    Mailbox store & Public folder Store - Basic Information

    • 0 Comments

    Basic Information about "Mailbox store and Public folder Store"

    • MS Exchange store is a storage platform. The Exchange store is also known as the Web Storage System.
    • It provides a single repository for managing multiple types of unstructured information in one infrastructure.
    • Mailbox stores & public folder stores are two of the components of the Exchange store.

    MS Exchange Server 2000 & 2003 include two types of information databases:

    • Mailbox Store:
      • Hold personal mailbox information.
    • Public Folder Store:
      • It's a shared repository, where information that is shared among many users. Public folders should be used when your business requires data replication to multiple servers.
  • Le Café Central de DeVa

    Setting Locale information

    • 1 Comments

    Found one of the interesting function "Setlocale".

    Setlocale function sets the global locale and returns the previous locale. This function has a parameter "lcid" to identify uniquely a locale, which is a 32 bit value/short string.

    Syntax: Setlocale(lcid)

    If "lcid" is set as Zero(0), then it will set the current system setting.

    Please find the working sample available, click here

  • Le Café Central de DeVa

    Monitoring Event Sink # 1 - Listing registered Event sink information

    • 0 Comments

    Use the following command at command window to get list of registered Event sink registration:

    Cscript [//NOLOGO] ListMailboxes.vbs {/F:filename | /S:servername} [/DEBUG]

    Where,

    //NOLOGO

    Suppresses the version of Windows Script Host (WSH) and copyright information.

    /F

    The name of the text file that contains the names of the servers, will be available one per line, for which you want to list mailboxes. You must create the text file before you use this script.

    /S

    Name of the server that contains the mailboxes that you want to list.

    /DEBUG

    Outputs verbose debug information that you can use for diagnosis.

    Note:

    You must specify either the /F or /S switch.

    For more information, please read this Technet article click here.

  • Le Café Central de DeVa

    Event Sink - How to guides

    • 0 Comments

    Event Sink - How to guides:

  • Le Café Central de DeVa

    Get all mailbox information from WMI & C#.Net

    • 0 Comments

    In one scenario, there was a need for me to get all mailbox related information using WMI and C#.Net.

    Here is a code snippet to get all mailbox information from an Exchange Server - WMI & C#.Net.

    using System;
    using System.Management;

    namespace ConsoleTwo
    {
        class Class1
        {


            [STAThread]
            static void Main(string[] args)
            {
                try
                {
     
                    System.Management.ConnectionOptions objcon = new System.Management.ConnectionOptions();
                     objcon.Impersonation = ImpersonationLevel.Impersonate;
     
                    // Exchange Server Name
                    string cServername = "Server Name";
     
                    // Create a management scope into Exchange WMI namespace
                    System.Management.ManagementScope exScope =
                        new System.Management.ManagementScope(@"\\" + cServername + @"\root\MicrosoftExchangeV2", objcon);

                    // Create a query to get the data from the Exchange WMI
                    System.Management.ObjectQuery objQry =
                        new System.Management.ObjectQuery("SELECT * FROM Exchange_Mailbox");

                    // Retrieves a collection of management objects based on the query.
                    System.Management.ManagementObjectSearcher objSrch =
                        new System.Management.ManagementObjectSearcher(exScope, objQry);
                    System.Management.ManagementObjectCollection qryCol = objSrch.Get();

                     // Loop each item in the collection
                    foreach (System.Management.ManagementObject mailBox in qryCol)
                    {
                         Console.WriteLine("{0} {1} {2}", mailBox["MailboxDisplayName"].ToString() , mailBox["TotalItems"].ToString() , mailBox["size"].ToString() );
                     }
                 }
                catch (Exception eVal)
                {
                    Console.Write(eVal.InnerException + eVal.Message + eVal.Source + eVal.StackTrace );
                }
                Console.Read(); 
            }
        }
        }

  • Le Café Central de DeVa

    Event sink: Will it sink?

    • 0 Comments

    Lets we discuss about Event sink: It will sink?

    Just for words, it might be fascinating or it will be funny to hear such remarks. Some guys even crib about that too; but it's not actually. Event sink is one of the strongest feature available in Exchange environment; they're helpful in many scenarios and quite lot of applications wrapped around it.

    I have worked with couple of scenarios with Event sink; it can be used to monitor the incoming/outgoing mails, virus scanning applications, stripping attachments, spam filters etc.

    So what is a Event sink

    It's a piece of code which defines how the server or the computer is to handle the given events.

    What it can be used for?

    They can be used as spam filters to fire certain actions;

      • act as spam filter
      • to find certain types of attachments
      • can get response to the receipt of an e-mail message with certain characteristics
      • to strip out the incoming/outgoing attachments
      • download the attachments to specific physical folders
      • block the attachments within their org/enterprise level
      • to delete excessive data sent............................................. for more information, please click here

    What are the Technologies can we create event sinks:

    • VB Script
    • Managed Sink - Created & compiled in .Net framework
    • C++

    Types of Event sinks:

    • Synchronous
    • Asynchronous
    • System

    For detailed information, please find @ Matt's blog

  • Le Café Central de DeVa

    WMI

    • 2 Comments

    WMI: Microsoft Windows Management Instrumentation (WMI) is an extensions to Windows Driver Model (WDM); it provides the Operating System interface to access any instrumented (have ability to monitor) Enterprise components that provide the information as well as notification.

    WMI is the Microsoft implementation to two industry standards of DMTF (Desktop Management Task Force). They are,
    1. CIM  - Common Information Model  2. WBEM - Web-Based Enterprise Management

    Usage: Some of the common usages are,

    • Access most elements of your operating system and its environment
    • Can access a local or remote computer
    • Can configure and manage the hidden settings

    Availability:

    • Can be used with the Programming languages(VB.Net, C#.Net, etc.)
    • Can be used with the Scripting languages(Windows Shell, VBScript, etc.)
    • Also available as Command Line Interface - Windows Management Instrumentation Command-line (WMIC)
    • Pre-installed in most of the latest Windows OS
    • Downloads (redistributables) available for Windows 95, Windows 98

    For more WMI Scripting info click, WMI Scripting Primer  |  Need Troubleshooting and tips for WMI, click WMI FAQs

  • Le Café Central de DeVa

    Microsoft Surface

    • 1 Comments

    Surface computing has arrived.
     Microsoft Surface
       http://www.surface.com/

  • Le Café Central de DeVa

    Exchange - Terminology changes Roadmap

    • 1 Comments

    Here is an interesting article which tabulates terminology changes from MS Exchange Server 5.5  to Exchange Server 2007; there are quite many changes been made between these versions, added/removed quite many features.

    Although this table doesn't include all the features, but it can be used as a starting point to help yourself...

    Please click here to read the article

  • Le Café Central de DeVa

    My First Post

    • 1 Comments

    Hi,

    I am DeVa working as Support Engineer for Microsoft. Currently located in Bangalore, India. I am a generalist and support code related (programmatic) access to Enterprise Business Application - especially Exchange and Outlook related stuff, like VBA, Sinks, VSTO, WebDAV,  CDOx.

    Have hands of development experience in SAP and Microsoft Technologies in Aeronautical, Retail, Manufacturing domains....

    Interests: .Net Programming - Web/Windows/Mobile applications, Enterprise Library

Page 26 of 26 (649 items) «2223242526