Le Café Central de DeVa              

                    let.us.develop.share.messaging.more... DeVa blogs!!




 

Blog - Title

November, 2007

  • Le Café Central de DeVa

    Powershell & cmdlet - In a Nutshell - Part 6 - Exchange Management Shell (EMS)

    • 0 Comments

    Exchange Management Shell:

    • It's a new automation and scripting shell.
    • It has the command-line management interface and associated command-line plug-ins for Exchange Server that enable automation of administrative tasks in an Exchange 2007 environment. 
    • It is built on Microsoft Windows PowerShell (“Monad").
    • With Exchange Management Shell administrators can achieve every aspect of Exchange Server 2007.
      • For example, configure transport agents, SMTP connectors, enable new e-mail accounts
    • Mainly the tasks that you can't perform in the Exchange Management Console can be achieve through Exchange Management Shell.
  • Le Café Central de DeVa

    Powershell & cmdlet - In a Nutshell - Part 5 - Listing Service Information using Windows Powershell & 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

    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

    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 & 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 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

    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

    Send Email using CDO without installing the SMTP Service

    • 0 Comments

    Here is a code snippet 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 = "Test Mail"
    objEml.Textbody = "Oops...You got the Mail!!"
    objEml.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    objEml.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpserver"
    objEml.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    objEml.Configuration.Fields.Update
    objEml.Send
    Msgbox "Mail Sent!"


    Please note that,
    1) Replace the name SSN with SMTP server name
    2) The script will work where the SMTP Service has not been installed

  • 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

    Microsoft Surface - Features

    • 0 Comments

    Microsoft Surface - Key Features:

    Direct interaction: Users can actually “grab” digital information with their hands, interacting with content by touch and gesture, without the use of a mouse or keyboard.
     
    Multi-touch: Surface computing recognizes many points of contact simultaneously, not just from one finger like a typical touch-screen, but up to dozens of items at once.
     
    • Multi-user: The horizontal form factor makes it easy for several people to gather around surface computers together, providing a collaborative, face-to-face computing experience.
     
    • Object recognition: Users can place physical objects on the surface to trigger different types of digital responses, including the transfer of digital content. 

Page 1 of 4 (31 items) 1234