exchange-server-2010

Check exchange credentials remotely and check user logged in

人盡茶涼 提交于 2019-12-04 09:46:21
I have attempted this with not much success. Basically I need to login to Exchange using EWS remotely. The issue is I don't know if the user has logged in OK or if the credentials are wrong as I get nothing back! If I provide wrong credentials the software just carries on! Is there something I'm missing, I've checked the MSDN stuff about EWS which shows you how to connect to exchange but nothing about validating credentials! Below is the code I currently have to connect. public void connect(string Email, string Password) { try { _useremail = Email; _userpass = Password; // Define the

Exchange Web Services - convert emailitem attachment from Base64 string to Byte gives error

試著忘記壹切 提交于 2019-12-04 06:24:31
问题 I am trying to read an email item attachment using EWS and save it to disk as a text file so it can be used later on. I am getting an error: "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters. " here is my code: Directory.CreateDirectory(emailAttachmentsPath); // Put attachment contents into a stream. C:\Dev\EWSHelloWorld emailAttachmentsPath = emailAttachmentsPath + "\\

Cannot load Exchange powershell snap-in: The type initializer for 'Microsoft.Exchange.Data.Directory.Globals' threw an exception

╄→尐↘猪︶ㄣ 提交于 2019-12-03 11:23:14
I have the following code that creates a PowerShell runspace with the Exchange 2010 snap in loaded. Dim runspaceConfig = RunspaceConfiguration.Create() Dim snapInException As PSSnapInException = Nothing runspaceConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.E2010", snapInException) Dim runspace = RunspaceFactory.CreateRunspace(runspaceConfig) runspace.Open() Since installing Visual Studio 2012 I started getting the following error when executing the line that adds the snap-in to the runspace config. System.Management.Automation.Runspaces.PSSnapInException occurred HResult=

Find out which users have Full Access on a mailbox

白昼怎懂夜的黑 提交于 2019-12-02 17:14:34
问题 I am trying to draw a graph of which Exchange User has which permissions on which Exchange mailboxes, coloring them according to the type of permission. As of now, I cannot find out all types of permissions that Exchange takes into account. I can, using EWS, find out who was granted access to a mailbox by the user himself: foreach(var permission in calendarFolder.Permissions) { // do sth. } But then there is the possibility that an admin grants someone permission over a mailbox by adding him

Exchange Web Services - convert emailitem attachment from Base64 string to Byte gives error

岁酱吖の 提交于 2019-12-02 10:18:40
I am trying to read an email item attachment using EWS and save it to disk as a text file so it can be used later on. I am getting an error: "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters. " here is my code: Directory.CreateDirectory(emailAttachmentsPath); // Put attachment contents into a stream. C:\Dev\EWSHelloWorld emailAttachmentsPath = emailAttachmentsPath + "\\" + sEmailSubject+".txt"; //save to disk using (Stream FileToDisk = new FileStream(emailAttachmentsPath

EWS update changes time zone to UTC

天涯浪子 提交于 2019-12-02 05:54:03
问题 I've seen this question asked several times on the web, but cannot find an answer. When I create an appointment (meeting) using managed EWS 2.0, the invitation email correctly shows the time and time zone. When I update the meeting, the new invitation emails show the time in the UTC time zone. It is the correct time for UTC, but should display in Pacific. I have tried setting the zone when creating the service connection, but this makes the initial invitation also show the time zone as UTC,

Sort-Object by greatest numerical value value from Import-CSV

别来无恙 提交于 2019-12-02 03:23:23
I want the greatest value (mailboxSize) at the top of the file. I have a cvs as inport. When I do the following sort cmd: Import-Csv import.csv| Sort-Object MailboxSize,DisplayName -Descending | Export-Csv SORT.csv I get the following result: "DisplayName","MailboxSize" "persone6","9941" "persone3","8484" "persone1","7008" "persone4","4322" "persone5","3106" "persone7","27536" "persone10","24253" "persone8","1961" "persone9","17076" "persone11","17012" "persone2","15351" "persone12","11795" "persone14","1156" "persone13","1008" But I want this as a result! "persone7","27536" "persone10","24253

Sort-Object by greatest numerical value value from Import-CSV

房东的猫 提交于 2019-12-02 01:46:14
问题 I want the greatest value (mailboxSize) at the top of the file. I have a cvs as inport. When I do the following sort cmd: Import-Csv import.csv| Sort-Object MailboxSize,DisplayName -Descending | Export-Csv SORT.csv I get the following result: "DisplayName","MailboxSize" "persone6","9941" "persone3","8484" "persone1","7008" "persone4","4322" "persone5","3106" "persone7","27536" "persone10","24253" "persone8","1961" "persone9","17076" "persone11","17012" "persone2","15351" "persone12","11795"

TimeZone change to UTC while updating the Appointment

别说谁变了你拦得住时间么 提交于 2019-12-01 20:11:21
I am using EWS 1.2 to send appointments. On creating new Appointments, TimeZone is showing properly on notification mail, but on updating the same appointment, it's TimeZone reset to UTC. Could anyone help me to fix this issue? Here is sample code to replicate the issue: ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")); service.Credentials = new WebCredentials("ews_calendar", PASSWORD, "acme"); service.Url = new Uri("https://acme.com/EWS/Exchange.asmx"); Appointment newAppointment = new Appointment

TimeZone change to UTC while updating the Appointment

南笙酒味 提交于 2019-12-01 19:30:48
问题 I am using EWS 1.2 to send appointments. On creating new Appointments, TimeZone is showing properly on notification mail, but on updating the same appointment, it's TimeZone reset to UTC. Could anyone help me to fix this issue? Here is sample code to replicate the issue: ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")); service.Credentials = new WebCredentials("ews_calendar", PASSWORD, "acme");