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/

Friday, September 06, 2013

Using retention events as reminders

In lists, we sometimes want email reminders when something is due. Maybe a contract is about to expire. Or a folder hasn’t been touched in a long time.

Using Information Management Policies we can use a datefield to initate a move or start a workflow. All built-in, although in the enterprise version of Sharepoint 2013.

  1. Create a datecolumn in your list.
  2. Create a workflow associated with the list. For example a simple email-wf. image
  3. List>List Settings>
  4. Permissions and Management>Information Management Policy Settings>Item>Enable Retention>Add a retention state
  5. Use the created date-column or another available date column, choose action. In this case the newly created workflow.
  6. Enter a listitem which is about to expire.
  7. Testrun by running timerjobs for the specific webapplication on the sharepoint server. The relevant jobs are in Sharepoint 2013 :
    1. PolicyUpdateProcessing
    2. ExpirationProcessing
  8. After all is verified to be working, it’s a good idea to change the timerjob intervals of above jobs. Default value is only once a week. Change this to daily at the appropriate time.

The timerjobs must be run in that particular order for this to work. After they have first run, for trial and error purposes, we can remove the policy and reapply to renew the policy.

Also some handy powershell for the occasion:

/> get-sptimerjob policyupdateprocessing

/> start-sptimerjob expirationprocessing

/> set-sptimerjob expirationprocessing –schedule ”daily at 07:00”

/> set-sptimerjob policyupdateprocessing –schedule “daily at 06:00”

Note that above assumes theres only one webbapplication. When there’s more the powershell needs to be targeting that specific application. Since all applications have these timerjobs.

image

References:

http://office.microsoft.com/en-001/sharepoint-server-help/create-and-apply-information-management-policies-HA101631505.aspx - general information

http://weblogs.asp.net/spano/archive/2012/03/17/sharepoint-expiration-policy-not-working.aspx

http://technet.microsoft.com/en-us/library/ff607833.aspx - start-spadminjob - seems to start all timerjobs.

http://www.danielroot.info/2012/08/information-management-policy.html - details

http://stackoverflow.com/questions/8545161/sharepoint-2010-retention-policy-not-working

http://weekbeforenext-blog.blogspot.se/2011/06/extracting-month-and-year-from-date-and.html

http://office.microsoft.com/en-001/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx

http://yalla.itgroove.net/2012/09/sharepoint-calculated-column-formulas/

http://blogs.askcts.com/2013/05/14/creating-a-timed-workflow-in-sharepoint-2010/ -

http://sarahlhaase.wordpress.com/2013/03/27/setting-up-automated-reminder-emails/

https://specmgt.wordpress.com/2011/10/26/documentexpiry/ -

Friday, August 30, 2013

Remote Desktop Services in 2012

Problem:
In a customer environment they wanted to install RDS and DC on the same server. A nice cheap solution, which have worked perfectly fine in the past. Not so anymore. In Server 2012, RDS requires by default that
  1. A domain controller is present, aka server is member of a domain
  2. the RDS role cannot be installed on the DC
Which means, you need at least two servers for a working installation?
Well no, there is apparently a official workaround from microsoft. It was not easy to find so im posting it here for future reference or until I’ve had time to try it out.
Edit:  A colleague actually tried this out on several machines and it seemed to work as expected.
Solution:
http://support.microsoft.com/kb/2833839/en-us?sd=rss - Guidelines for installing the Remote Desktop Session Host role service on a computer running Windows Server 2012 without the Remote Desktop Connection Broker role service
References:
http://www.wackytechtips.com/installing-and-configuring-remote-desktop-services-rds-on-windows-server-2012/
http://blogs.msdn.com/b/rds/archive/2013/07/09/what-s-new-in-remote-desktop-services-for-windows-server-2012-r2.aspx
http://technet.microsoft.com/en-us/library/hh831447.aspx - specs about rds 2012.
http://technet.microsoft.com/library/hh831568.aspx - deprecated
http://blogs.msdn.com/b/rds/archive/2013/03/14/what-s-new-in-windows-server-2012-remote-desktop-gateway.aspx - changes
http://blogs.technet.com/b/askperf/archive/2012/10/30/windows-8-windows-server-2012-remote-desktop-management-server.aspx - new ways of managing rds
http://www.urtech.ca/2013/02/solved-1-hour-to-install-and-configure-a-single-server-remote-desktop-services-on-server-2012/
http://social.technet.microsoft.com/Forums/windowsserver/en-US/cbffb2d4-ff9d-49ee-a9ce-a60db2262422/managing-server-2012-rds-in-a-workgroup- -
http://support.microsoft.com/kb/2833839/en-us?sd=rss&spid=16526&wa=wsignin1.0 – ms article regarding standalone rds
http://microsoftplatform.blogspot.nl/








Thursday, August 29, 2013

Previous Version stopped working on network share

Environment: Server 2003 R2

Symptoms:

No previous versions of files are found when looking from client computer on network share. Seems to be set up ok, but when looking at Task Scheduler the job shows error “Could not Start”

image

Event Viewer shows no related errors at the latest runtime.

Solution:

  1. Disable shadow copy and delete all scheduled jobs.
  2. Delete or move files starting with “d42” from folder “C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\S-1-5-18”
  3. Enable shadow copy on disks and verify that task now can be started manually.

Cause:

Might be the account originally used to create the job doesn’t exist anymore.

References:

http://support.microsoft.com/kb/822904 - 0x800700d data is invalid.

http://blogs.technet.com/b/jhoward/archive/2006/06/22/shadow-copy-failures-scheduled-task-fails-with-general-page-initialization-failed-error-0x8007000d.aspx -

http://blog.mpecsinc.ca/2007/03/windows-server-2003-attempt-to-retrieve.html

     

     

     

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

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...