Please take a moment to read http://bit.ly/demandglobalchange, to help share the message and support the initiative to tell our leaders to focus on addressing the global world problems, instead of complaining about the effects of their lack of leadership. Be a leader yourself, and share this with as many people as possible. #demandglobalchange // https://www.facebook.com/demandglobalchange



Please consider donating: https://www.corelan.be/index.php/donate/


10,546 views

Exchange 2007 Administration : Users, Groups and Mailboxes

Creating mailboxes for existing AD users

Basic command : enable-mailbox –identity “Username (UPN)” -database “SERVER\Mailbox Database” -alias “alias” -ExternalEmailAddress email@adres.com
If you want to create a mailbox for all users in a specific OU, use this command (Example : Sales OU , which sits under the Departments OU, in the domain.com domain) :
get-user | where-object {$_.distinguishedname –like “*ou=Sales,ou=Departments,dc=domain,dc=com”} | enable-mailbox -database “SERVER\Mailbox Database”

Bulk-creating new AD users and mailboxes

You can create AD users and mailboxes based upon an (comma separated) input file, containing the user name and other optional parameters. The following script will use a text file containing firstname, lastname and password (in csv format). The first line of the text file contains the header – the field names (which can be used in the script as objects). The script assumes that you’ve used the following field names : FirstName, LastName, Password, OU
Create a ps1 file called createusers.ps1, with the following content : (change db and upndom parameters to reflect your environment)

$db="SERVER\Mailbox Database"
$upndom="mydomain.com"
$users=import-csv $args[0]

function SecurePassword([string]$plainPassword)
{
$secPassword=new-object System.Security.SecureString
Foreach($char in $plainPassword.ToCharArray())
{
$secPassword.AppendChar($char)
}
$secpassword
}

foreach ($i in $users)
{ 

$sp = SecurePassword $i.password
$upn = $i.Firstname + "@" + $upndom
$display = $i.FirstName + " " + $i.LastName
New-Mailbox –Password $sp –Database $db -UserPrincipalName $upn –Name $i.FirstName 

   –FirstName $i.FirstName –LastName $i.LastName –OrganizationalUnit $i.OU 

}

Since the script uses the FirstName as upn, you need to make sure it is unique.

The input file (users.csv) looks like this : (change to reflect your own environment)

FirstName,LastName,Password,OU,Department

Test1,User2,PWtAstuZer2,mydomain.com/Departments/Sales,Sales

Test1,User3,PWtAstuZer3,mydomain.com/Departments/Marketing,Marketing

 

Test1,User1,PWtAstuZer1,mydomain.com/Departments/Sales,Sales

Run the script and feed the input file to the script : CreateUsers.ps1 users.csv

Of course, you can modify the script and add more commands to apply additional parameters to the newly created mailbox, such as :

set-mailbox -id $upn -PrimarySmtpAddress $upn –ProhibitSendQuota 150MB 

   –IssueWarningQuota 120MB –ProhibitSendReceiveQuota unlimited 

   -domaincontroller firstdc.mydomain.com

set-user -id $upn -Company "My Company" -Department $i.Department 

   -domaincontroller firstdc.mydomain.com

Add-MailboxPermission -Identity $upn -AccessRights FullAccess 

   -User "Peter Van Eeckhoutte" -domaincontroller firstdc.mydomain.com

Add-ADPermission -Identity $i.FirstName 

   -User "Peter Van Eeckhoutte" -ExtendedRights Receive-As -domaincontroller firstdc.mydomain.com

(I added the -domaincontroller switch to indicate that for example the Add-ADPermission cmdlet might use another DC than the one used to create the AD object. So the AD object needs to be present on the DC where you want to modify the ACL, which means that you should try to connect to the same DC on every command. From that perspective, you’ll need to add the -domaincontroller firstdc.mydomain.com (fqdn) switch to the New-Mailbox command as well.) Additionally, you can insert a “start-sleep 5” command between the creation of the AD object and the modification of the object to be sure the object is created before you attempt to change it.

In case you were wondering : you can delete the user and mailbox again using the following command (based upon the 3 Test User accounts) : Get-Mailbox | where {$_.Name -ilike “Test[123]”} | | remove-mailbox

How to mail-enable AD objects (groups and users)

You can mail-enable an existing universal group by using the Enable-DistributionGroup cmdlet : Enable-DistributionGroup –id “domain\group” -Alias “GroupAlias”

Before you can use contacts in universal groups, those contacts must be mail-enabled.

Mail-enabling a contact can be done via Enable-MailContact cmdlet : Enable-MailContact –id “domain\contact” –ExternalEmailAddress user@domain.com –Alias “ContactAlias

You can create and enable a mailbox for a regular user using Enable-Mailbox : Enable-Mailbox -id “domain\user” -Database “Mailbox Database. You can set additionally parameters by using the Set-Mailbox cmdlet : Set-Mailbox -id “user” Some possible/available options are :

-EmailAddresses “the.user@domain.com”,”user.lastname@domain.com”

-PrimarySMTPAddress “user@domain.com”

-ForwardingAddress “otheruser@domain.com”

-ProhibitSendQuota 100MB

-ProhibitReceiveQuota 120MB

-ProhibitSendReceiveQuota unlimited

-GrantSendOnBehalfTo “user”

-WindowsEmailAddress user@domain.com

Disabling and reconnecting mailboxes

If you want to disable a mailbox, without removing the AD user, you should use the Disable-Mailbox cmdlet : Disable-Mailbox -id “user”. This command will prompt you to enter “Y” if you are sure to disable, so if you are running this from a script, use the -force parameter to avoid the prompt. Since the server has a mailbox retention period, you can still recover the mailbox and assign it to someone else, if required. Open the gui and go to “Disconnected Mailbox”. You should see the disabled mailbox in the list. Right-click, choose “connect”, specify the type of mailbox (User, Room, Equipment, Linked) and select the AD user account. (http://technet.microsoft.com/en-us/library/aa995968.aspx) Alternatively, you can reconnect a mailbox using the Connect-Mailbox cmdlet. To get the list of disconnected mailboxes, use Get-MailboxStatistics -Server | where { $_.DisconnectDate -ne $null } | select DisplayName,DisconnectDate,Identity When you have the identity string, you can use Connect-Mailbox :

Example : Connect-Mailbox -Identity ‘15151e0a-cbee-4430-910c-edbf59cc2301’ -Database ‘apollo.corelan.be\First Storage Group\Mailbox Database’ -User ‘corelan\Administrator’ -Alias ‘Administrator’

As soon as AD replication has finished, the change will be applied (the mailbox will be connected again). If you need the change to replicate immediately, run “repadmin /syncall /force” on a DC (http://support.microsoft.com/kb/232072)

If you want to remove the AD user and the mailbox, you should use the “remove-mailbox” cmdlet (or choose ‘remove’ when right-clicking the recipient object in the GUI)

Mailbox database and mailboxes

If you want to get the list of mailbox databases on your servers : Get-MailboxDatabase. If you want to see the mailbox databases from a specific server :

Get-MailBoxDatabase | where {$_.Server –eq “SERVERNAME”}
If you want the list of user accounts with a mailbox, run get-user | where {$_.RecipientType -eq “UserMailBox”}

List of mailboxes :

get-mailbox | FL

Mailbox sizes :

get-MailboxStatistics –server “SERVERNAME” | format-table DisplayName, TotalItemSize, Database, DatabaseName

Other interesting fields that are contained in the result set of this cmdlet are :

StorageLimitStatus

LastLoggedOnUserAccount

LastLogonTime

LastLogoffTime

ItemCount

If you want to see the size of the folders inside a mailbox, use the get-mailboxfolderstatistics cmdlet : Example : get-mailboxfolderstatistics -id “Peter Van Eeckhoutte”| FL Folderpath,FolderSize. If you want to see the size of the Inbox folder only (or any other folder), use a “where” filter such as : get-mailboxfolderstatistics -id “Peter Van Eeckhoutte”| where {$_.Name –eq “Inbox”) | FL Folderpath,FolderSize

I have found the following script at http://knicksmith.blogspot.com/2007_06_01_archive.html

First, set the target (enter a mailbox username when prompted) :

$alias = $(read-host alias)

Next, run the statistics :

Get-MailboxFolderStatistics $alias | FT FolderPath,ItemsInFolder,@{label="FolderSize (KB)";

   expression={$_.FolderSize.ToKB()} }

Get-MailboxStatistics $alias | FT ItemCount,StorageLimitStatus,@{label="TotalItemSize (KB)";

  expression={$_.TotalItemSize.Value.ToKB()} },@{label="TotalItemSize (MB)";

  expression={$_.TotalItemSize.Value.ToMB()} },LastLogonTime

The script requires one parameter : the mailbox user name.

You can modify the script to show a list of top 10 mailboxes (size in MB, sort by size descending):

Get-Mailbox | Get-MailboxStatistics | sort-object -descending TotalItemSize | 

   Select-Object -first 10| FT DisplayName,@{label="TotalItemSize (MB)";

   expression={$_.TotalItemSize.Value.ToMB()}}

If you want to see all mailboxes that are larger than 100MB, use

Get-Mailbox | Get-MailboxStatistics | where {$_.TotalItemSize –gt 100000000} | sort-object 

  -descending TotalItemSize | FT DisplayName,@{label="TotalItemSize (MB)";

   expression={$_.TotalItemSize.Value.ToMB()}}
 

See if you can access a database or mailbox over MAPI, test mail flow

You can use the Test-MAPIConnectivity cmdlet to test connectivity to either a database or mailbox :

Test-MAPIConnectivity (will connect to all of the databases)

Test-MAPIConnectivity “Peter Van Eeckhoutte” (will connect to that user’s mailbox)

This cmdlet will show latency and error level as wel.

If you want to test message latency, you can run a mail test by using the Test-MailFlow cmdlet. By default, without parameters, it will connect to the local server. If you want to use additional test parameters, you can use the following command : Test-MailFlow ThisServer –TargetMailboxServer TargetServer (only works between Exchange 2007 servers). You can also use the same cmdlet to test mailflow to an email address by using the –TargetEmailAddress parameter

Using AD groups and creating dynamic groups

You can use existing AD security groups as Exchange distribution lists by mail-enabling a group. This allows you to keep management of the group in AD and use the updated group as distribution list at the same time. The only requirement is that you use Universal groups. Since you can use Universal groups for setting permissions, it is advised to use Universal groups and add users and/or Global/Local groups to the Universal group. The enable-DistributionGroup cmdlet allows you to mail-enable that group : enable-DistributionGroup -id “AD Group” -DisplayName “Your Group” –Alias “Alias” and Set-DistributionGroup –id “Your Group” –PrimarySmtpAddress group@domain.com to further configure the group.

If you don’t have the proper groups set up, or want to select members of a distribution list based on specific AD attributes as opposed to using an existing group, you can create a dynamic group. This basically allows you to create a group that will dynamically populate the members based upon certain criteria. Once the group is created, its contents are kept up to date automatically. You just need to make sure to keep the AD object attributes updated. Suppose you have properly filled out the “Department” field in AD, and you want to create a distribution group for all people in the Marketing department that will stay up to date, and store the group under the “Mailgroups” OU, you can use the following command : New-DynamicDistributionGroup -Name “Marketing Users” -ConditionalDepartment “Marketing” –OrganizationalUnit “domain.com/Mailgroups” -IncludedRecipients AllRecipients If you want to create a Dynamic DistributionGroup based on OU membership, you’ll have to use Powershell (because you cannot select that option via the GUI). Suppose you want to put all users from the Sales OU into a Group and store that group under “Mailgroups”, you should use the following command : New-DynamicDistributionGroup -Name “Sales Users” -RecipientContainer “domain.com/Sales” -IncludedRecipients AllRecipients -OrganizationalUnit “domain.com/Mailgroups

Keep in mind : in order to become part of a Dynamic Group, the object must be either a user with Exchange mailbox, a user with an external email-address, a resource mailbox, a contact with external e-mail address or a mail-enabled group. Regular AD objects without mailbox, but with an email address set will NOT become part of the group.

Note : Dynamic Distribution Groups will show up as “Query-based Distribution Groups” in AD. See http://technet.microsoft.com/en-us/library/bb125256.aspx and http://technet.microsoft.com/en-us/library/aa996561.aspx for more info on Dynamic Distribution Groups.

To view the members of a Dynamic Distribution Group, you’ll need to use these 2 cmdlets :

$MarketingDepartment = Get-DynamicDistributionGroup -Identity “Marketing Department”

Get-Recipient -Filter $MarketingDepartment.RecipientFilter (or Get-Recipient -RecipientFilter $MarketingDepartment.RecipientFilter in 2007 SP1)

Set a mailbox quota for certain users :

Suppose you want to set a mailbox quota for all users in the Sales OU : Get-Mailbox –OrganizationalUnit “domain.com/Sales” | Set-Mailbox -ProhibitSendQuota 100Mb

If you want to set a quota for all members of the “Marketing” Active Directory group, you’ll need Quest’s Free “Quest Active Roles Management Shell for AD” Powershell cmd-lets. Download the free cmd-lets from http://www.quest.com/powershell/ .

Make the cmd-lets available through the Add-PSSnapin Quest.ActiveRoles.ADManagement powershell command and use the following command : get-qadgroupmember -Identity “Marketing” | Set-Mailbox –Identity {$_.Name} -ProhibitSendQuota 100Mb

Access to other mailboxes

If a user tries to open the Inbox of another mailbox, he (or she) will get “Cannot display the folder. The inbox folder cannot be found”

101207_1546_Exchange2001

This means that the user does not have access to the Inbox. By default, nobody has access to a mailbox except the owner of that mailbox. (Not even Exchange Organization Admins have access to individual mailboxes). If you want to get/grant access to a mailbox, a folder in a mailbox, … you have multiple options :

– Ask the user to right click the folder in Outlook and use “Change sharing permissions” to grant access.

101207_1546_Exchange2002

– Second option is to grant access to the entire mailbox via Powershell. You need to have Exchange Organization Administrator rights to be able to perform this task .

In the following example, I want try to grant “Peter Van Eeckhoutte” Full Access to the mailbox of “Administrator” :

Add-MailboxPermission -Identity “Administrator” -AccessRights FullAccess -User “Peter Van Eeckhoutte”

(If you want to do this on all mailboxes, you need to use this command :

get-mailbox | Add-MailboxPermission -Identity {$_.Name} -AccessRights FullAccess -User “Peter Van Eeckhoutte”)

Possible AccessRights options are : FullAccess, SendAs, ExternalAccount, DeleteItem, ReadPermission, ChangePermission, ChangeOwner. You can specify multiple permissions by separating them with a comma. Additionally, you can review the permissions using the get-MailboxPermission cmdlet. (See http://technet.microsoft.com/en-us/library/bb124097.aspx )

Result of the cmdlet : still no access ! Why ? Because you really need other permissions as well. Keep in mind : FullAccess does not include “SendAs” or “ReceiveAs”.

By the way : Although the “SendAs” option is available under “Add-MailboxPermission”, you cannot use it here to grant real SendAs access. You need to use the Add-ADPermission cmdlet instead. (See http://technet.microsoft.com/en-us/library/aa998291.aspx) add-adpermission “mailbox” -user “domain\user” -ExtendedRights “Send As”. If you want to allow a user to be able to Send emails “on behalf”, use the Set-Mailbox cmdlet :

Set-Mailbox -id “Administrator” -GrantSendOnBehalfTo “Peter Van Eeckhoutte”

Does this solve our access problem ? No. You need to have “ReceiveAs” access in order to be able to open the mailbox in the first place.

When you grant a user the Full Access permission to a mailbox, that user has full access to only the mailbox for which the permissions are applied. With the Full Access permission, the user can open and read the contents of the mailbox. However, the user cannot send as that mailbox without additional permissions. When you grant a user Receive As permission to a mailbox database, that user can log on to all mailboxes within that database, but is not able to send e-mail messages from those mailboxes. Also, if you grant Receive As permission at the storage group level, the specified user can log on to all mailboxes within all databases in the storage group. For example, you may want to grant access to the mailbox database for mobile access or for legal review. See http://technet.microsoft.com/en-us/library/aa996343.aspx

In short : If you need access, you need to run 2 cmdlets :

Add-MailboxPermission “Mailbox” -User “Trusted User” -AccessRights FullAccess    => on user/mailbox level

Add-ADPermission -Identity “Mailbox Store” -User “Trusted User” -ExtendedRights Receive-As     => on mailbox database level or even on Store level. Suppose you want to grant “Peter Van Eeckhoutte” access to the mailbox database that holds the mailbox of Administrator, run :

 

[PS] C:\>Get-MailboxDatabase
Name Server StorageGroup Recover
---- ------ ------------ -------
Mailbox Database APOLLO First Storage Group False 

[PS] C:\>Add-ADPermission -Identity "Mailbox Database" -User "Peter" 

   -ExtendedRights Receive-As
Identity User Deny Rights
-------- ---- ---- ------
APOLLO\First Stor... CORELAN\peter False Receive-As

After changing the ACL, you need to wait for the Information Store to pick up the change. If you want the change to become active immediately, you need to restart the Microsoft Exchange Information Store Service : restart-service MSExchangeIS

Alternatively you can run the Add-MailBoxPermission and use adsiedit to change the remaining permissions on the mailbox object (see http://www.webservertalk.com/archive128-2007-4-1876971.html and http://support.microsoft.com/kb/822676)

Allow users to recover items, even when items were removed from “Deleted Items” or removed using a “Hard Delete”

See : http://support.microsoft.com/kb/246153/en-us. Modify the registry on the client computer that is running Outlook : go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\Options Add a REG_DWORD value called DumpsterAlwaysOn and set the value to 1

(Re)start Outlook client. Click Deleted Item Recovery on the Tools menu. A list of items that have been hard deleted during the retention time set on the server is displayed

Set deleted item and deleted mailbox retention on the server

(http://technet.microsoft.com/en-us/library/bb125266.aspx) By default, deleted items remain available for recovery for 14 days, mailboxes remain available for 30 days. If you want to specify how long deleted items or deleted mailboxes remain available for recovery or re-assigment (in case of mailboxes) on the server, go to the properties of the Mailbox database and go to the “limits” tabsheet. Additionally, you can use the set-mailboxDatabase cmdlet : set-mailboxDatabase -ItemRetention 14.00:00:00 and set-mailboxDatabase -MailboxRetention 30.00:00:00

How to manually defrag an Exchange database ?

First, dismount the database. Next, run eseutil /D drive:\path\to\file from a Dos prompt.

Other interesting parameters : /p : reserve the temp database (= do not perform an inplace defrag). /tpath_to_db : set temporary database path (if you don’t want to use the current folder)

Keep in mind, the administrative maintenance task will defrag the databases automatically, so you only need to do this when you think the database is fragmented and the maintenance tasks did not do a good job :-)

(See KB 328804)

Importing from and exporting to pst files

If you want to export a mailbox to a pst file, you can use the “Get-Mailbox | Export-Mailbox –PSTFolderPath ” cmdlet (this example exports all mailboxes, but you can filter and export specific mailboxes as well). Importing a pst into a mailbox is as easy as running Get-Mailbox | Import-Mailbox –PSTFolderPath .pst files to import>

You can specify a start and end date as parameters to the Import-Mailbox cmdlet.

Importing and exporting requires that you run the cmdlets from a computer that has Outlook installed.

You can still use the exmerge utility as well, but you’ll need to run it from a client that has Outlook installed.

2007 – 2009, Corelan Team (corelanc0d3r). All rights reserved.

Related Posts:

17 Responses to Exchange 2007 Administration : Users, Groups and Mailboxes

  • jasonthat says:

    Hello Peter

    I used the cmdlet get-mailbox | Add-MailboxPermission -Identity {$_.Name} -AccessRights FullAccess -User “testuser”
    And it worked fine giving me permission to all mailboxes.

    But now when i am trying to remove these permissions using:
    get-mailbox | Remove-MailboxPermission -Identity {$_.Name} -AccessRights FullAccess -User “testuser”
    It does not work. I am still able to open other user’s mailbox ad I still my SID in the EMC under “Manage Full Access Permission”

    Running Exchange server 2007 and I am in all the required admin groups – Exchange Recepient, Exchange Organization, Dns admin, Domain Administrators,etc..
    Can you help me out here? Thanks

  • Hello,

    Does it work when you run the command Remove-MailboxPermission against one mailbox at a time ?
    Perhaps you can try leaving out the -Identity {$_.Name} part
    (The powershell cmdlets should do the mapping automatically)

    Peter

  • jasonthat says:

    Ok I just tried for a single user mailbox through shell and I still see my SID in EMC for this mailbox.
    although I know it works if I remove my sid right off from EMC, as I had tried earlier.

  • jasonthat says:

    And to add to the pain, while trying all cmdlets I know to fix the this issue, I now cannot access my mailbox. Something went wrong I guess. Any thoughts?

  • jasonthat says:

    FYI, since I have been testing the permissions on my account itself, I just checked the “Send as Permission” for my mailbox and I do not see the NTAuthority/Self security principal in there but I do see it in the “Manage Full Access” option.
    Would this be related to the issue?

  • jasonthat says:

    Hi Peter…Atleast the permission error is fixed now! I dont know if it was the command you asked me to try or maybe it just took a long time to update. but the SID is gone from all mailboxes.
    However i am not able to open my mailbox anymore, not throught Outlook or OWA . Any way I could track down what the issue is? Thanks.

  • mailbox permissions are just AD permissions, so sometimes you need to wait for AD to replicate before permissions are shown
    (I think you can specify a Domain Controller as a parameter when setting and retrieving permissions on an object, which should help in cases like this)
    Back to your problem : can you post the output of the current permissions now ?

  • jasonthat says:

    Identity User AccessRights IsInherited Deny
    ——– —- ———— ———– —-
    Domain.com/StaffA… Domain\MYUSERNAME {FullAccess} False True
    Domain.com/StaffA… NT AUTHORITY\SELF {FullAccess, Rea… False False
    Domain.com/StaffA… Domain\MORPHEUS$ {ReadPermission} True False
    Domain.com/StaffA… Domain\Exchange Servers {FullAccess} True True
    Domain.com/StaffA… Domain\administrator {FullAccess} True True
    Domain.com/StaffA… Domain\Domain Admins {FullAccess} True True
    Domain.com/StaffA… Domain\Enterprise Ad… {FullAccess} True True
    Domain.com/StaffA… Domain\Exchange Orga… {FullAccess} True True
    Domain.com/StaffA… NT AUTHORITY\NETW… {ReadPermission} True False
    Domain.com/StaffA… Domain\Exchange Servers {FullAccess} True False
    Domain.com/StaffA… Domain\Exchange Publ… {ReadPermission} True False
    Domain.com/StaffA… Domain\administrator {FullAccess, Del… True False
    Domain.com/StaffA… Domain\Exchange Servers {ReadPermission} True False
    Domain.com/StaffA… Domain\Exchange Orga… {FullAccess, Del… True False
    Domain.com/StaffA… Domain\Exchange View… {ReadPermission} True False
    Domain.com/StaffA… Domain\Enterprise Ad… {FullAccess, Del… True False
    Domain.com/StaffA… Domain\Domain Admins {FullAccess, Del… True False

  • jasonthat says:

    This is what I get when I try to login thru OWA

    Request
    Url: http://Domain.com:80/owa/Default.aspx
    User host address: xx.xxx.xxx.xx

    Exception
    Exception type: Microsoft.Exchange.Data.Storage.ConnectionFailedTransientException
    Exception message: Cannot open mailbox /o=MyDomainEXCHANGE1/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=myusername

  • jasonthat says:

    Hey peterrr …this cmdlet fixed the issue :

    Get-MailboxPermission “mymailbox” | Remove-MailboxPermission -Identity ‘CN=My Full Name,OU=Parent OU,OU=Child OU,DC=xxx,DC=xxx’ -User ‘MyDomain\username’ -InheritanceType ‘All’ -AccessRights ‘FullAccess’

    And FYI, in EMC under “Manage Send As” option there was no “NTAuthority/SELF” to be found for my mailbox…so I re-added this security principal as well. I really am not sure what went wrong.
    But thanks a lottt for your help man!!! you were great…

  • great, thanks !

  • jasonthat says:

    Hi Peter

    Thanks for your help yesterday. I have another quick one for you today. Do you know how I could view the list of members (through the shell) in the distribution groups created based on custom filters. I am trying to use this Get-Recipient -Filter command to view the list of members inside each group, so that I can copy & paste the members from there.
    Can you tell me how exactly I should be using this cmdlet? Thanks

  • You’re welcome !

    With regards to the distribution list powershell command :

    $AllMembers = Get-DynamicDistributionGroup -Identity “My Dynamic Distribution List”
    Get-Recipient -Filter $AllMembers.RecipientFilter

    (copied from http://www.corelan.be:8800/index.php/2008/11/05/dynamic-distribution-lists-not-working-as-expected-0-recipients-during-mail-routing/)

    Hope this helps !

    Peter

  • jasonthat says:

    Thanks for the reply peter. Sorry I was away. I will try this and see how it goes, although I think that is the command I was trying. The “$AllMembers” should be the name of the specific distribution group for which I need to see the members, correct? since there are many different dynamic distribution groups on our exchange.

  • Hi Jasonthat,

    No, you need to specify the name of your Distribution list in conjunction with -Identity in the first command
    (in my example, it’s “My Dynamic Distribution List”)

  • jasonthat says:

    Perfect. worked like a charm. You are cool dude!

    P.S. Not sure if it exists but any addition to the cmdlet that would make the email addresses come up along with the names?

  • sure – just use this as second command :

    Get-Recipient -Filter $AllMembers.RecipientFilter | FT DisplayName,PrimarySmtpAddress

    (or alternatively, run Get-Recipient -Filter $AllMembers.RecipientFilter | FL to get all details, allowing you to pick the fields you want to see)

Corelan Live training

Since 2011, Corelan GCV has been teaching live win32 exploit dev classes at various security cons and private companies & organizations.

You can read more about the training and schedules here

Demand Global Change

The world needs your help !

Please take a few moments to read the "Demand Global Change Call For Action" document at
http://bit.ly/demandglobalchange
Read the full document at
http://bit.ly/demandglobalchange_full and share the message with as many people as possible.

Like the Facebook page, and SHARE it with everyone you know.



Donate

Want to support the Corelan Team community ? Click here to go to our donations page.

Want to donate BTC to Corelan Team?



Your donation will help funding server hosting.

Protected by Copyscape Web Plagiarism Tool

Corelan Team Merchandise

You can support Corelan Team by donating or purchasing items from the official Corelan Team merchandising store.

Corelan on IRC

You can chat with us and our friends on #corelan (freenode IRC)

Categories