Collect name, Identity, parentpath and PrimarySmtpAddress of all mail enabled public folders.

Hi,
I’m trying to collect the name, Identity, parentpath and PrimarySmtpAddress of all mail enabled public folders. PrimarySmtpAddress returns empty whatever I do. If I use this same cmd-line then it works fine.
What am I doing wrong? Here is the powershell code I'm using:
Get-PublicFolder \ -Recurse  -resultsize unlimited  | ? {$_.MailEnabled -eq $true} | Select-Object Name,Identity,parentPath, `
@{label='PrimarySmtpAddress';expression={"$((Get-MailPublicFolder '$_.Identity').PrimarySmtpAddress)"}}
 Thanks in advance!
win_builder

The ps code next is getting the info i want to collect:
Credit goes to travis5150 and Chris Dent from expert exchange
cls
$publFolders = get-publicfolder -resultsize unlimited  -recurse | ? {$_.MailEnabled -eq $true}
@(foreach ($publFldr in $publFolders){
$objProp = "" | Select Name,Alias,Identity,ParentPath,PrimarySmtpAddress
$objProp.name = $publFldr.name
$objProp.Identity = ($publFldr.Identity)
$objProp.parentpath = $publFldr.parentpath
$objProp.Alias = (get-mailpublicfolder -id $publFldr.identity | select -exp Alias)
$objProp.PrimarySmtpAddress = (get-mailpublicfolder -id $publFldr.identity | select -exp PrimarySmtpAddress)
$objProp
Thanks for your help and time!!
win_builder

Similar Messages

  • SPAM and Exchange 2010 Mail-enabled Public Folders

    Is there a way to determine if mail sent to our Exchange 2010 mail-enabled Public Folders by our customers is ever rejected because it was tagged as spam? The concern is that we might not be receiving some email. We rely on the mail-enabled PF's
    heavily, but since they aren't a mailbox there is no Junk E-mail folder to check. We do not have the resources to check EOP on a regular basis throughout the day, and the customer would not get an NDR or anything like that.
    HDL

    Hi,
    You can consider to use Message Tracking tool under EMC -> Toolbox to track these messages.
    Understanding Message Tracking
    https://technet.microsoft.com/en-us/library/bb124375%28v=exchg.141%29.aspx?f=255&MSPPError=-2147217396
    Search Message Tracking Logs
    https://technet.microsoft.com/en-us/library/bb124926(v=exchg.141).aspx
    Best Regards.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Lynn-Li
    TechNet Community Support

  • I have two location one is Delhi(IP-192.168.100.*) and another is Mumbai(IP-192.168.1.*) and both are connected by MPLS line and ping with each other. We have one DC in Delhi location and domain name is CAPLDC and Delhi location all PC is member of this

    I have two location one is Delhi(IP-192.168.100.*) and another is Mumbai(IP-192.168.1.*) and both are connected by MPLS line and ping with each other.
    We have one DC in Delhi location and domain name is CAPLDC and Delhi location all PC is member of this domain and working properly.
    now i am trying join the Mumbai location PC with my Domain(CAPLDC) but they are not join with my DC and generate the error.
    I have chek the DNS and nslookup all are correct but this is generate error. 
     Is this possible Mumbai location join with this Domain(CAPLDC)???
    One more thing when i have created another DC with this name (papldc.com) then Mumbai location is joined properly.
    Pls find the error message below and also find the attachment.
    Note: This information is intended for a network administrator.  If you are not your network's administrator, notify the administrator that you received this information, which has been recorded in the file C:\Windows\debug\dcdiag.txt.
    The domain name "capldc" might be a NetBIOS domain name.  If this is the case, verify that the domain name is properly registered with WINS.
    If you are certain that the name is not a NetBIOS domain name, then the following information can help you troubleshoot your DNS configuration.
    DNS was successfully queried for the service location (SRV) resource record used to locate a domain controller for domain "capldc":
    The query was for the SRV record for _ldap._tcp.dc._msdcs.capldc
    The following domain controllers were identified by the query:
    capldcserver.capldc
    win-dyfq2poc88q.capldc
    However no domain controllers could be contacted.
    Common causes of this error include:
    - Host (A) or (AAAA) records that map the names of the domain controllers to their IP addresses are missing or contain incorrect addresses.
    - Domain controllers registered in DNS are not connected to the network or are not running.
    Pankaj Kumar

    Why are you using a single labeled domain? I would recommend renaming the domain name to be something like domain.com.
    Please refer to the articles below to fix your current issue:
    http://www.wincert.net/tips/networking/1614-cant-join-pc-to-a-domain-with-single-label.html
    http://www.itgeared.com/articles/1128-using-single-label-dns-names-for-active/
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • Even after the Mavericks Mac Mail update and showing my "All Mail" folder, Mail.app is still acting weird and slow.  Any further suggestions?

    Even with the recent Mac Mail Mavericks update and showing my "All Mail" Gmail folder, Mail.app is still acting funky and slow.  Any further suggestions for getting Mail.app back to it's pre-Mavericks state?

    Your description of the problem is rather vague, but I'll take a guess at what you mean.
    Quit Mail if it's running. Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    sqlite3 L*/C*/*.mail/*/L*/*/*/C*.db vacuum; sqlite3 L*/M*/*/*/E*ex vacuum
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    You should see a new line ending in a dollar sign (“$”) appear below what you entered. If not, press return. You can then quit Terminal and relaunch Mail. Test.
    Note: This procedure will have no effect unless you quit Mail when you begin.

  • EXCH 2007: All email addresses forwarded to a mail-enabled Public Folder

    I need to find all mailboxes and their aliaes that are setup to be Forwarded to a mail-enabled public folder.  Is there an Exchange Mangement Shell script that I can run that will produce that list for me?  Or some other way of finding those mailboxes/aliases? 
    Thanks
    Matt

    Hi Matt,
    We can try the following command (proposing that Winnie is the Mail-enabled public folder):
    Get-Mailbox | Where-Object { $_.ForwardingAddress -eq “Domain.com/Microsoft Exchange System Objects/Winnie” } | Select Name, ForwardingAddress, DeliverToMailboxAndForward
    Hope it works.
    Thanks,
    Winnie Liang
    TechNet Community Support

  • Why does my mail skipp inbox and goes to all mail instead, i dont have any kind of filters on ?

    Hi,
    I've been using thunderbird for my gmail, recently i noticed that some incoming mail skipped my inbox folder while never appearing in it and turned out in an all mail folder instead.
    I didn't put any kind off filters on so i wonder why this keeps happening and i would like to know how to be sure all of my incoming mail gets shown in the inbox folder ?
    Thanks

    I don't use Gmail IMAP, but I assume that "important" mail only appears there and in all mail. Likewise "family" etc. Having it in inbox and important etc would be frustrating.

  • Why do i have to click emails in, all mail, important, inbox, folders?

    In my thunderbird account I have inbox, important, all mail, and several folders I have created. Why do I have to click on the same email in all folders? If I look at it in my inbox it should clear as read in all categories, but thunderbird makes me click on each folder and then find each email to stop it from showing as un-read.

    I had looked at and thought to do that in the past, but the gmail tab is grey'ed and as such I didn't think I could do that. Your comments made me think it was possible and I needed to find the way and clicked on it. Then out pops the folders under gmail and click, click, click... and no more folders.
    Thanks.

  • Just turned on iPad to check mail, all mail (read, unread, folders everything) gone - help

    As the title says just switched on my previously working iPad to check mail (Imap and two pop accounts) the two pop accounts work perfectly. I can send and receive email from this point forward but I have lost all my folders, unread, read, archived and draft emails. Can anyone help? What I have done is check the settings and they are all fine, I have sent from and received mail to this account but all other mail is now vanished.
    Thanks
    Craig

    Try a reset:
    Hold the Sleep and Home button down for about 10 second until you see the Apple logo.

  • Is there a way to BULK COLLECT with FOR UPDATE and not lock ALL the rows?

    Currently, we fetch a cursor on a few million rows using BULK COLLECT.
    In a FORALL loop, we update the rows.
    What is happening now, is that we run this procedure at the same time, and there is another session running a MERGE statement on the same table, and a DEADLOCK is created between them.
    I'd like to add to the cursor the FOR UPDATE clause, but from what i've read,
    it seems that this will cause ALL the rows in the cursor to become locked.
    This is a problem, as the other session is running MERGE statements on the table every few seconds, and I don't want it to fail with ORA-0054 (resource busy).
    What I would like to know is if there is a way, that only the rows in the
    current bulk will be locked, and all the other rows will be free for updates.
    To reproduce this problem:
    1. Create test table:
    create table TEST_TAB
    ID1 VARCHAR2(20),
    ID2 VARCHAR2(30),
    LAST_MODIFIED DATE
    2. Add rows to test table:
    insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
    values ('416208000770698', '336015000385349', to_date('15-11-2009 07:14:56', 'dd-mm-yyyy hh24:mi:ss'));
    insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
    values ('208104922058401', '336015000385349', to_date('15-11-2009 07:11:15', 'dd-mm-yyyy hh24:mi:ss'));
    insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
    values ('208104000385349', '336015000385349', to_date('15-11-2009 07:15:13', 'dd-mm-yyyy hh24:mi:ss'));
    3. Create test procedure:
    CREATE OR REPLACE PROCEDURE TEST_PROC IS
    TYPE id1_typ is table of TEST_TAB.ID1%TYPE;
    TYPE id2_typ is table of TEST_TAB.ID2%TYPE;
    id1_arr id1_typ;
    id2_arr id2_typ;
    CURSOR My_Crs IS
    SELECT ID1, ID2
    FROM TEST_TAB
    WHERE ID2 = '336015000385349'
    FOR UPDATE;
    BEGIN
    OPEN My_Crs;
    LOOP
    FETCH My_Crs bulk collect
    INTO id1_arr, id2_arr LIMIT 1;
    Forall i in 1 .. id1_arr.COUNT
    UPDATE TEST_TAB
    SET LAST_MODIFIED = SYSDATE
    where ID2 = id2_arr(i)
    and ID1 = id1_arr(i);
    dbms_lock.sleep(15);
    EXIT WHEN My_Crs%NOTFOUND;
    END LOOP;
    CLOSE My_Crs;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20000,
    'Test Update ' || SQLCODE || ' ' || SQLERRM);
    END TEST_PROC;
    4. Create another procedure to check if table rows are locked:
    create or replace procedure check_record_locked(p_id in TEST_TAB.ID1%type) is
    cursor c is
    select 'dummy'
    from TEST_TAB
    WHERE ID2 = '336015000385349'
    and ID1 = p_id
    for update nowait;
    e_resource_busy exception;
    pragma exception_init(e_resource_busy, -54);
    begin
    open c;
    close c;
    dbms_output.put_line('Record ' || to_char(p_id) || ' is not locked.');
    rollback;
    exception
    when e_resource_busy then
    dbms_output.put_line('Record ' || to_char(p_id) || ' is locked.');
    end check_record_locked;
    5. in one session, run the procedure TEST_PROC.
    6. While it's running, in another session, run this block:
    begin
    check_record_locked('208104922058401');
    check_record_locked('416208000770698');
    check_record_locked('208104000385349');
    end;
    7. you will see that all records are identified as locked.
    Is there a way that only 1 row will be locked, and the other 2 will be unlocked?
    Thanks,
    Yoni.

    I don't have database access on weekends (look at it as a template)
    suppose you
    create table help_iot
    (bucket number,
    id1    varchar2(20),
    constraint help_iot_pk primary key (bucket,id1)
    organization index;not very sure about the create table syntax above.
    declare
      maximal_bucket number := 10000; -- will update few hundred rows at a time if you must update few million rows
      the_sysdate date := sysdate;
    begin
      truncate table help_iot;
      insert into help_iot
      select ntile(maximal_bucket) over (order by id1) bucket,id1
        from test_tab
       where id2 = '336015000385349';
      for i in 1 .. maximal_bucket
      loop
        select id1,id2,last_modified
          from test_tab
         where id2 = '336015000385349'
           and id1 in (select id1
                         from help_iot
                        where bucket = i
           for update of last_modified;
        update test_tab
           set last_modified = the_sysdate
         where id2 = '336015000385349'
           and id1 in (select id1
                         from help_iot
                        where bucket = i
        commit;
        dbms_lock.sleep(15);
      end loop;
    end;Regards
    Etbin
    introduced the_sysdate if last_modified must be the same for all updated rows
    Edited by: Etbin on 29.11.2009 16:48

  • Would like to automate this Powershell command that sets the UPN of all mail enabled users

    I have command that changes the UPN of all mailbox users
    Get-ADUser -Filter * -properties homemdb | where {$_.homemdb -ne $null} | ForEach-Object ($_.SamAccountName) {$CompleteUPN = $_.SamAccountName + “@contoso.com”; Set-ADUser -Identity $_.DistinguishedName -UserPrincipalName $CompleteUPN}
    The command works using the AD module for
    powershell. What I would like to do it write a script that does the following.
    Runs the command above
    Only applies changes to users that need it. (I think this applies the setting to all users with the "homemdb")
    I was thinking of setting it as a scheduled task on one of the Domain Controllers. My
    powershell skills are lacking at best, so any guidance on how to set this up would be much appreciated. 
    Thanks

    Cannot bind parameter 'Filter' to the target.
    Exception setting "Filter":
    "Invalid filter syntax. For a description of
    the filter parameter syntax see the command help.
    "(RecipientType -eq
    'UserMailbox') -and
    (UserPrincipalName -notlike
    ('*@{1}' -f $UPNSuffix))" at position 68."
        + CategoryInfo         
    : WriteError:
    (:) [Get-User],
    ParameterBindingException
        + FullyQualifiedErrorId
    : ParameterBindingFailed,Microsoft.Exchange.Management.RecipientTasks.GetUser
    Read the error very carefully: "Invalid filter syntax"
    You filter: "(RecipientType -eq
    'UserMailbox') -and
    (UserPrincipalName -notlike
    ('*@{1}' -f $UPNSuffix))"
    This is not a good filter for anything.
    This is not legal in a filter: (UserPrincipalName
    -notlike ('*@{1}'
    -f $UPNSuffix))"
    See filter syntax for rules on the limited support for PowerShell syntax.   filters are a subset.
    ¯\_(ツ)_/¯

  • Moving all mail including sub folders to iMac

    I know this is probably a question ansered all the time, but I can't seem to find anything here about it.  I'm migrating from PC to imac and trying to set up my msn mail account.  Although everything in my inbox comes through fine, the other (sub) folders I have set up on msn don't get downloaded.  They are there on my ipad so I know it can be done, but how do I do it on the imac?  Help appreciated please.

    Not sure about Gmail but I had problems with the same thing in that I only had one inbox. I deleted one of the email accounts and checked my inbox to find that the different mail accounts all showed up. I think one of my accounts could not have been set up correctly to start with.

  • Exchange Online Protection and Public Folders

    Hi,
    We have just been migrated to Exchange Online Protection from FOPE and although users can now manage their own quarantines, they cannot do this for Mail Enabled Public Folders. Is this possible?
    Many Thanks

    Hi Paul,
    I replied to a post from you in another thread. It's easy to miss though, so here's what I said:
    "You should tell mail2web that there is an option in Exchange to hide public folders from IMAP clients. I'm an IT manager at a large software company with 50% of our users on Macs. We turned on the option to hide public folders from IMAP clients a while ago, long before the iPhone. It's worked very well and continues to work for iPhone people (like me!).
    There was no reason for us to make public folders viewable via IMAP, so hopefully the same will be true for mail2web."
    I'm actually really glad that Apple made this change. I want to see most of the folders at the inbox level in Exchange and with the Exchange switch turned on to hide public folders, there's no downside.
    Regards,
    fh

  • Searching Gmail messages in Apple Mail 8.0 and hiding All Mail

    As recommended by several tech sites, I enabled All Mail from my Gmail account to show in IMAP, and Apple Mail 8.0 created a new archive under the Trash icon named "All Mail (Google)". It took several hours to downloaded all my 63000 messages and they are now all stored there (based on the mailbox size in Library>Mail) but still show (as aliases I guess) in the respective mailboxes that I originally assigned them to.
    Now, when I search for a message in Apple Mail, it finds it but shows its location as in "All Mail" instead of the mailbox (or label) that I had assigned it to. Is there a way to hide the All Mail archive so that the search function does not look there first?
    I used to have All Mail disabled in IMAP, and the search worked as I wanted, but the issue was that all my 100 mailboxes had to be synchronized every time a message arrived, was deleted, or was moved from any Gmail mailbox. This means that it constantly cycled in the background through my mailboxes and new mail sound notifications were delayed until all mailboxes had been synced.
    Enabling All Mail to show in IMAP has solved the issue of constant syncing to all mailboxes, but it has introduced the problem with searching my mailbox. It has also meant that every new message that arrives is displayed both in the Inbox and in the All Mail, and I don't need the latter.
    I opened a ticket a year ago about the syncing issues to all mailboxes with bugreport at Apple, and nothing has been solved. Thanks for any help on how to hide the All Mail Google archive without disabling All Mail in IMAP, or any other workaround to search messages by mailbox without having syncing issues.

    Still having this issue and accidentally hit solved.

  • What is included in All Mail?  mine is huge and it is not notes in files

    'All Mail' on my mac shows almost 5,000 messages, but i have maybe a couple hundred if i include notes in file.  I have tried to trash some of the items shown in All Mail and they will not delete.  The Trash and Junk folders are empty. 
    This makes me look like I am getting close to using up my capabilities.  HELP

    yes it is a gmail account.  i only have Apple products, and i use the Apple mail app.
    a friend just told me she also had 1K trashed note reappear and hers is not a gmail account.
    i finally was able to delete most of the 'all mail' notes.  but i now have notes in 'All Mail' that are in no file - they should be 'read notes' in the inbox.  but they are not in the inbox, and only in 'All Mail'  i thought everrything had to be in a folder (inbox being one folder)
    thx for your reply - i am stumped

  • Syncronization: How can i store mail for different accounts remotely, and copy most important mails manually to local folders on two devices?

    Hello. I have two devices and two accounts, so what i want is this:
    I only want to store mail from both accounts in a remote place and copy most important mails to local folders.
    (I will be grateful for any ideas as to where/how this "cloud" can be - specially free places)
    * Can I have a copy of these local folders in both devices and the remote storage?
    * Could i synchronize devices so that: when i move a mail to a local folder in any device, its copied to the same folders in
    the other device and the remote storage place?
    * The remote storage place will have many other folders. When I open Thunderbird, I also want to see these and the mail
    inside, and also be able to move mail from the inbox to these folders.
    * One of the accounts is gmail. In Account Setting tool, there is an option for synchronization. If there is no easier way, I can have mail for other account copied to gmail, and just syncronize gmail mail. For this, how will I copy my present folder structure to gmail. And how can I syncronize the local folders on the two devices?
    Thanks in advance.

    The first awkwardness I see is that there's no obvious format in which to store messages remotely such that you can work with them in an email client. It may be possible to set the "Local Directory" option in the account in Thunderbird to point at some remote folder (DropBox comes to mind) but I have never tried this and I'd be nervous about what happens if connection can't be made, or if you happened to access it from two different places simultaneously. The other concern is that mail stores get big, quickly, and you'd be forever uploading and downloading large (multi gigabyte) files. Thunderbird stores what looks like a folder containing many separate messages as one big file, so there's no simple opportunity for incremental changes to be up/down loaded.
    The whole idea of Local Folders in Thunderbird is to detach messages from servers, so they don't track what happens on servers. I say this to point out the distinction between files stored locally and permanently ("Local Folders"), versus cached copies of online files ("synchronized"). It's not safe to regard your synchronized folders as permanent.
    So, synchronized folders on an IMAP server are "mirrored" in Thunderbird so you do have a local (albeit temporary and transient) copy of messages; this is done mainly to avoid repeatedly downloading messages if you re-read them, and it makes searching faster an more efficient. But these "synchronized" message track what's being done on the server, and so if they are deleted anywhere, all synchronized devices will at some point also see the deleted messages vanishing. (Unless you made a local copy in the Local Folders account.)
    I use a gmail account pretty much as you have described; I copy or move messages to that account so they are visible in my phone, my tablet, my own laptop and my works computer. It's free, and it's "in the cloud"; the only reservation I have is its privacy. There are other providers (e.g. 1&1/gmx) who don't seem to have the data collection fetish that google thrives on.
    It's fairly simple to create filters in Thunderbird to automatically copy messages to your "cloud account"; even better is to set up forwarding rules on the other accounts' servers, so your messages are automatically sent on and waiting for you when you next login, already in the cloud account.

Maybe you are looking for

  • Mail search not working in Yosemite

    Hello, I am not able to search for anything in any of my Mail accounts.  Every search returns 0 results, even if I am looking at the email I am doing the search for.  I can use Spotlight as a work around, but it is very annoying. Has anyone had a sim

  • Menu, Nav, Favourites and Toolbars are not displaying.

    Heres a screen shot of Firefox on my computer - [http://i.imgur.com/meaTv.jpg http://i.imgur.com/meaTv.jpg http://i.imgur.com/meaTv.jpg http://i.imgur.com/meaTv.jpg] of Everything at the top. No Bookmarks bar, nav bar, toolbars, nothing. I was trying

  • Downgrade Windows 2012 Server to Windows 2008 Server

    Hello, I can see this topic covered but the pervious answers are not solving my problem. A client purchased Server 2012 standard OEM from us (distributor), he want to downgrade to Server 2008 STD. They called the MS Activation Center and received the

  • Gyro sw broken under 4.3.2 demo'd in three use cases

    I've noticed that with 4.3.2 the gyro functionality is not being handled in apps consistently or at all in most cases. I'm running the latest IOS and all apps I mention below are the latest also. Interestingly(luckily), GoSkyWatch Planetarium confirm

  • Details Needed-SF

    Hello All I am interested in Success factor training.  I would like to take up the training genuinely from SAP-Success factor itself or SAP-Sucessfactor authorized centers. Have 5 Years of Experience in SAP HR and would like to take up SF training in