Archive

Posts Tagged ‘Powershell’

My presentation on Windows 2008 R2 High Availability

November 9th, 2009 Amit Gatenyo No comments

I know its a bit late, but here is the presentation I gave on November 3rd at the Microsoft convention – Let’s Talk Business-Tech that was held at Tel Aviv.

During the presentation, my co-presenter Ronen Gabay and myself talked about the new features of Failover Clustering in Windows 2008 R2.

We talked about Geo-Clusters, PowerShell 2.0 extensive support, Cluster Shared Volumes and mainly about how simple it is to create and manage complex cluster (everyone can do it! believe me! :) ).

We finished the presentation with a nice demo of RDS 7.0 media enhancement when we showed a 1080P HD movie (Terminators 2 Trailer) over RDP 7.0 while doing a Live Migration of the RDS Session Host virtual server that we RDPed into.. very nice!

What do you think, will we start seeing more clusters from now on? or something is still missing?

I’ll love to get your input.

 

 

VN:F [1.9.3_1094]
VN:F [1.9.3_1094]

How-To: Exchange 2007 Managed Folder Policies

July 7th, 2009 Udi Leutashi No comments

In previous versions of Exchange a number of mailbox management settings where handled by the RUS (recipient update service). Exchange 2007 has changed the way the users mailboxes are managed and Microsoft has taken more time to work Email Life Cycle (ELC) into Exchange 2007.

In this article I am going to deploy some default folder management (inbox,deleted items, etc) and add some new custom folder management policies for my users.

As with most features with Exchange 2007 this can be deployed via EMS (command line) or EMC (GUI). I will attempt to move back and forth between these methods to show their capabilities.

Default folder management

Lets launch EMC—> Organizational config –>Mailbox

Here we can see a number of tabs and I am going to focus on the default folder management tab. After selecting the tab we can see default Outlook folders items such as inbox, deleted items, etc…

Lets create a policy for one of my favorite areas to manage, deleted items. Over the years I have found that users use their deleted items folder as almost an archive for their mailbox, I never understood this but hey :P

Let create a new managed content settings for deleted items.

1. Select Deleted Items
2.right click the screen and select new managed content settings

There are a number of options to set on the first page,
– Message Type , Retention period date,action, and length of retention

Message Type allows us to define what type of content we want this policy to apply to, since we are dealing with deleted items I want to set to All Mailbox Content.

The Action lets of define what we want to do and for this policy I want to delete and allow recovery

Retention period start tells the policy what is should base its information on, either date the item was moved to a folder or the date the item was received/created

Here we can see the first page completed

The next page allows us to journal a copy of the content to a specified location

The next page provides us with the settings that we have chosen

The completion page show the powershell command used to create the new management settings

At this point all we have done is create the management settings, by its self this does nothing but create a template for us to use in a policy.

Managed Folder Policy
The policy will use the new created management settings that we have created.

1. Select the Managed Folder Policy tab
2. Right click the screen and select New Managed Folder Mailbox Policy

The first page of wizard allows us to specify a name for the policy and then add a component to manage.

After selecting the Add button we see a list of items that we can manage. Note not all of them have managed content setting created at this time but the policy will allow you to add the anyway.

After selecting deleted items we are brought back to the original screen –> New

The completion page show the powershell commands used to create the policy –> finish

Now that we have 1. created managed content settings and 2. created a managed folder mailbox policy we have 2 more steps before our policy becomes functional.

By default the mailbox management assist is set to never run, we need to enable this and set a schedule for the process to run and enforce our policy.

From EMC — Server –Mailbox right click on the mailbox server and select properties

Select the Messaging Records Management tab and you will see the default of never run

Select Customize and choose the appropriate hours for the process to run

After we have created a schedule for the mailbox assistant to run the last remaining step is to associate the policy with user mailbox.

For large amounts of users utilizing powershell would be the preferred way to deploy this, however since I am going to set this for 1 user I am going to use EMC.

In EMC select Recipient Configuration –> Mailbox
double click the mailbox and select Mailbox Settings

Select Messaging Records Management then click properties

check the Managed Folder Mailbox Policy and browse to the correct policy for the user

In order to apply policy to all users mailbox use:

Get-Mailbox -ResultSize unlimited | Set-Mailbox -ManagedFolderMailboxPolicy “Purge Deleted Items”

In order to apply policy to members of a OU use:

Get-User -OrganizationalUnit “OU1″ | Set-Mailbox -ManagedFolderMailboxPolicy “Purge Deleted Items”

In order to apply policy to members of a distribution list use:

get-distrobutiongroupmember group1 | Set-Mailbox -ManagedFolderMailboxPolicy “Purge Deleted Items”

We have now completed the last step and our policy will take affect the next time the mailbox assistant runs.

We can use powershell to force an update if we want to apply the policy immediately(very useful for testing):
Start-ManagedFolderAssistant -identity mailboxservername

(Based on: http://www.exchange-genie.com/2007/11/managed-folder-policies/)

VN:F [1.9.3_1094]
VN:F [1.9.3_1094]

Setting language and time zone settings in Exchange 2007

July 1st, 2009 Udi Leutashi No comments

By default when a new mailbox access the OWA after the first logon the following screen appears, and we should choose the language and time zone settings:

How can we remove this screen? It’s easy just set up the DefaultClientLanguage parameter in the OWA virtual directory, using the following cmdlet: 

Set-OwaVirtualDirectory -identity “Owa (Default Web Site)” -DefaultClientLanguagage <language code>

Now, all the first logon will be using the language that we choose in the language code, here are some language codes:

  • English (Canada) : 4105

  • Portuguese (Brazil): 1046

  • French(Canada): 3084

  • Hebrew(Israel): 1037

Note: When you change the language code, this value is not filled out in the user attribute, when you return the value to 0, all the users that haven’t chosen yet the value will receive the option to choose. To rollback the settings to the normal behavior(user get to choose), just set up the language code with the 0 value.

More useful commands:

  1. List the DefaultClientLanguage of determined server:
    Get-OwaVirtualDirectory | Sect Name,DefaultClientLanguage

  2. Run the following command to set the logon and error language setting:
    Set-OwaVirtualDirectory -identity “Owa (Default Web Site)” -LogonAndErrorLanguage <language code>

  3. Run the following command to set the client languages setting for an individual mailbox:
    Set-Mailbox -identity <mailbox identity> -languages <language code>

  4. Validating the Language value in the mailboxes
    Get-Mailbox | Select Name,Languages

(Taken from: Anderson Patricio Blog-http://msmvps.com/blogs/andersonpatricio/archive/2007/06/06/changing-the-language-of-the-owa-logon-page.aspx

And from Technet- http://technet.microsoft.com/en-us/library/aa997435.aspx)

VN:F [1.9.3_1094]
VN:F [1.9.3_1094]

.