Archive for the 'Exchange 2007' Category



Something missing in Exchange 2007 console? PowerGUI has that!

I came across this great post by David Elfassy: Tasks that CANNOT be performed from the Exchange Management Console (via Frank’s comment on Wolfgang’s post) and thought: Hey, that’s what PowerGUI is for!

So I went through his list and made sure that (almost) everything is available out of the box within PowerGUI Exchange 2007 PowerPack. (The pack on the site is newer than the one which shipped in PowerGUI 1.0.8 so you need to download and import it into PowerGUI manually from here.)

Here’s the screenshot (click to enlarge) and below is the list of things which PowerGUI gives you UI to do when Exchange 2007 Management Console is not there yet.

PowerGUI Exchange 2007 PowerPack screenshot

Quoting from David with my comments inline:

Tasks that CANNOT be performed from the Exchange Management Console

I’ve been getting this question a lot! “What tasks CANNOT be performed from the Exchange Management Console?”

The following is the answer to this question. I’ve done a “best effort” to compile a complete list of these tasks. Feel free to comment here if you feel I should add information to this post or if there is incorrect information.

Tasks that MUST be performed from the Exchange Management Shell

Mailbox, Recipient and Public Folder Settings

· Get a list of all mailboxes, organized by size and number of items – Get-MailboxStatistics

[Dmitry] PowerGUI: Recipients / Mailboxes / Statistics

· Perform bulk management of multiple attributes for mailbox recipients – Get-mailbox | Set-Mailbox

[Dmitry] PowerGUI: Recipients / Mailboxes / Change Properties

· Bypass antispam filtering for a specific recipient(s) Set-Mailbox -AntispamBypassEnabled $true

[Dmitry] PowerGUI: Recipients / Mailboxes / Change Properties

· Get information about public folder sizes – Get-PublicFolderStatisics

[Dmitry] PowerGUI: Public Folders / Statistics

· Give permission to a user’s mailbox (to another user) – Add-MailboxPermission

[Dmitry] PowerGUI: Mailboxes / Add Mailbox Permissions

· Give permission to an entire database, to a user – Add-ADPermission

[Dmitry] PowerGUI: Servers / Mailbox Stores / Add Permissions

· All Public Folder management, for example:

[Dmitry] PowerGUI: Public Folders (then browse the tree)

o Create Public Folders (Can be done from Outlook)

[Dmitry] PowerGUI: Public Folders / New Folder

o Mail Enable Public Folders

[Dmitry] PowerGUI: Public Folders / Mail-Enable

o Enable Public Folder replication

[Dmitry] PowerGUI: Public Folders / Change Properties

o Suspend/Resume Public Folder replication

[Dmitry] PowerGUI: Public Folders / Suspend Replication (Resume Replication)

o Modify Public Folder Replication

[Dmitry] PowerGUI: Public Folders / Change Properties

o Set/Modify Public Folder Quota

[Dmitry] PowerGUI: Public Folders / Change Properties

· Extract specific content from a mailbox and copy it to an alternate location – Export-Mailbox

[Dmitry] PowerGUI: Mailboxes / Export Mailbox

· Configure a resource mailbox to automatically accept all meeting requests – Set-MailboxCalendarSettings

[Dmitry] PowerGUI: Mailboxes / Change Calendar Settings

· Create (and modify) a new Global Address List – New-GlobalAddressList

[Dmitry] PowerGUI: Address Lists / Global Address Lists / New Global Address List

Transport Settings

· Set a maximum message size for incoming or outgoing messages (org) – Set-TransportConfig

[Dmitry] PowerGUI: Transport / Configuration / Change Properties

· Disable Xexch50 for outbound ESMTP connections – Set-TransportConfig

[Dmitry] PowerGUI: Transport / Configuration / Change Properties

· Set a maximum message size for incoming or outgoing messages (conn) – Set-ReceiveConnector

[Dmitry] PowerGUI: Transport / Receive Connectors / Change Properties

· Add the Antispam tab to the Exchange Management Console – Set-TransportServer –AntispamAgentsEnabled $true

[Dmitry] PowerGUI: Transport / Transport Servers / Change Properties

· Set advanced SMTP connection settings such as Tarpit, connection timeouts, inactivity timeouts etc… – Set-ReceiveConnector

[Dmitry] PowerGUI: Transport / Receive Connectors / Change Properties

· Modify the properties of the Content Filtering agent to filter messages originating from authenticated servers INSIDE the organization – Set-ContentFilterConfig (useful if another server relays the message but does not perform filtering)

[Dmitry] PowerGUI: Transport / Content Filtering / Change Properties

· Add an exception to the Content Filtering agent to NOT perform any filtering for a specified SMTP Domain or Sender – Set-ContentFilterConfig –BypassSenderDomains / BypassSenders

[Dmitry] PowerGUI: Transport / Content Filtering / Change Properties

· Modify properties for the transport dumpster (Enable/disable – Max Size) – Set-TransportServer

[Dmitry] PowerGUI: Transport / Transport Servers / Change Properties

· Override AD Site link costs with Exchange Specific costs – Set-ADSiteLink

[Dmitry] PowerGUI: Transport / AD Site Links / Change Properties

· Design Exchange Hub Sites for message routing – Set-ADSite

[Dmitry] PowerGUI: Transport / AD Sites / Change Properties

· Force a manual start to the Edge Synchronization between the HT and the ET servers – Start-EdgeSynchronization

[Dmitry] PowerGUI: Transport / Transport Servers / Force Edge Synchronization

Client Access Settings

· Set connection time-outs for POP3/IMAP4 servers – Set-IMAPSettings / Set-POPSettings

[Dmitry] PowerGUI: Servers / Client Access Servers / Change POP /IMAP Settings

Following settings should be used with a Get-CASMailbox and piped to the Set-CASMailbox to be applied globally.

· Prevent previous versions of Outlook from connecting to Exchange – Set-CASMailbox –MAPIBlockOutlookVersions

[Dmitry] PowerGUI: Mailboxes / Change Client Access Settings

· Enable/disable POP3 or IMAP4 for a user – Set-CASMailbox

[Dmitry] PowerGUI: Mailboxes / Change Client Access Settings

· Disable selected features of OWA (Calendaring, Change Password button etc…) – Set-CASMailbox

[Dmitry] PowerGUI: Mailboxes / Change Client Access Settings

Other

· Specify a message class for Managed Content Settings (For message classes NOT available in the EMC, such as IPM.XYZ) – New-ManagedContentSettings

[Dmitry] PowerGUI: Content Management / Managed Content Settings / New

· Create a customized quota message to mailbox recipients – New-SystemMessage

[Dmitry] PowerGUI: Content Management / Custom System Messages / New Quota Message

· Create a customized Delivery Status Notification message – New-SystemMessage

[Dmitry] PowerGUI: Content Management / Custom System Messages / New DSN Error Message

· Enable/disable, modify the properties of Message Tracking – Set-MailboxServer

[Dmitry] PowerGUI: Servers / Mailbox Servers / Change Properties

· Specify the number of ‘unreplicated logs’ that a CCR node will allow, and still mount a database a failover – Set-MailboxServer –AutoDatabaseMountDial

[Dmitry] PowerGUI: Servers / Mailbox Servers / Change Properties

· Allow a database to be overwritten by a restore operation – Set-MailboxDatabase –AllowFileRestore

[Dmitry] PowerGUI: Servers / Mailbox Stores / Change Properties

· Configure domain controllers that should NOT be used by your Exchange server – Set-ExchangeServer –StaticExcludedDomainControllers

[Dmitry] PowerGUI: Servers / Change Server Properties

There are only 5 features missing at the moment so I will have to update the pack again later on:

· Upgrade address lists and email address policies from LDAP syntax (after a migration from 2003) to OPATH syntax – Set-EmailAddressList

· Reseed a LCR or CCR (Maybe SCR ?) database copy – Update-StorageGroupCopy

· Install or uninstall antispam agents on a Hub Transport server – (un)install-AntispamAgents

· Update the safe senders aggregation list - Update-SafeList

· Modify Public Folder Referrals

Basically they are the ones I could not find how to add right away and didn’t have time to add immediately. Comments/feedback/tips are welcome.

Tags: , , , , , ,

Are Exchange and AD cmdlets compatible?

This is one of the questions I get asked a lot: When and how would you use Exchange 2007 and AD cmdlets together?

The short answer is that the libraries are perfectly compatible and you can mix and match the cmdlets on one machine using the Exchange ones to manage Exchange-related objects/attributes and AD cmdlets for the rest.

For example, AD cmdlets don’t have all the mailbox data, but I can get this from Exchange cmdlets:

Get-QADUser DSotnikov | ForEach { Get-Mailbox $_.DN }

The opposite example would be when I need to reset a password for a mailbox owner – this is something I cannot do with Exchange cmdlets but can do with the QAD stuff:

Get-Mailbox DSotnikov | ForEach { Set-QADUser $_.Identity -UserPassword "M%NewP@ssw0rd" }

Note that instead of piping in the cmdlets directlyI am joining them with ForEach and using DN from AD, or Identity from Exchange to do the match.

System Requirements would be:

  1. Exchange 2007 management tools installed on the local computer (it does not have to be an Exchange server – just a computer with the Exchange 2007 Management Console).
  2. AD cmdlets (again, just the cmdlets installed locally – not necessarily on a DC.)
  3. Have both registered in the same PowerShell console. This can be done by running the following commands in the PowerShell prompt:

PS:\> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
PS:\> Add-PSSnapin Quest.ActiveRoles.ADManagement

You obviously need to run just one of them if you are using a PowerShell console shipping with either of the cmdlet libraries so you simply add the other library.

If you want more information about Exchange 2007 cmdlets I would highly recommend to subscribe to Evan Dodd’s blog at http://blogs.technet.com/evand (and if you are at a conference with him presenting – make sure you attend the session or chalk-talk – I saw him at this TechEd and he was great!)

Tags: , , , , ,

Good Exchange PowerShell blog

Just stumbled across a good Exchange PowerShell blog by Anderson Patricio (the author of the free PowerShell web tutorials).

Anderson has quite a few good references to various PowerShell resources. Most of them are Exchange-related but he does look into AD stuff and has a PowerGUI review:

Another RSS feed to add… 

Tags:

PowerShell & PowerGUI tutorial in Portuguese

I’ve just found this great PowerShell and PowerGUI step-by-step tutorial by Anderson Patricio and José Rodas: AP407 – Using PowerGUI for Windows PowerShell

The guys are taking you step-by-step (providing screenshots for all of them!) on:

  • Importing PowerPacks from the PowerGUI Library,
  • Connecting to the AD cmdlets library,
  • Using the native functionality to get mailbox statistics,
  • And then extending the UI to manage Exchange queues.

This is very cool and highly recommended!

Here’s the list of other tutorials they have on the site (“Learn Spanish Portuguese with Windows PowerShell!”):

AP400 – Introdução ao Monad

AP401 – Utilizando pipes no Monad

AP402 – Utilizando o registry no Monad

AP403 – Trabalhando com Serviços

AP404 – Trabalhando com o Event Viewer

AP405 – Windows PowerShell: Utilizando Transcript

AP406 – Windows PowerShell: Ordenando dados

AP407 – Usando o PowerGUI for Windows PowerShell

Tags: , , , , , , , ,

UPDATE: Just got a comment from Anderson saying that the demos were actually in Portuguese. I should learn the languages better I guess…

Revamped PowerGUI Library

We have revamped the PowerPack Library hosting dozens of useful PowerGUI extensions so it now lets you browse the categories rather than look through one big flat list.

One list was pretty handy in April when we were just starting but now with 27 packs already there and new one submitted by the community every few days search became the only way to find what you need.

So what we did was create a bunch of categories and put the existing packs in them. Here are the ones we have at the moment:

A lot of good stuff. All available for free and most of the packs posted by community members (with really few exceptions of packs by the PowerGUI team.)

Another good thing that I like about the packs is that they can actually show you how to use PowerShell to script against the systems.

For example, if you need to learn to manage SQL Server with PowerShell scripts you can download the SQL PowerPack, use it and at any time click the PowerShell Code tab to see/copy-paste the code you need.
If there’s something else we can do to make the site more convenient to use please comment here or in the site discussion forum.

Dmitry

Tags: , , , , , , , , , , , , , , , ,

PowerGUI 1.0.5 is out!

We have just released version 1.0.5 of PowerGUI. You can get it free from the PowerGUI community web site and no registration is required.

Most new features and fixes are listed on the roadmap page.

Some of them are minor improvements which will hopefully make everyone’s life easier: the Actions pane is open by default, most commands are duplicated on the toolbar, setup has the latest packs for network management, Exchange (with UI for certificate management!) and Operations Manager, etc.

We’ve made a few improvements in the architecture as well. The biggest is asynchronous work with PowerShell so PowerGUI no longer waits for all objects to be retrieved before it starts displaying you what it got.

We have also moved to a new setup which should have less issues than the Visual Studio one we used before (it might require you to uninstall 1.0.4 though – but will preserve all you settings during the upgrade anyway.)

One gotcha that I want to mention is that 1.0.5 checks whether PowerShell Community Extensions are installed and if it detects version 1.1 or earlier would not let you install PowerGUI. We had to do this due to the incompatibility issues the extensions had.

If you do use the extensions there’s a workaround to that check:

1. Comment out the extensions’ lines in the PowerShell profile which cause the issue:

lines 98 and 138 in your profile.ps1:

(line 98)
# Start-TabExpansion

(line 138)
# . '.\TabExpansion.ps1'

the ‘#’ prevents the line from executing when powershell/powergui starts up.

2. Download the PowerGUI 1.0.5 setup from PowerGUI.org and run the file from the command-line using the following command:

msiexec.exe /i PowerGUI.1.0.5.22.msi IGNOREPSCX=1

Thanks to Austin for locating the issue and suggesting the workaround! Austin, please redownload the setup and use the command above!

Tags: , , , , , , , , , ,

PowerShell Script for Mailbox Provisioning

Yesterday I posted a blogcast on PowerShell-based mailbox provisioning.

Below is the script which PowerGUI executes when you click that Create from CSV file action.

What I am doing in the script is basically:

1. Prompt for the file name (param).

2. Read into into an array.

3. Check whether columns with mandatory parameters are in the file.

4. And then just go column by column constructing the new-mailbox command for each row.

5. If Password column is not present I use UPN instead (you can change to your own rule).

6. Finally, I just call Invoke-Expression for all these generated commands.

Of course in PowerGUI all you need to do is just click a button, but for all PowerShell geeks out there here’s the code:

param($file)

[array]$csv = import-csv $file

# This script implies that columns "UserPrincipalName", "name",

# "database","OrganizationalUnit" exist in the csv file

if (($csv[0].UserPrincipalName -eq $null) -or ($csv[0].Name -eq $null) -or ($csv[0].Database -eq $null) -or ($csv[0].OrganizationalUnit -eq $null) ) {throw "Parameter missing... Make sure the CSV file has the following columns: UserPrincipalName, Name, Database, OrganizationalUnit."}

# Create collection of the commands that we will invoke in the end
[collections.arraylist]$Commands=new-object system.collections.arraylist

for($i=0; $i -lt $csv.Count; $i++)
{

[void]$Commands.Add("new-mailbox -UserPrincipalName `"$($csv[$i].UserPrincipalName)`" -Name `"$($csv[$i].Name)`" -Database `"$($csv[$i].Database)`" -OrganizationalUnit `"$($csv[$i].OrganizationalUnit)`"" + ' -Password $pwd ')
}

# Add other parameters if present in the CSV

if ($csv[0].Alias -ne $null) {
for($i=0; $i -lt $csv.Count; $i++)
{
  $Commands[$i] = $Commands[$i] + " -Alias `"$($csv[$i].Alias)`""
}
}

if ($csv[0].DisplayName -ne $null) {
for($i=0; $i -lt $csv.Count; $i++)
{
$Commands[$i] = $Commands[$i] + " -DisplayName `"$($csv[$i].DisplayName)`""
}
}


if ($csv[0].FirstName -ne $null) {
for($i=0; $i -lt $csv.Count; $i++)
{
$Commands[$i] = $Commands[$i] + " -FirstName `"$($csv[$i].FirstName)`""
}
}


if ($csv[0].LastName -ne $null) {
for($i=0; $i -lt $csv.Count; $i++)
{
$Commands[$i] = $Commands[$i] + " -LastName `"$($csv[$i].LastName)`""
}
}


if ($csv[0].Initials -ne $null) {
for($i=0; $i -lt $csv.Count; $i++)
{
$Commands[$i] = $Commands[$i] + " -Initials `"$($csv[$i].Initials)`""
}
}


if ($csv[0].SamAccountName -ne $null) {
for($i=0; $i -lt $csv.Count; $i++)
{
$Commands[$i] = $Commands[$i] + " -SamAccountName `"$($csv[$i].SamAccountName)`""
}
}


for($i=0; $i -lt $csv.Count; $i++)
{
$pwd = new-object Security.SecureString

if ($csv[0].Password -ne $null) {
$csv[$i].Password.ToCharArray() | foreach { $pwd.AppendChar($_) }
} else {
$csv[$i].UserPrincipalName.ToCharArray() | foreach { $pwd.AppendChar($_)
}

}

Invoke-Expression $Commands[$i]

Tags: , , , , ,


My Recent Tweets

RSS My company’s blog

  • Jelastic Released Commercially by innofield!
    Switzerland is well know for chocolate, their army knives and creating fabulous watches. Thanks to innofield,  the Swiss will forever be known as the providers of the first Swiss based PaaS solution with their Flow App Engine (powered by Jelastic). This week, innofield came out of beta and launched commercially with Jelastic 1.9.1. “As Platform-as-a-Service […]
  • Play 1 vs Play 2 Framework
    Today’s guest post comes to you from our friend and user, Dane Marcelo, JArchitect product manager. He points out some interesting differences between the Play 1 and the Play 2 frameworks. So, let’s dive into this great post! Play is an open source web application framework, written in Scala and Java, which follows the model–view–controller (MVC) architectur […]
  • Cloud Software Stacks Market Share: April 2013
    It’s that time where we can share with you the updated statistics on databases, Java and PHP application servers as well as Java and PHP version popularity. Last month was hot here at Jelastic: we launched Jelastic in the Netherlands with the most technically advanced hoster in the country – info.nl and in Switzerland with our very [...]The post Cloud Softwa […]
  • Jelastic Hosting Partner dogado Awarded Coveted Hosting Prize
    Every year the  Hosting & Service Providers Award, honors the most innovative and successful hosting and service offerings of the year. The award is presented in the following categories: Infrastructure Services Application Services Domain Services This year our hosting partner dogado in Germany was awarded the prize for the best application service usin […]
  • Deploying a Bitbucket Project via Maven with Jelastic
    As you know Jelastic Platform can build apps right in the cloud instead of building them locally and uploading WAR archives. This is much faster and takes less traffic. Packages can be huge and need to be re-uploaded every time you put some corrections into your code. Jelastic can take only your code changes from [...]The post Deploying a Bitbucket Project v […]
  • And The Winner Is…
    All we can say is WOW!  We had an incredible response from our Facebook Fans and Twitter followers! We received more than 30,000 entries!!!  Pretty impressive for our FIRST ever contest.  So thank you, to all of our friends for entering and continuing to support the BEST Java and PHP Platform known to man So [...]The post And The Winner Is… appeared first on […]
  • Android and Java Native Interface
    This article was originally posted by Infosec Institute Java Native Interface (JNI) JNI is a native programming interface supported by Java and is part of the Java SDK. With JNI, we can write code in other languages like C/C++ and use it in Java. We can also call C/C++ functions using Java code and vice [...]The post Android and Java Native Interface appeare […]

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my former employer - Quest Software, or my current employer - Jelastic or anyone else for that matter. All trademarks acknowledged.

© 2007-2013 Dmitry Sotnikov

Pages

May 2013
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Follow

Get every new post delivered to your Inbox.

Join 65 other followers

%d bloggers like this: