header1   header
header
header : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
IMPORTANT: PowerShellCommunity.org is moving! - Wednesday, August 15, 2012

PowerShellCommunity.org is moving!  This community software, and the hardware that it sits on, are no longer serving the purposes of this community.  As a result, we have decided to move this community to a new home at PowerShell.org.  PowerShell.org is already up and running with the new community software and in its new location, so please post any new questions that you have on the forums over there instead of posting them on this site.  We've already started getting some great questions from members of the community over there so please, come on over and join us!

While we are going through this transition, this site will remain up for the short term.  New posts may no longer be created on these forums, however replies to existing posts are allowed so that users who posted questions don't have to re-post the same question on the new site.

[UPDATE 28/02/2013] New user registration has been disabled and forums have now been switched to read-only, including for existing posts since all threads that were started should now be completed. If you have a question about content on this site or about PowerShell in general, head over to PowerShell.org and ask it there where there are people actively using the site and answering questions.

If you have any questions, please let us know on the PowerShell.org site.

Thank you,

Kirk "Poshoholic" Munro

 
How to view Disabled Mailboxes in Exchange 2007
Last Post 25 May 2010 11:16 PM by Shay Levy. 8 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Laeeq QaziUser is Offline
New Member
New Member
Posts:36
Avatar

--
01 Jan 2008 01:58 AM

     

    Hi there,

           I have disbaled a mailbox using the PowerShell Command

                Disable-mailbox  -identity  dev@domain1.com

          Now I want to see all disabled mailboxes, How to do that ?

          I can't see this disabled mailbox in Disconnected Mailboxes in EMC.

          best regards,

          Laeeq

    regards, Laeeq Qazi
    Laeeq QaziUser is Offline
    New Member
    New Member
    Posts:36
    Avatar

    --
    01 Jan 2008 11:03 PM

    Hi there,

                         After alot of testing on my system I came to know that

                            after disabling a mailbox this mailbox  will be displayed in "Disconnected Mailbox" in Exchange Management Console only if this mailbox is accessed once ( ie. user logged in to that mailbox atleast once). All the mailboxes which are just created and haven't been logged in atleast once , will not be displayed in "Disconnected Mailbox" in EMC after being Disabled (either via Disable button on EMC or via Disable-mailbox Cmdlet in PowerShell).

                          Worse is that if we Disable a newly created mailbox (which has not been logged in (accessed) atleast once ) then we can't Enable  that mailbox again via Connect-mailbox Cmdlet (Nor this mailbox is displayed in EMC as I mentioned above). This way  that disabled mailbox is lost permanently.

                          Now I have two quries about it

                          1. Is there a way to programatically view all the disconnected mailboxes ?                                        

                          2. Is there a  way to programatically log in to a mailbox ( bcoz Exchange doesn't create a mailbox in mailbox store untill this mailbox is logged in).

                       best regards

                       Laeeq

    regards, Laeeq Qazi
    Marco ShawUser is Offline
    Veteran Member
    Veteran Member
    Posts:1684
    Avatar

    --
    02 Jan 2008 05:11 AM
    #2: You might want to try Exchange Web Services. Here's some example scripts that might provide the basics of what you need to script something automated using SOAP:
    http://gsexdev.blogspot.com/2006/12...-2007.html
    Karl MitschkeUser is Offline
    Basic Member
    Basic Member
    Posts:467
    Avatar

    --
    02 Jan 2008 06:09 AM
    Laceq;
     
    You can see all disconnected mailboxes via powershell:
     
    Get-MailboxStatistics -Server | where { $_.DisconnectDate -ne $null } | select DisplayName,DisconnectDate
     
    Since you actually never created a mailbox, it won't show - all you did was mail enable an Active Directory object.
     
    I would suggest that if it is somehow important in your organization to create and delete mailboxes like this, that you send the new mail enabled AD object a mail message, which will create the mailbox, and then delete the mailbox.
     
    Now it will show in Disconnected Mailboxes.
     
    Karl
    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    Laeeq QaziUser is Offline
    New Member
    New Member
    Posts:36
    Avatar

    --
    02 Jan 2008 11:56 PM
    Hi,
    Thanx Karl for your kind help.

    I am working on a module to handel Enable/Disable mailbox, and for that I needed that all the mailboxes should also exist in mailbox database ( when we create a mailbox, a mail-enabled user is created in Exchange , and no mailbox is created in Exchange mailbox database, mailbox is only created in mailbox DB if a newly created mailbox is logged on or sent an email). Bcoz if I dsaibled a mailbox which is just created, and haven't been logged on or sent an email, then I can not get any info regarding it and it is also not displayed in Disconnected mailbox in EMC. For that scenario I need that all mailboxes should be created in Mailbox Database immediately.

    Solution for this problem is
    Test-MapiConnectivity -Identity user@domain.com

    This cmdlet will log on to the mailbox that you specify using the credentials of the account with which you are logged on to the local computer. Hence my problem is solved , now I run Test-MapiConnectivity after creating a mailbox so that it is also created on Exchange Mailbox Database.

    best regards
    Laeeq
    regards, Laeeq Qazi
    SivakumarUser is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    03 Nov 2008 07:19 AM
    If anyone know, powershell script that enables all user mailboxes to warn them that their mailbox is over 700k. But it exclude the shared mailboxes as their settings will remain.

    Sivakumar
    SivakumarUser is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    03 Nov 2008 07:22 AM
    PS script that lists all shared mailboxes.?
    mvitonUser is Offline
    New Member
    New Member
    Posts:1
    Avatar

    --
    25 May 2010 06:28 AM
    PS script that lists all shared mailboxes.?


    get-mailbox -filter {IsShared -eq $true}
    Shay LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    25 May 2010 11:16 PM
    > PS script that lists all shared mailboxes.?

    Get-Mailbox -RecipientTypeDetails SharedMailbox

    Shay Levy
    Windows PowerShell MVP
    http://PowerShay.com
    PowerShell Community Toolbar
    Twitter: @ShayLevy
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Many thanks to our original sponsors: Quest Software • SAPIEN Technologies • Compellent • Microsoft footer
    footer   footer