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

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…

5

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

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…

1

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

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)…

1

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

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…

2

Send Email using CDO without installing the SMTP Service

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”) = 2objEml.Configuration.Fields.Item (“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = “smtpserver” objEml.Configuration.Fields.Item (“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = 25objEml.Configuration.Fields.UpdateobjEml.SendMsgbox “Mail Sent!” Please note that,1) Replace the name SSN with SMTP server name2) The script will work…


Send Email from a Script using CDO

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.

2

Verify the status of an Web Directory Application using WMI

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 colItemsstrStatus = objItem.AppGetStatusIf strStatus = 2 ThenWscript.Echo “The…

1

Adding an Event Registration for a Folder

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


Create Application Pool using WMI

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

1

Exchange Server 2007 – Transport Agent

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…


EWS : Delegate Access using Exchange Web Services

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…