Le Café Central de
Deva             


                    ... Deva blogs!!



  • Le Café Central de DeVa

    Powershell & cmdlet - In a Nutshell - Part 4 - Verify Autodiscover Service info for Outlook 2007 using "Test-OutlookWebServices" cmdlet

    • 5 Comments

    How to verify Autodiscover Service info for Outlook 2007 using "Test-OutlookWebServices" cmdlet:

    In Exchange Server 2007 environment, to verify the Autodiscover service settings for Outlook and that has Client Access server role installed or not, we can use of "Test-OutlookWebServices cmdlet". It verifies information for the services like, (1) Availability service (2) Outlook Anywhere (3) Offline Address Book (4) Unified Messaging.

    The cmdlet tests for a connection to each service. For example, it requests the availability service for the above user to check the user's free/busy information obtained from Client Access server to the Outlook 2007.

    For Example,  "test-OutlookWebServices -identity:sample@administrator.com"

    This cmdlet verifies the service information that is returned to the Outlook 2007 client from the Autodiscover service for sample@administrator.com

  • Le Café Central de DeVa

    Microsoft Surface - Provides life in Restaurants, Hotels, Retail Locations and Casino Resorts

    • 4 Comments

    Microsoft Launches New Product Category: Surface Computing Comes to Life in Restaurants, Hotels, Retail Locations and Casino Resorts

    First commercially available surface computer from Microsoft breaks down barriers and provides effortless interaction with information using touch, natural gestures and physical objects

    Click here to read more about the article

  • 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

    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

    Send Email from a Script using CDO

    • 2 Comments

    Here is a code snippet of a script that uses CDO to send email from a computer. 

     Set objEml = CreateObject("CDO.Message")
     objEml.From = "testuser@admin.com"
     objEml.To = "sampleuser@admin.com"
     objEml.Subject = "Sample Message"
     objEml.Textbody = "Test Message from Test User"
     objEml.Send
     Msgbox "Mail Sent!!"

    Please note that the script will work only where SMTP Service has been installed.

  • Le Café Central de DeVa

    How to programmatically create a global address list (GAL) in Exchange Server

    • 2 Comments

    I found an interesting article which talks about Microsoft Visual Basic sample code that demonstrates how to programmatically create a global address list (GAL) in Exchange Server.

    Please click here to read the article

  • Le Café Central de DeVa

    Powershell & cmdlet - In a Nutshell - Part 1 - Introduction

    • 2 Comments

    What is a PowerShell?

    Windows PowerShell or Powershell or Windows Shell is a new Windows command-line shell (includes an prompt and scripting environment, which can accept and return text) designed for specially system adminis. 

    Windows Powershell Vs. Classic Shell(s):

    • Windows PowerShell does not process text. Instead, it processes objects based on the .NET platform.
    • Windows PowerShell comes with a large set of built-in commands with a consistent interface.
    • All shell commands use the same command parser, instead of different parsers for each tool. This makes it much easier to learn how to use each command.

    New feature?

    PowerShell uses its own scripting language, rather than reusing existing languages, for the following reasons.

    • Windows PowerShell needed a language for managing.NET objects.
    • The language needed to provide a consistent environment for using cmdlets.
    • The language needed to support complex tasks, without making simple tasks more complex.
    • The language needed to be consistent with higher-level languages used in .NET programming, such as C#.

    Advantages:

    It is built on top of the .NET common language runtime (CLR) and the .NET Framework, and accepts and returns .NET objects.

    • This fundamental change in the environment brings entirely new tools and methods to the management and configuration of Windows.
    • It gives you access to the file system on the computer easily.
    • So Windows PowerShell providers enable you to access other data stores, like the registry & digital signature certificate stores.
    • Windows PowerShell introduces cmdlet, a single-function command-line tool built into the shell.
      • We can use each cmdlet separately
      • But cmdlet power can be realized when you use these simple tools in combination to perform complex tasks.
      • It have more than 100 basic core cmdlets, and you can write your own cmdlets and share them with other users.

    Pipeline operator:

    The Pipeline operator helps to pass the output of one command to another command as input. In Powershell-cmdlet it receives an object can act directly on its properties and methods without any conversion or manipulation. So that users can refer to properties and methods of the object by name, rather than calculating the position of the data in the output.

    • The pipeline operator (|) sends the result of the command on its left to the command on its right.

    What can we work with Powershell?

    • Can run Windows command-line programs
    • Can open GUI programs like Notepad, Calculator
    • Can capture the text that the Windows programs generate and also make use of that values in Powershell

    For example,

    "c:\> ipconfig | select-string  -pattern 255"

    where,
    - "ipconfig" command-line program, which will provide Windows IP configuration details
    - "select-string -pattern 255" cmdlet to manipulate to find the text pattern "255" in the Ipconfig output

  • Le Café Central de DeVa

    Powershell & cmdlet - In a Nutshell - Part 2 - About Cmdlets

    • 1 Comments

    About cmdlets: 

    After entry of Exchange Server 2007, there is a famous buzzword called "cmdlet" started revolving. In this series, we'll look some of its features, usage and importance in Exchange Server 2007 environment.

    What is a cmdlet?

    A cmdlet, pronounced "command-let", is the basic unit of Microsoft Shell (codenamed Monad). The Microsoft Shell (Monad) is a break through console shell for Windows. It's designed for the manipulation of objects. 

    They resemble built-in commands in other shells, for example, the Dir command in cmd.exe.

    Advantages of cmdlet with other Existing shells:

    • cmdlets can be called directly from the command line in Exchange Management Shell and run under the context of shell (not as separate process)
    • Unlike in other shells, in the Exchange Management Shell, cmdlets have descriptive verb-noun names.
    • In Unix and Linux environments, shells pipe text from one application to another
    • Monad allows the piping of .NET objects in Windows Environment using console shell.
    • In traditional shells, the commands are executable programs that may vary from very simple to very complex.
    • For Example, in Windows Powershell, we have a new feature "single-feature command - cmdlet" that manipulates objects in available in Windows PowerShell. 
    • Most of the cmdlets are simple and designed to be used in combination with other cmdlets.

    Adjoining issues:

    Monad is revolutionary because text strings were a limitation. Lets we understand how it works.

    • Normally in any console shell, data had to be represented in text & it needs to be broken up into units so that other programs could understand.
    • In Unix or Linux environments to achieve the functionality we need to on depend program like grep to do that.

     

  • Le Café Central de DeVa

    Powershell & cmdlet - In a Nutshell - Part 3 - Identifying Cmdlet

    • 1 Comments

    Identifying Cmdlet:

    Simple way to recognize the cmdlets by their name format -- "a verb and noun separated by a dash (-), such as Get-Help, Get-Process, and Start-Service"

     
    For example, each cmdlet has a help file that you can access by typing:

    get-help <cmdlet-name> -detailed

    It will provide detailed view of the cmdlet help file includes a description of the cmdlet, the command syntax, descriptions of the parameters, and example that demonstrate use of the cmdlet.

    Still for more information, we can identify that,

    • the "get" cmdlets only retrieve data
    • the "set" cmdlets only establish or change data
    • the "format" cmdlets only format data
    • the "out" cmdlets only direct the output to a specified destination.
  • Le Café Central de DeVa

    Powershell &amp; cmdlet - In a Nutshell - Part 5 - Listing Service Information using Windows Powershell &amp; cmdlet

    • 1 Comments

    How to list Service Information using Windows Powershell & cmdlet: 

    In Exchange Server 2007, Get-Service cmdlet will be used to retrieve information about the services installed on the computer. By default, it will return the results in alphabetical order.

    (1) Get information about the services installed 

    Get-Service

    It will list/get you the information about the service name, status and, display name.

    (2) Get information about the services in sorted

    Get-Service | Sort-Object status, displayname

    Here,
    Sort-Object - the cmdlet can sort the data in any way we want, Status - service property which needs to be filtered, display - represents display name

    (3) Get information about the services installed, but only for running services

    Get-Service | Where-Object {$_.status –eq "running"}

    Here, Where-Object - the cmdlet filters out everything except those services that are stopped, $_. - the object passed across the pipeline, Status - service property which needs to be filtered, -eq "running" - represents the running services

    (4) Get information about the services installed, but only for stopped services

    Get-Service | Where-Object {$_.status –eq "stopped"}

    Here, Where-Object - the cmdlet filters out everything except those services that are stopped, $_. - the object passed across the pipeline, Status - service property which needs to be filtered, -eq " stopped" - represents the stopped services

  • 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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    Event Sink - How to guides

    • 0 Comments

    Event Sink - How to guides:

  • Le Café Central de DeVa

    Get all mailbox information from WMI &amp; 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

    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

    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

    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.
Page 1 of 2 (31 items) 12