Code Monkey home page Code Monkey logo

removeprivateflag's Introduction

Synopsis

RemovePrivateFlags.exe will remove the private flags from all messages in an Exchange Server mailbox (appointments will not be altered).

Why should I use this

If a private meeting request is forwarded or answered the message it self is also marked as private. This is fine for personal mailboxes but you will maybe get problems if you use shared mailboxes or after migrate data from public folders into a mailbox.

This utility is designed for run once until a migration.

Installation

Simply copy all files to a location where you are allowed to run it and of course the Exchange servers are reachable.

Requirements

  • Exchange Server 2013/2016 (Tested with CU15, maybe it will work with Exchange 2007/2010 as well)
  • Application Impersonation Rights if you want to change items on other mailboxes than yours
  • Microsoft.Exchange.WebServices.dll, log4net.dll (are provided in the repository and also in the binaries)

Usage

RemovePrivateFlags.exe -mailbox [email protected] [-logonly] [-foldername "Inbox"]

Search through the mailbox and ask for changing a item if -logonly is not set to true. If -foldername is given the folder path are compared to the folder name. If -logonly is set to true only a log will be created.

RemovePrivateFlags.exe -mailbox [email protected] [-foldername "Inbox"] [-noconfirmation]

Search through the mailbox, if -noconfirmation is set to true all items will be altered without confirmation.

Parameters

Mailbox which you want to alter.

  • optional: -logonly

Items will only be logged.

  • optional: -foldername "Inbox"

Will filter the items to the Folderpath

  • optional: -noconfirmation

Messages will be set to normal without confirmation.

  • optional: -ignorecertificate

Ignore certificate errors. Interesting if you connect to a lab config with self signed certificate.

  • optional: -impersonate

If you want to alter a other mailbox than yours set this parameter.

If set together with -password this credentials would be used. Elsewhere the credentials from your session will be used.

If you set an specific URL this URL will be used instead of autodiscover. Should be used with -ignorecertificate if your CN is not in the certficate.

  • optional: -allowredirection

If your autodiscover redirects you the default behaviour is to quit the connection. With this parameter you will be connected anyhow (Hint: O365)

License

MIT License

removeprivateflag's People

Contributors

apoc70 avatar xedoc64 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

kib

removeprivateflag's Issues

stuck at autodiscover

Hello Thomas,

what can I do to solve this?

2020-02-18 15:09:41,108 [1] ERROR RemovePrivateFlag.Program [(null)] - Connection to mailbox failed
Microsoft.Exchange.WebServices.Data.AutodiscoverLocalException: Autodiscover blocked a potentially insecure redirection to https://autodiscover.yxc.de/autodiscover/autodiscover.xml. To allow Autodiscover to follow the redirection, use the AutodiscoverUrl(string, AutodiscoverRedirectionUrlValidationCallback) overload.
bei Microsoft.Exchange.WebServices.Data.ExchangeService.DefaultAutodiscoverRedirectionUrlValidationCallback(String redirectionUrl)
bei Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.CallRedirectionUrlValidationCallback(String redirectionUrl)
bei Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.TryLastChanceHostRedirection[TSettings](String emailAddress, Uri redirectionUrl, TSettings& settings)
bei Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List1 redirectionEmailAddresses, Int32& currentHop) bei Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettings[TSettings](String emailAddress) bei Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List1 requestedSettings)
bei Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames)
bei Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion requestedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
bei Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
bei Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress)
bei RemovePrivateFlag.Program.ConnectToExchange(String MailboxID, Boolean allowredirection, String User, String Password, Boolean Impersonisation) in D:\VSREPOSITORIES\RemovePrivateFlag\RemovePrivatFlag\Program.cs:Zeile 317.

Danke, viele Grüße

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.