Showing posts with label Exchange 2013. Show all posts
Showing posts with label Exchange 2013. Show all posts

Thursday, March 06, 2014

Shared Mailbox mail sent folder

In Exchange 2013 with Outlook 2010 client, mail sent dont land in the corresponding sent folder.

For example, If John has access to shared mailbox Info@contoso.com, mail he sends with info as sender will land in his personal sent folder. This makes John and John collegues confused.

Solution:

  1. Make sure KB24591115 is installed, from 2010 so most likely. http://support.microsoft.com/kb/2459115
  2. Add this registry value on Johns computer/session
  3. Key: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences
    Name: DelegateSentItemsStyle
    Type: DWORD
    Value: 1

    Or run FixIt on https://support.microsoft.com/kb/2181579

    References:

    https://support.microsoft.com/kb/2181579

    http://support.microsoft.com/kb/2459115

Thursday, December 12, 2013

Setting permissions on calendars

A customer want two specifik users to have edit permissions on certain users in the company. It’s many users, is a situation that might have to be done again and again.

So we use powershell for the solution.

First we created a script to check the current permissions to get a baseline of what we’re working with.

foreach ($user in get-content editcalendarusers.txt)

{

write-host "Permissions for user: $user" -foregroundcolor red -backgroundcolor yellow

get-mailboxfolderpermission ${user}:\calendar

}

Where editcalendarusers.txt is a text with one username per line. This is also a good way of validating your editcalenderusers.txt list, to catch any errors or localized boxes.

Since set-mailboxfolderpermissions only can edit existing userpermissions, not add new ones, we first need to run add-mailboxfolderpermission on our userlist. If an account already exist ps throws an error, but no changes are made. Other users already added to the permssions aren’t modified.

First script

----addperm.ps1----

foreach ($user in get-content editcalendarusers.txt)

{

add-mailboxfolderpermission ${user}:\calendar -user john.doe -Accessrights Editor

write-host "john.doe added as editor for $user."

add-mailboxfolderpermission ${user}:\calendar -user charles.doe -Accessrights Editor

write-host "charles.doe added as editor for $user."

}

-----eof-----

Second script

----setperm.ps1.

foreach ($user in get-content editcalendarusers.txt)
{
set-mailboxfolderpermission ${user}:\calendar -user john.doe -Accessrights Editor
write-host "john.doe added as editor for $user."
set-mailboxfolderpermission ${user}:\calendar -user charles.doe -Accessrights Editor
write-host "charles.doe added as editor for $user."
}

---eof-----

If the permissions already are set the second script reports this and goes on to the next line.

One error we ran into was that a few users had changed the language on their mailbox. On these we exchanged the :\calender for the correct folder. In our case :\kalender .

Now obviously we could have made this less static by adding a second loop to process the editors but in this case there were only two so it wasn’t really necessary in this case.

References:

http://technet.microsoft.com/en-us/library/dd298062%28v=exchg.150%29.aspx

Monday, November 18, 2013

Exchange connection issues

A third party application had strange issues with a new Exchange 2013 server.

Environment: Super Office 6.1, Exchange 2013, Terminal Server, Server 2003

Symtoms:

The Infobridge Synchronizer agent had issues connecting to the exchangeserver för certain users. Only strange thing we discovered was that the users that didn’t work came in the same order as the Infobridge database had structured the users. Like the first 34 worked and the the remaining 7 had ID like 34,35,36… in the dbo.

Solution:

Many conversations with Super Office, infobridge yet another consultant and the developmentdepartment,  it finally clicked

  1. On the ExchangeServer add or change the following value
  2. \\HKEY_LocalMachine\System\CurrentControlSet\Services\MSExchangeIS\ParametersSystem\
  3. Create Dword(32) value named: Maximum Allowed Sessions Per User = 250
  4. Restart Server or Information Store.

Now it’s important to note that the Exchangeserver had proper throttlingpolicies configured and didn’t alert to any events that indicated session issues.

I had similar issue when a procurve switch between an Exchange 2003 server and an office was being bonkers. That time it had to with the switch cutting of the sessions, forcing the client to initate new sessions without closing the old ones. But I really thought 2013 would be a leap forward in this sort of situation.

Why are these the default limitation on a Serversystem that should be able to support tens of thousands of users? And the do this sort of error on only 50….

References:

http://elderec.org/2011/07/exchange-2010-mapiexceptionsessionlimit-unable-to-open-message-store-2/

Tuesday, October 15, 2013

Exchange RCAMaxConcurreny

Good to know.

In Exchange 2013 the default value for RCAMaxConcurrency 40 in the default Global policy. For a user to open 29 shared calendar at least a value of 100 is recommended. Therefore for 40 shared calendars, a value of 200 should be considered.

To be applied for all users needing to many calendars at the same time.

References:

http://support.microsoft.com/kb/2299468/sv

Thursday, September 26, 2013

Increase RCP connections to exchange 2013

Symtom:

Some users get error in Outlook:

Your server administrator has limited the number of items you can open simultaneously. Try closing messages you have opened or removing attachments and images from unsent messages you are composing.

usually happens when working with many calendars.

Cause:

Every calendar is one rpcconnections. The default limitation in Exchange 2013 is 40 connections per user. When having 30+ shared calenders and 2 mailboxes this limitation might occur more often than not.

Solution:

Create a new throttlingpolicy and increase allowed rpcconnections.

/> new-throttlingpolicy “mypolicy” –rcamaxconcurrency:200

/> set-mailbox john.doe –throttlingpolicy “mypolicy”

Verify policy set by:

/> get-mailbox john.doe |select throttlingpolicy

Script to apply this to many boxes:

---------------setthrottle-----------------------------

foreach ($user in get-content testusers.txt)

{

set-mailbox $user -throttlingpolicy "mypolicy"

write-host "$user is processed."

}

------------------eof---------------------

References:

http://www.msexchange.org/kbase/ExchangeServerTips/ExchangeServer2010/Monitoring/RPCClientAccessThrottlingLogging.html

http://www.kraftkennedy.com/blog/bid/102095/Exchange-2010-Notes-from-the-Field-Client-Throttling-and-Max-Concurrency

http://technet.microsoft.com/en-us/library/bb232205%28v=exchg.150%29.aspx

http://exchangemaster.wordpress.com/tag/perfmon-counters/

Set calender permissions for all users

To check permissions for calender on a user:

/> get-mailboxfolderpermission john.doe:\calender

To Set permissions for user default to reviewer on john.does calender

/>set-mailboxfolderpermission john.doe:\calendar –user Default –Accessrights Reviewer

To script this for all users

--------------SetCalendarReviewer.ps1-------------

foreach ($user in get-content users.txt)

{

set-mailboxfolderpermission ${user}:\calendar -user Default -Accessrights Reviewer

write-host "$user is processed."

}

----------------------------eof----------------------------------

It retrievs all users from test.txt which is simply one username per line.

Also below is a link to policy to always set this permission with newly created users, which I haven’t tried out yet.

References:

http://stackoverflow.com/questions/15612088/how-to-combine-variable-with-the-rest-of-the-command

http://exchangeinside.org/2013/01/set-default-calendar-permissions-for-all-new-users-to-reviewer/

http://technet.microsoft.com/en-us/library/dd351181%28v=exchg.150%29.aspx – remove-mailboxfolderpermission

http://technet.microsoft.com/en-us/library/ff522363%28v=exchg.150%29.aspx – set-mailboxfolderpermissions

Tuesday, September 24, 2013

Exchange 2013 throttling

When setting up a special user that is used to copy a lot of items we today learned about the default throttling restrictions in Exchange 2013.

Here’s so useful powershell commands for the occasion.

/>get-throttlingpolicyassociation john.doe |fl      - shows what policy is associated with account. If it’s empty it’s the global default.

To Check the current throttlingpolicies:

/>get-throttlingpolicy |fl

To create a new one and set it to unlimited

/>New-ThrottlingPolicy MyNewPolicy

/>Set-ThrottlingPolicy MyNewPolicy -RCAMaxConcurrency Unlimited -EWSMaxConcurrency Unlimited -EWSMaxSubscriptions Unlimited -CPAMaxConcurrency Unlimited -EwsCutoffBalance Unlimited -EwsMaxBurst Unlimited -EwsRechargeRate Unlimited

/>Set-Mailbox "john.doe" -ThrottlingPolicy MyNewPolicy

Goes without saying that this should be used with extreme caution.

References:

https://migrationwiz.zendesk.com/entries/22713616-How-do-I-disable-the-Exchange-2013-throttling-policy-

http://www.msexchange.org/articles-tutorials/exchange-server-2010/compliance-policies-archiving/exchange-2010-client-throttling-policies.html

Thursday, September 19, 2013

Autodiscover pains in my side.

Problem: When setting up Outlook 2007 on a Server 2003 R2 a certificate error is shown every time Outlook starts. Exchange server is 2013 and Autodiscovery is pretty much mandatory.

image

Cannot connect to proxy server. Error code 10.

Symptom:s

Certificate error is shown at startup.

In the Outlook Anywhere settings, the proxyserver settings is set to the internal servername, like myserver.mydomain.local instead of the external mail.mydomain.com. The certificate is set to the external name so its no wonder Outlook complains.

When we alter the name in Outlook Anywhere settings the Proxyerror disappears. Though after restarting outlook once or twice, the settings returns.

Now the issue here is that these settings are only incorrect if the server (or computer) is a member of the domain. If a external Outlook puts up a user, everything looks fine in the Outlook Anywhere settings.

Cause:

Then looking for autodiscover settings, Outlook always looks to the domains SCP before the dns.

Now this can be amended by changing the parameters of cmdlet set-outlookprovider

Like : set-outlookprovider expr –server mail.mydomain.com –certprincipalname msstd:mail.mydomain.com and then restarting both mailserver and clientcomputer.

People usually solve the problem when doing that, but not in my case. I blame a very old server that probably upgraded Office one time to many.

clip_image002

Solution:

In my case I had to completely bypass the Active Directory to fool the Terminal Server to look towards the DNS, where everything worked dandy.

These are the magic settings.

Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\12.0 14.0 for Outlook 2010\Outlook\AutoDiscover and create these DWORD

"PreferLocalXML"=dword:0
"ExcludeHttpRedirect"=dword:0
"ExcludeHttpsAutodiscoverDomain"=dword:0
"ExcludeHttpsRootDomain"=dword:1
"ExcludeScpLookup"=dword:1 (forces Outlook to exclude SCP object check)
"ExcludeSrvLookup"=dword:1
"ExcludeSrvRecord"=dword:1

All cred for the fix goes to hosting.intermedia.net link below. Still pasting it here just in case they drop it.

On a side note, I also installed a brand new Server 2008 R2 with Outlook 2010 and didn’t see the issue there at all. So either something broke or Outlook 2007/Server 2003 bugged out.

References:

http://blogs.technet.com/b/umutg/archive/2011/01/31/all-about-set-outlookprovider.aspx

http://ilantz.com/2009/06/18/prevent-outlook-anywhere-aka-rpc-over-http-from-being-automaticly-configured-in-exchange-2007-with-autodiscover/

https://hosting.intermedia.net/support/kb/default.asp?id=2445

Wednesday, September 11, 2013

Autodiscover

To configure autodiscover for Exchange 2013 without one of those fancy Unified Communication Certificates, use an SRV record. This will handle Out Of Office functions (and autoconfigure from Outlook at least).
Put a DNS record for the relevant domain
Type: Other>SRV
Service: _autodiscover
Port number :443
Host offering service : mail.yourdomain.com
A nice little window will popup for all Outlook users after this, urging them to allow the change. Doing so will reconfigure their local email, taking with them any local archivefiles.
All very automatic.



image 
Edit after being tried in the real world:
Ok, so it didn't really work as expected when it got deployed. If Outlook tries to reconfigure an existing account it doesn't seem to manage if the current account is in Cached Mode. Therefore it lands in temporary land. But still, thanks to this srv-record its really easy to set up the email from scratch, just enter your emailaddress and account settings and it configures mailserversettings automaticly. could have been better ms... 

Check last logon time in E2013

Ok, so gui pretty much out in Exchange 2013.
So if I want to check when users last logged on the mailbox for some reason we use powershell.
Make a script, typing is going to get old real fast.
To check latest logintime for users
-----------CheckLastlogon.ps1-------------
add-pssnapin microsoft.exchange.management.powershell.snapin
foreach ($user in get-content users.txt)
{
get-mailboxstatistics $user |select displayname,itemcount,lastlogontime,totalitemsize
}
---------------eof----------------------------------





If you want the results in a pretty displaybox, you can pipe |out-gridview like .\checklastlogon.ps1 | out-gridview.
To make the script pause after printing, add these lines:

write-host "press any key to end"
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

Good for those diehard powerhaters out there, or in here…
References:
http://exchangeserverpro.com/last-logon-time-exchange-2010-mailbox-users/



Monday, September 09, 2013

Changing the smtp banner in Exchange 2013

  1. Check the identity
    1. get-receiveconnector |select identity,banner
    2. The identity your looking for is “SERVERNAME\DEFAULT Frontend servername”
  2. Set banner
    1. set-receiveconnector –identity “SERVERNAME\DEFAULT Frontend servername” –banner “220 mail.yourdomain.com Microsoft ESMTP MAIL Service ready”

image

References:

www.testexchangeconnectivity.com

http://rowen121.wordpress.com/2013/01/17/how-to-modify-the-default-smtp-banner/

Tuesday, August 20, 2013

Bulk creating and removing mailboxes

To create users in Exchange 2013, when they already exist in AD this script is useful.

foreach ($user in get-content users.txt)
{
Enable-mailbox –identity mydomain\$user –database mailboxdatabase1
write-host "$user is processed."
}

Users are stored in users.txt

To only remove mailbox, but not the AD-user from exchange. This is useful when needing to redo import if something didn’t land where it should.

foreach ($user in get-content DeleteUsers.txt)
{
disable-mailbox –identity mydomain\$user -confirm:$false
write-host "$user is processed."
}

Users are stored in DeleteUsers.txt

Each line contains one username.

References:

http://technet.microsoft.com/en-us/library/jj863434%28v=exchg.150%29.aspx

Thursday, June 20, 2013

Exchange 2013 powershell issues

newly installed exchange 2013 environment. Clean install. When running exchange-powershell gets error “connecting to remote server : access denied … fully qualified errorid : accessdenied, pssessionopenfailed.

image

Solution:

One of these…

  • Time on DC was off by 7 minutes. Corrected this
  • Applied the Cumalative Update 1 for Exchange 2013

Tried quite a few other fixes before this that didn’t work for me.

Among the most popular

  • Run "aspnet_regiis -ir" from C:\Windows\Microsoft.NET\Framework(64)\v4.0.30319 to register ASP.NET 4.0. – didn’t work for Server 2012
  • Added powershell 2.0 and dotnet 3.5 frameowork features
  • Activated wsman module from powershell virtuel catalogue in iis
  • ran proxy reset > netsh winhttp reset proxy
  • ran set-user administrator –remotepowershellenabled

See links below.

References:

http://www.microsoft.com/en-us/download/details.aspx?id=38176 – cumulative update 1 for exchange 2013

http://social.technet.microsoft.com/Forums/exchange/en-US/09def496-1998-4b56-bae4-8d3675d18a30/exchange-2013-powershell-error

http://social.technet.microsoft.com/Forums/exchange/en-US/aa3c936f-bec1-4e24-b38f-81685df718c7/exchange-management-shell-fails-to-connect-to-exchange-server-2013 - .

http://dbanda.blogspot.se/2013/05/problem-with-exchange-2013-management.html

http://blogs.technet.com/b/exchange/archive/2010/02/04/3409289.aspx

http://technet.microsoft.com/en-us/library/dd351136.aspx - Troubleshooting the Exchange Management Shell

http://social.technet.microsoft.com/Forums/exchange/en-US/d50f27d0-9395-40af-94bb-a7320f7e8ef0/unable-to-connect-to-local-exchange-2013-server-when-opening-exchange-management-shell - .

http://blogs.technet.com/b/exchange/archive/2013/04/02/released-exchange-server-2013-rtm-cumulative-update-1.aspx - cu1 update.

http://stackoverflow.com/questions/12411046/error-connecting-to-exchange-server-remotely-via-powershell

http://technet.microsoft.com/en-us/library/dd335083%28v=exchg.150%29.aspx – what needs to run powershell remote.

http://blog.subvertallmedia.com/2013/01/30/cant-open-exchange-shell-or-console-because-of-kerberos-authentication-error/ - very promising solution.

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...