NSD1181 NEExchange2007Tool – PowerShell application wrapper
Fact
-
Nordic Edge Automatic Account Manager 3
-
Microsoft Exchange server 2007 or Microsoft Exchange server 2010
-
NEExchange2010Tool.exe
Situation
It is not possible to run Windows PowerShell cmdlets from within AAM. This is because AAM can't interpret the output from PowerShell.
Solution
Nordic Edge has developed an application wrapper called NEExchange2010Tool.exe. With this tool PowerShell commands can be executed with their original syntax from within AAM.
Prerequsites
Microsoft .NET Framework 3.5 or higher
Microsoft Exchange Server 2007 Management Tools
Examples:
Below are two different examples on how the NEExchange2010Tool.exe can be used to create PowerShell
commands to interact with Exchange server 2007.
1. The first example shows how to create a mailbox for an existing user in Active Directory. To do this use the cmdlet "Enable-Mailbox"
-
Start AAMStudio.
-
Go to the action called "Launch Application" (setter).
-
In the "Launch command" label enter the command with the following syntax:
<search path> NEExchange2007Tool.exe Enable-Mailbox -Identity <UserIdParameter> -Database "<DatabaseIdParameter>"
Parameters for the cmdlet "Enable-mailbox":
-Identity
Can be set with one of following values:
-
GUID
-
Distinguished name (DN)
-
DomainAccount
-
User principal name (UPN)
-Database
Can be set with one of following values:
-
GUID of the database
-
Database name
-
Server name\database name
-
Server name\storage group\database name
Example:
This example creates a user with samaccountname "jsmith" with a domain called "NEDemoAD", an Exchange 2007 server called "NEDemoEx2k7" and storage group and database called "First Storage Group" and "Mailbox Database".
C:\NEExchange2007Tool.exe Enable-Mailbox -Identity NEDemoAD\jsmith -Database "NEDemoEx2k7\First
Storage Group\Mailbox Database"
2. The second exampel is how to create a dynamic distribution group.
-
Start AAMStudio.
-
Go to the action called "Launch Application" (setter).
-
In the "Launch command" label enter the command with the following syntax:
<search path>\NEExchange2007Tool.exe new-DynamicDistributionGroup -Name <name of the group>-Alias <SMTP-alias> -IncludedRecipients <String> -ConditionalCompany "<your company>" -OrganizationalUnit "<the canonical name to where the group should be created>" -RecipientContainer "<the canonical name to where the users reside>"
Can be set with one of following values:
-
AllRecipients
-
MailboxUsers
-
Resources
-
Mailcontacts
-
MailGroups
-
Mail Users
-
None
The ConditionalCompany parameter filters the mailbox users or mail-enabled contacts that are used to build the dynamic distribution group.Multiple values of the ConditionalCompany parameter are separated by commas.
-OrganizationalUnit
The OrganizationalUnit parameter specifies where to create the dynamic distribution group in Active Directory by using canonical name syntax.
-RecipientContainer
The RecipientContainer parameter filters the recipients that are used to build the dynamic distribution group based on their location in Active Directory. The value of RecipientContainer can be the canonical name of an organizational unit (OU) or a domain.
Example:
This example creates a new dynamic distribution group that is named “Sales” in the Sales container in the Nedemo.local domain. The Sales dynamic distribution group contains all mailbox users or mail-enabled contacts found in the “Users” container in the NEDemoAD.local domain who have the attribute “department” containing the value "Sales".
C:\NEExchange2007Tool.exe new-DynamicDistributionGroup -Name "Sales" -IncludedRecipients AllRecipients -ConditionalDepartment "Sales" -OrganizationalUnit NEDemoAD.local/Sales -RecipientContainer "NEDemoAD.local/Users"
For more information about the New-DynamicDistributionGroup cmdlet see:
http://technet.microsoft.com/en-us/library/bb125127.aspx
For more information about all the other Exchange 2007 recipient cmdlets see:
http://technet.microsoft.com/en-us/library/bb124233.aspx
Attachements:
NEExchange2007Tool.exe
Disclaimer
The origin of this information may be internal or external to Nordic Edge™. Nordic Edge™ makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Nordic Edge™ makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.
Nordic Edge Support – www.nordicedge.se
