Using–Filter, Select-Object, ForEach-Object in C# – Exchange PowerShell Automation

Have you ever tried migrating Exchange PowerShell script to be used from C# code?  I needed to convert the following script to C# Get-Mailbox -filter {ResourceType -ne "Room"}| Select-object Alias,DistinguishedName,Identity | foreach-object {Get-MailboxFolderStatistics $_.Alias} If you run the above script in Exchange 2010 Management Shell you might get the following error message: Pipeline not executed…

0

After installing KB 2553248, Outlook 2010 starts to crash when we open Meetings in the Calendar

Here’s a scenario we recently had reported: A customer running Outlook 2010 installs KB 2553248, and now Outlook crashes when they try to open meetings that were created using Exchange Web Services (EWS). In fact there are a few other scenarios where Outlook crashes: 1) Create a Meeting request using EWS and send it to…

0

HOW TO: Call .PS1 script from Managed code using Remote Powershell(Exchange 2010)

As promised below is the code to call a .PS1 script and pass parameters to it. Most of the code is very similar to my previous post that showed how to call Exchange & PowerShell cmdlet. using System;using System.Collections.Generic;using System.Text;using System.Management.Automation;using System.Management.Automation.Runspaces;using System.Management.Automation.Remoting;using System.Collections.ObjectModel;using System.Security;namespace CallingScriptPS{ class Program { static void Main(string[] args) { string…

0

HOW TO: Read User Configuration for OWA in Exchange 2010 using EWS Managed API 1.0

The User Configuration operations enable clients to create, delete, retrieve, and update user configuration information. These operations are new in Exchange 2010. Configuration data consists of groups of related application settings. Each group of settings is stored together in separate stream properties that are set on FAI messages. The OWA configuration its stored in IPM.Configuration.OWA.UserOptions…

0

HOW TO: List Top Level Folders in a Mailbox using EWS Managed API 1.0

Now that developers have started using Exchange Web Services Managed API, I thought it would be nice for me to post some samples to do simple things using the API. This sample shows: 1)How to list the Top Level folders in a mailbox. 2)Using Paging with the FolderView class. 3)Enabling logging of the Request and…

0