exchange-server-2010

Determining version of Exchange server on the system using C#

笑着哭i 提交于 2019-12-30 10:36:03
问题 Is there a way to detect which version of Exchange Server is running (2007 or 2010) via c#? 回答1: Your best bet would be to use WMI 回答2: There is VBScript here that gets the version for all Exchange Servers in the domain using WMI and AD. You could convert this logic to the appropriate .Net classes if this is not usable as is. '**************************************************************************** ' This script created by Chrissy LeMaire (clemaire@gmail.com) ' Website: http://netnerds

C# - Remove Exchange Email Address via Powershell Runspace

人盡茶涼 提交于 2019-12-25 02:26:19
问题 Per Technet - Add or Remove Email Addresses for a Mailbox, using the PowerShell console, the following successfully removes an email alias from a mailbox : Set-Mailbox "GenMgr" -EmailAddresses @{remove="GenMgr@domain.com"} However, invoking the PSCommand object below via remote runspace throws a System.Management.Automation.RemoteException error. command.AddCommand("Set-Mailbox"); command.AddParameter("Identity", "GenMgr"); command.AddParameter("EmailAddresses", "@{remove='GenMgr@domain.com'}

powershell smtp has no mailbox associated with it

谁都会走 提交于 2019-12-25 02:15:10
问题 I am trying to input an appointment into calendar in exchange 2010 using powershell. But i get an error on the last line to save. the smtp has no mailbox associated with it. I am using admin user to do this so i don't understand why it is not working. below is the code Param ([string]$calInputFile = $(throw "Please provide calendar input file...")) # Testing #$calinputfile="d:\calendar_inject.csv" # Connect to Live@edu # capture the admin LiveID username in a variable $Username =

How to retrieve public calendars from EWS?

穿精又带淫゛_ 提交于 2019-12-24 14:02:16
问题 We are managing the reservations for our car pool via exchange. Every car has a calender on which you can insert an appointment with the car, for when you want to use it. My task is to retrieve every car's calender and every appointment in it, but I am stuck on how to make the right call via EWS. My steps are as following: Create an Exchange service Use credentials of service account AutodiscoverUrl() Create CalenderFolder, CalenderView und retrieve appointments. ? Right now my problem is

Powershell: Get-Mailbox, split multi-value GrantSendOnBehalfTo to its' own line

梦想与她 提交于 2019-12-24 08:47:10
问题 I'm trying to run a report on users with 'Send on Behalf Of' rights to mailboxes. The results are fine if there's only a single account, but when there're multiples, the values are joined into a single string with default delimiter being spaces. Even when I use split with line-feed as delimiter, it's still treated as a single string separated by line-feed. Here's my current code: get-mailbox "Sales Dept" | select identity,displayname,@{l='SendOnBehalfOf';e={$_.GrantSendOnBehalfTo -join "`n"}}

AD User Authentication

自闭症网瘾萝莉.ら 提交于 2019-12-23 09:15:06
问题 I am attempting to create an ASP.NET (.NET 3.5) website to connect to our Exchange 2010 server through Exchange Web Services, I am able to connect to EWS when I define the username, password and domain to authenticate with but I would like, if possible, to not include login details in my code. In IIS I have enabled Integrated Windows Authentication for the site, in web.config of the site I have <authentication mode="Windows"/> . The following code is what I have been woking with: svc

Programmatically add/edit exchange2010 account

我们两清 提交于 2019-12-23 05:41:40
问题 You have to know this is the first time I am working with exchange. I have to create a program to add/edit account on exchange 2010. I know there's a lot of answer about this topic on the internet, but I did not find any recent complete tutorial that explain how to do it from scratch (all the complete step). I want to create a c# OR vb (.NET) program (window's client, or web, or whatever) with this functionality : Add a new exchange 2010 email account List existing account Edit existing

item.HasAttachments is true but no attachments in collection

…衆ロ難τιáo~ 提交于 2019-12-22 10:18:47
问题 I need to retrieve & copy attached files from a number of mail items. Problem is each mail item's collection is empty, even though the property HasAttachment is true. Do I need to load each mail item's attachment colloection somehow after the mail item is retrieved? The following code spits out the exception "index is out of range.": FindItemsResults<Item> findResults = service.FindItems( WellKnownFolderName.Inbox, new ItemView(1)); foreach (Item item in findResults.Items) { if (item

Get Sum of Exchange Mailbox Statistics

白昼怎懂夜的黑 提交于 2019-12-22 09:50:13
问题 I'm trying to get the sum of the TotalItemSize for an Exchange database using the command Get-MailboxStatistics -Database MBX07 | Measure-Object -Sum TotalItemSize The command works perfectly fine in the Windows PowerShell ISE but if I run it in an Exchange EMS (both are on my local machine) I get errors for every mailbox in the database that say Measure-Object : Input object "8.518 MB (8,932,049 bytes)" is not numeric. The output in the ISE where the command works looks like Count : 174

Running script on Exchange 2010

你。 提交于 2019-12-21 20:47:50
问题 I want to run a script when an email is received on my exchange server. I really don't have a great direction on how to implement this. I've written my script in VB and tested it on outlook. I incorrectly assumed you can run a script from a rule in Exchange like you can in Outlook. Any help would be greatly appreciated. Should I be using smtpreg.vbs or EWS or something completely different? 回答1: Exchange used to rely on event sinks for this kind of processing, but this is deprecated and not