O-Xchange Notes from the Field!

Monday, October 27, 2008

How to Re-Create the "Unread Mail" Search Folder

Customer reported that they deleted the "Unread Mail" which is a search folder located under "Search Folders" by default. The following URL contains instructions on how to recreate:

http://office.microsoft.com/en-us/outlook/HA100389111033.aspx

Thursday, October 23, 2008

How to schedule a powershell script

How to Schedule a powershell script
Here is how you can schedule a Windows Powershell Script:
The first thing you need to do is make sure that Powershell is set to execute Powershell scripts,
instead of only allowing interactive commands to be run in the Powershell environment.

Type the following at the Powershell command prompt:

set-executionpolicy RemoteSigned

This will allow the system to run Powershell scripts that are created locally (Remote Powershell scripts that may be downloaded must be signed).
Once this is done, you can create your Powershell script using notepad. Just make sure you name the file with an extension of .ps1 .
Now to run the script outside of its Powershell environment you type a command similar to the following:

powershell -command "& script.ps1' "

Just put the above command into a .bat or .cmd file and schedule it like you would normally schedule a script to be run with Windows task scheduler.
Now you can enjoy the weekend!

Wednesday, October 22, 2008

Using Export-Mailbox Powershell Command

Import/Export-Mailbox powershell cmdlets have replaced Exmerge. Below are various ways to use export-mailbox command to export to PST file.
note: you will need these rights to perform these tasks
  • Exchange Server Administrators role and local Administrators group for the source server and the target server
  • Full access to the source and target mailboxes
1. export contacts folder from a user's mailbox
Export-Mailbox -Id obitest11 -IncludeFolders '\contacts' -PSTFolderPath C:\pstfiles\obitest11.pst
2. export sent items from a user's mailbox
Export-Mailbox -Id obitest11 -IncludeFolders '\sent items' -PSTFolderPath C:\pstfiles\obitest11.pst
3. Export data received between june 14th, 2007 through 6/14/2008
Export-Mailbox -Id obitest11 -StartDate "06/14/07" -EndDate "06/14/08" -PSTFolderPath C:\PSTFiles\obitest11.pst
4. To use filters to specify which items in the source mailbox to include in the export, run the following command:
Export-Mailbox -Identity obitest11 -TargetMailbox ExportMailbox -TargetFolder MyData -ContentKeywords "merger" -AttachmentFilenames "*orgchart*" -StartDate "03/01/2006 12:01:00" -RecipientKeywords tony@domain.edu
5. Use this export-mailbox command to archive deleted items to pst and delete the "deleted items folder" contents on server mailbox
Export-Mailbox -Id obitest11 -IncludeFolders '\deleted items' -PSTFolderPath C:\pstfiles\obitest11.pst -DeleteContent
6. Export entire mailbox to PST file
Export-Mailbox -id obitest11 -PSTFolderPath C:\pstfiles\obitest11.pst
7. Import entire mailbox to PST file
Import-Mailbox -id obitest11 -PSTFolderPath C:\pstfiles\obitest11.pst 

Outlook 2007 Command Line switches

Command-line switches for Microsoft Office Outlook 2007
Microsoft Windows XP or Microsoft Windows Server 2003
§ Click the Windows Start button, and then click Run.
In the Run dialog box, type a quotation mark, enter the full path for the outlook.exe file, and then type another quotation mark. Alternatively, click Browse to locate and select the file. In this case, the quotation marks are supplied automatically.
After the closing quotation mark, type a space, and then type the switch. For example, you might type:
"c:\program files\microsoft office\office12\outlook.exe" /nopreview

  • Available switches
    Switch
    Description
    /a
    Creates an item with the specified file as an attachment.
    Example:
    * "c:\program files\microsoft office\office12\outlook.exe" /a "c:\my documents\labels.doc"
    If no item type is specified, IPM.Note is assumed. Cannot be used with message classes that are not based on Outlook.
    /altvba otmfilename
    Opens the VBA program specified in otmfilename, rather than %appdata%\microsoft\outlook\vbaproject.otm.
    /c messageclass
    Creates a new item of the specified message class (Outlook forms or any other valid MAPI form).
    Examples:
    * /c ipm.activity creates a Journal entry
    * /c ipm.appointment creates an appointment
    * /c ipm.contact creates a contact
    * /c ipm.note creates an e-mail message
    * /c ipm.stickynote creates a note
    * /c ipm.task creates a task
    /checkclient
    Prompts for the default manager of e-mail, news, and contacts.
    /cleancategories
    Deletes any custom category names that you have created. Restores categories to the default names.
    /cleanclientrules
    Starts Outlook and deletes client-based rules.
    /cleandmrecords
    Deletes the logging records saved when a manager or a delegate declines a meeting.
    /cleanfinders
    Resets all Search Folders in the Microsoft Exchange mailbox for only the first profile opened.
    /cleanfreebusy
    Clears and regenerates free/busy information. This switch can be used only when you are able to connect to the server running Exchange.
    /cleanprofile
    Removes invalid profile keys and re-creates default registry keys where applicable.
    /cleanreminders
    Clears and regenerates reminders.
    /cleanroamedprefs
    All previous roamed preferences are deleted and copied again from the local settings on the computer where this switch is used. This includes the roaming settings for reminders, free/busy grid, working hours, calendar publishing, and RSS rules.
    /cleanrules
    Starts Outlook and deletes client-based and server-based rules.
    /cleanserverrules
    Starts Outlook and deletes server-based rules.
    /cleansharing
    Removes all RSS, Internet Calendar, and SharePoint subscriptions from Account Settings, but leaves all the previously downloaded content on your computer. This is useful if you are unable to delete one of these subscriptions within Office Outlook 2007.
    /cleansniff
    Overrides the programmatic lockout that determines which of your computers (when running Outlook simultaneously) processes meeting items. The lockout process helps prevent duplicate reminder messages. This switch clears the lockout on the computer it is used, enabling Outlook to process meeting items.
    /cleansubscriptions
    Deletes the subscription messages and properties for subscription features.
    /cleanviews
    Restores default views. All custom views that you created are lost.
    /embedding
    Used without command-line parameters for standard OLE co-create.
    /f msgfilename
    Opens the specified message file (.msg) or Microsoft Office saved search (.oss).
    /finder
    Opens the Advanced Find dialog box.
    /firstrun
    Starts Outlook as if it were run for the first time.
    /hol holfilename
    Opens the specified .hol file.
    /ical icsfilename
    Opens the specified .ics file.
    /importprf prffilename
    Starts Outlook and opens/imports the defined MAPI profile (*.prf). If Outlook is already open, queues the profile to be imported on the next clean start.
    /launchtraininghelp assetid
    Opens a Help window with the Help topic specified in assetid displayed.
    /m emailname
    Provides a way for the user to add an e-mail name to the item. Only works in conjunction with the /c command-line parameter.
    Example:
    * Outlook.exe /c ipm.note /m emailname
    /nocustomize
    Starts Outlook without loading outcmd.dat (customized toolbars).
    /noextensions
    Starts Outlook with extensions turned off, but listed in the Add-In Manager.
    /nopreview
    Starts Outlook with the Reading Pane off.
    /p msgfilename
    Prints the specified message (.msg).
    /profile profilename
    Loads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks (" ").
    /profiles
    Opens the Choose Profile dialog box regardless of the Options setting on the Tools menu.
    /recycle
    Starts Outlook by using an existing Outlook window, if one exists. Used in combination with /explorer or /folder.
    /remigratecategories
    Starts Outlook and and initiates the following commands on the default mailbox:
    * Upgrades colored For Follow Up flags to Office Outlook 2007 color categories.
    * Upgrades calendar labels to Office Outlook 2007 color categories.
    * Adds all categories used on non-mail items into the Master Category List.
    Note This is the same command as Upgrade to Color Categories in each Outlook mailbox properties dialog box.
    /resetfolders
    Restores missing folders at the default delivery location.
    /resetfoldernames
    Resets default folder names (such as Inbox or Sent Items) to default names in the current Office user interface language.
    For example, if you first connect to your mailbox in Outlook by using a Russian user interface, the Russian default folder names cannot be renamed. To change the default folder names to another language, such as Japanese or English, you can use this switch to reset the default folder names after you change the user interface language or install a different language version of Outlook.
    /resetformregions
    Empties the form regions cache and reloads the form region definitions from the Windows registry.
    /resetnavpane
    Clears and regenerates the Navigation Pane for the current profile.
    /resetsearchcriteria
    Resets all Instant Search criteria so that the default set of criteria is shown in each module.
    /resetsharedfolders
    Removes all shared folders from the Navigation Pane.
    /resettodobar
    Clears and regenerates the To-Do Bar task list for the current profile. The To-Do Bar search folder is deleted and re-created.
    /rpcdiag
    Opens Outlook and displays the remote procedure call (RPC) connection status dialog box.
    /safe
    Starts Outlook without Microsoft Exchange Client Extensions (ECE), the Reading Pane, or toolbar customizations. Component Object Model (COM) add-ins are turned off.
    /safe:1
    Starts Outlook with the Reading Pane off.
    /safe:3
    Starts Outlook with Microsoft Exchange Client Extensions (ECE) turned off, but listed in the Add-In Manager. Component Object Model (COM) add-ins are turned off.
    /safe:4
    Starts Outlook without loading outcmd.dat (customized toolbars).
    /select foldername
    Starts Outlook and opens the specified folder in a new window. For example, to open Outlook and display the default calendar, use: "c:\program files\microsoft office\office12\outlook.exe" /select outlook:calendar.
    /share feed://URL/filename
    /share stssync://URL
    /share web://URL/filename
    Specifies a sharing URL to connect to Outlook. For example, use stssync://URL to connect a Microsoft Windows SharePoint Services 3.0 list to Outlook.
    /sniff
    Starts Outlook, forces a detection of new meeting requests in the Inbox, and then adds them to the calendar.
    /t oftfilename
    Opens the specified .oft file.
    /v vcffilename
    Opens the specified .vcf file.
    /vcal vcsfilename
    Opens the specified .vcs file.
    /x xnkfilename
    Opens the specified .xnk file.

Tuesday, October 21, 2008

installing application on win2008 using runas

please follow instructions in the article to add runas functionality using seperate credential from administrator

How to add/remove members to Distribution list using Outlook 2007

How to add/remove members to Distribution list using Outlook 2007.

Note that you will need to be assigned ownership to the DL by a server admin before you can do this.

In an open email window, type the distribution list

1. if the distribution list does not immediately become underlined, click the check names button. The DL will become underlined and will have a plus symbol in front of it. At this point, don' click on the plus symbol
(Alternatively, you can look up the DL by typing the name in the address book)
2. Right click on the DL, and click on Outlook properties
3. Click on Modify members
4. Click Add or Remove (as the case may be)
5. Click Ok, OK and you 're done

How to Delegate Management of Distribution Group Membership to a User

To use the Exchange Management Shell to delegate management of distribution group membership to a user 

Run the following command:

Add-ADPermission -Identity <name of distribution group> -User <name of user> -AccessRights WriteProperty -Properties "Member" 

For example, to grant Demetria the right to add members to the Enteprise Web Services Department distribution group, run the following command:

Add-ADPermission -Identity "Enterprise Web Services" -User "Demetria" -AccessRights WriteProperty -Properties "Member" 

Friday, October 17, 2008

Good article on Exchange 2007 mail-enabled universal security group

Interesting reading!

Address list service error on exchange 2007 server

Occasionally you may get this error:

"Address list service on server not running"

This error can prevent you from moving mailboxes.

To resolve, restart the system attendant services. On a CCR cluster, moving the cluster to another node can fix this as well

How to Assign a mail enabled security group review permission on a room mailbox calendar

To add a mail enabled universal security group to a room mailbox calendar, so that they can review calendar, please follow these steps

1. Create the room mailbox. Note that room mailbox user account is disabled by default
2. Assign full access to the room using the security group
3. Have the manager(who is a member of the security group) login into his/her mailbox and open the room mailbox as well. (see other blog post on how to open another mailbox within your profile)
4 Open the calendar(belonging to room mailbox) and assign reviewer permission to the group
You are done. Now every member of that group can go to file, open other users folder, choose calendar and they can search for the room

Thursday, October 16, 2008

Set Explicit permissions to a mailbox you want to access from OWA 2007

How to set Explicit permissions to a mailbox you want to access from OWA 2007

Notes from troubleshooting
To open a user's mailbox from OWA, you must have explicit full mailbox access granted by the administrator.

This explicit access must be granted by powershell.

If a user can't access a user's mailbox via owa 2007, you may follow these steps to troubleshoot and resolve the issue

step 1
for eg Get-MailboxPermission -identity "pbrown51" will tell you current permissions set for pbrown51
Access rights must be {FullAccess} and isInherited must be false. If this is not the case, you
must use this command to apply explicit fullaccess to the mailbox:

step 2
Add-MailboxPermission -identity "pbrown51" -User "ondubui1" -AccessRights "FullAccess"

Wednesday, October 15, 2008

How to download address book changes only

How to download address book changes only

Download address book changes only

  1. Click on Tools, send-receive, download address book.
  2. Check download changes since last send/receive
  3. Under information to download, choose full details. (you may also choose no details for faster download)
  4. choose \Global Address List as the address book
  5. Click ok

How to Download Full Address Book for Outlook Cache Mode Users

How to Download Full Address Book for Outlook Cache Mode Users

If Outlook is left running constantly in Cached Exchange Mode, it updates the Offline Address Book automatically about once a day, depending on Address Book updates on the server running Exchange.

To initiate Full Update manually, do the following:
  1. On the Tools menu, point to Send/Receive, and then click Download Address Book.
2. uncheck Download changes since last send/receive
3. Under information to dowload, check full details
4. Choose \Global Address List under address book

Click Ok and wait for few minutes to complete download

Saturday, October 11, 2008

Assign send-as permission to a user

Assign send-as permission to a user

Add-ADPermission epp-employees -User:'Help Desk Permissions Group' -ExtendedRights:Send-As -AccessRights:ReadProperty, WriteProperty -Properties:'Personal Information'

Give user rights to delegate with powershell

Give user rights to delegate with powershell
For example:
Add-ADPermission epp-employees -user htaylor10 -AccessRi
ghts:readproperty, writeproperty -properties:'personal information'

Wednesday, October 8, 2008

How to configure outlook 2003(w sp2)cached mode customers to use OAB online

For Outlook 2007 customers this doesn't need to be applied. For 2003 customers(with sp2 or 3) who refuse to use outlook 2007 for whatever reason, but have their mailbox homed on Exchange 2007, you can apply this registry setting to force Outlook to use online Global Address List when they use Cached Exchange Mode:

Outlook 2003

HKEY_Current_user\Software\Microsoft\Office\11.0\Outlook\Cached Mode

Parameter: DownloadOAB
Type:REG_DWORD
Value: 0

Close outlook and restart Outlook.

THis has been tested and it works great

customer needs to run premium version of OWA. Its currently set to basic

customer needs to run premium version of OWA. Customer checked basic upon initial launch of OWA.
To force owa to default back to premium, use the powershell command below to fix:
Set-CASMailbox -id jlederm2 -OWAPremiumclientenabled $true

Tuesday, October 7, 2008

Where Outlook files are located

Where Outlook hides its Files
First unhide hidden files:
To see hidden files, to turn on file extensions, select the Tools menu from any Explorer window Explorer, not Internet Explorer). Under the tools menu, select Folder options. Then, select the View tab from the folder options window, as shown in Figure B.
FIGURE B
Description
Extension
Location
Outlook data files
.pst
drive:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\Outlook
Offline Folders file
.ost
drive:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\Outlook
Personal Address Book
.pab
drive:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\Outlook
Offline Address Books
.oab
drive:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\Outlook
Command bar and menu customizations
.dat
drive:\Documents and Settings\<user>\Application Data\Microsoft\Outlook
Navigation Pane settings
(includes Shortcuts, Calendar, and Contact links)
.xml
drive:\Documents and Settings\<user>\Application Data\Microsoft\Outlook\Outlook.xml
Registered Microsoft Exchange extensions
.dat
drive:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\Outlook
Outlook contacts nicknames
.nk2
drive:\Documents and Settings\<user>\Application Data\Microsoft\Outlook
Rules
.rwz
drive:\Documents and Settings\<user>\Application Data\Microsoft\Outlook
Print styles
Outlprnt with no extension
drive:\Documents and Settings\<user>\Application Data\Microsoft\Outlook
Signatures
.rtf, .txt, .htm
drive:\Documents and Settings\<user>\Application Data\Microsoft\Signatures
Stationary
.htm
drive:\Documents and Settings\<user>\Application Data\Microsoft\Stationary
Custom forms
drive:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\Forms
Dictionary
.dic
drive:\Documents and Settings\<user>\Application Data\Microsoft\Proof
Templates
.oft
drive:\Documents and Settings\<user>\Application Data\Microsoft\Templates
Send/Receive settings
.srs
drive:\Documents and Settings\<user>\Application Data\Microsoft\Outlook
Message
.msg, .htm, .rtf
drive:\Documents and Settings\<user>\My Documents