Monday, April 29, 2013

Exchange 2007 - Finding Users with Items Over nnn Days - Inbox

Finding the age of Inbox


I am currently working on a migration from an in-house Exchange 2007 infrastructure to a hosted environment. As part of this move, there are new restrictions being placed on the mailboxes. One of these restrictions is that all mail over 180 days old is automatically deleted from the system. Prior to migrating the mailboxes, I need to know how many and which users have items older than 180 days.
Finding this information was a two-step process:

  1. Export all of the mailbox folder statistics to a CSV file
  2. Scrub the resulting data with Excel to get a list of the users and their departments with mail items over 180 days old
The first part of this process was to export the folder statistics for each mailbox. I accomplished this using a combination of PowerShell cmdlets:

get-mailboxdatabase | get-mailbox -resultsize unlimited | get-mailboxfolderstatistics -folderscope all -includeoldestandnewestitems | export-csv mailbox_stats.csv

The cmdlets break down this way:
  • get-mailboxdatabase fetches each database (this infrastructure employs multiple databases)

  • get-mailbox runs through each mailbox in the current database

  • get-mailboxfolderstatistics returns specifics about the folders in the mailbox. -folderscope all returns information about each folder under the top of information store and -includeoldestandnewestitems includes the dates of the oldest item in the folder and the newest item in the folder

  • export-csv obviously exports the results to a CSV file
Once the information is in the CSV format:
  1. I used a filter on the OldestItemReceiveDate field with "before" criteria for 180 days prior to the cut-off date

  2. Once I had the list of results narrowed down to those with mail items over 180 days, I used some VBA functions to extract the user name and the department (the users are placed into OUs by department and the result of the get-mailboxfolderstatistics cmdlet is the full "path" to the users folder including domain and OUs, so it was pretty easy for me to get their department)

  3. I then copied the results to a new list and used an advanced filter on this list to get unique records only, and I had the final list of users with items over 180 days.

Friday, April 19, 2013

Scheduling your server to Automatically Reboot


How to schedule your server to automatically reboot itself at a pre-determined time
Windows Server 2003 comes with the built-in ability to schedule your server to reboot at any time of your choosing. It is quite simple to set up.

Navigate to Start -> All Programs -> Accessories -> System Tools -> Scheduled Tasks.


Click on the icon which says Add Scheduled Task.


You should now see the Add Scheduled Task Wizard. Click Next.


Disregard the list of programs, and click the Browse button.


By default, the browse button will bring you to the root of the C: drive. Navigate to WINDOWS -> system32 and locate the file named ‘shutdown.exe’. Highlight it, and click Open.


Enter your desired name for this task. For the purposes of this article, we will name this task ‘Auto-Reboot’. Next, choose how often you would like your server to reboot, whether it is daily, weekly, or monthly. For example, let’s select monthly. Once selected, click Next.


Here, you can select the time and date of the month you would like the server to automatically reboot. For example, we will select 1:00 AM for the time. As you can see, you have many configurable options available for which day of the month you prefer. For example, we will choose the Last Thursday of the month. Once your desired options have been set, click Next.


Type in the password for the user you would like this task to run under. If you are setting this task to run under your ‘ServerAdmin’ login, enter the ‘ServerAdmin’ password. Once entered, click Next.


On the next screen, place a check-mark in the option for 'Open advanced properties for this task when I click Finish'. Once the check-mark is entered, click Finish.


Now, we need to enter a specific command to make the server reboot rather than simply shutdown. Add the following line in the Run field after ‘shutdown.exe’, without the parentheses:

            (-r -t 00)

The Run field should now look like this:


You will need to enter your ‘ServerAdmin’ password to confirm the changes. Once entered, click OK.


You have now set Windows to automatically reboot as the time you have specified.

Tuesday, April 9, 2013

Connecting to Cluster Local node when cluster resource is down!!!


It's possible that your cluster network name resource may be offline.
Start--> Run, enter either of the following commands, and click ok
cluadmin "node name"
cluadmin .
The cluadmin "nodename" depends on the IP resource, and name resolution, so if either of those aren't working you may have to use the . switch
Putting a space+dot after cluadmin should cause your cluster administrator console to connect directly to the local node, and you can see if the network name resource is offline... if it is, bring it online, and then you should be able to connect cluster administrator to the cluster name again.

Tuesday, April 2, 2013

Active Directory UserAccountControl


Quick Reference



This table provides a quick reference guide to common userAccountControl values. This is not intended to be a complete reference.


ValueDescription
512Enabled Account
514Disabled Account
544Enabled, Password Not Required
546Disabled, Password Not Required
66048Enabled, Password Doesn't Expire
66050Disabled, Password Doesn't Expire
66080Enabled, Password Doesn't Expire & Not Required
66082Disabled, Password Doesn't Expire & Not Required
262656Enabled, Smartcard Required
262658Disabled, Smartcard Required
262688Enabled, Smartcard Required, Password Not Required
262690Disabled, Smartcard Required, Password Not Required
328192Enabled, Smartcard Required, Password Doesn't Expire
328194Disabled, Smartcard Required, Password Doesn't Expire
328224Enabled, Smartcard Required, Password Doesn't Expire & Not Required
328226Disabled, Smartcard Required, Password Doesn't Expire & Not Required
line

Monday, April 1, 2013

Microsoft Lync 2013 does not update status based on Outlook Calendar KB2804472


Microsoft Lync 2013 does not update status     based on Outlook Calendar KB2804472
From the beginning, when we installed the Microsoft Lync 2013 client, we had a problem with the fact that Lync 2013 does not update the status on the basis of meetings listed in the Outlook calendar.
The result of this was that we had to adjust the status of Lync 2013 client manually for Busy eg.: when a calendar appointment was entered, and then adjust it to Available, after appointment.
We tried different ways to resolve this problem, and make Lync 2013 to automatically update status: reinstall the Lync 2013 client, removing all data from the directory:
C:\Users\rszatkowski\AppData\Local\Microsoft\Office\15.0\Lync
remove and recreate Lync user account, change Windows OS version to 7 or 8 with the same result.
Unfortunately, nothing helped, so this weekend we decided to finally take the subject seriously.
http://exchangeblog.pl/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif
As it turned out, after a search we found KB2804472 article published by Microsoft on 01/17/2013, which solved the problem.
We’ve read that primary SMTP address assigned to mailbox is causing problems, with status updates in Microsoft Lync 2013.
In this article you can read that:

This problem may occur when the user’s primary SMTP address contains uppercase characters.

It is in our opinion a very strange behavior, because most e-mails rather on Microsoft Exchange servers are created so that the first letters of the name and the names are spelled with a capital letter.
In this case, at the time of implementation of all the Lync 2013 client, suddenly we had a lot of users unhappy with the operation of the new client.
The solution to the problem, and in fact the workaround recommended by Microsoft is, of course, change the SMTP primary address to lowercase letters.
Unfortunately, such operations can not be performed easily in the console EMC because SMTP address rewriting to lowercase letters for the console is not recognized as any change in the EMC console and the address is entered again as it was with capital letters.
You need to change letters to lowercase and in the same time add some sign (letter or digit) to address and save.
Then address will be saved with lowercase letters.
After this operation, we need to re-edit the address and remove the appended character.
We hope that the issue with Microsoft Lync 2013 status will not be swept under the carpet by Microsoft and in the next update or CU for Microsoft Lync will be corrected.