none
Disable Tenant Organization

    Question

  • Hi,

    I am trying to find some Power shell command that disable a tenant organization. I won´t remove entire organization and remove mailboxes.

    I want avoid disable users in Active Directory.

    I prefer a way more simple.

    Anybody knows something like that?

     

    Tks


    Fabrizio Zavalloni
    Thursday, October 7, 2010 2:22 PM

Answers

All replies

  • I do not believe there is and cmdlet to do that. The control is very much on the mailbox.

    You can use Disable-ADAccount to disable each of the user to stop them from logging in or you could disable their mail access method using Set-CASMailbox to disable pop3, impa4, owa and mapi.

    Kip


    Regards, Kip Ng - http://blogs.technet.com/b/provtest/
    Thursday, October 7, 2010 3:51 PM
    Answerer
  • I have written something to achieve this, never thought it would interest anyone :)

     

    well give me a few hours to "polish" the code a bit and I will share it with you 

     

    Early Disclaimer: I did this for my own use, never intended to distribute and it will be provided as is

     

    if you are interested in my home written script please let me know 


    Full time IT consultant since 1998 mainly on Exchange\ISA\AD MCSE NT4.0,2000/2003, CCNA MCITP: Enterprise Messaging Administrator 2007/2010 MCT since 2001
    Saturday, October 16, 2010 1:22 AM
  • Hi IAdK,

    I will give more details I am doing.

    I built a WebService in C# .NET that do things like Create/Remove Organization, Create/Remove adicional domains and set status Organization. In all of the cases I used PowerShell commands, but to set status organization I didn´t find a PowerShell that do this.

    In this post Kip confirm that. I can´t do this, then I built a code that access direct the Active Directory.

    I used the DirectoryEntry Class. My code list all users from the OU, filter the Systems mailbox (DefaultMailBoxPlan,DiscoverySearchMailbox and SystemMailbox) and disable all of them. But I didn´t like this way, I think I can find a better way to do this.

    How you did that? Do you used a Powershell script?

     


    Fabrizio Zavalloni
    Saturday, October 16, 2010 4:36 PM
  • Hi yes the whole thing is developed in powershell. not claiming it to be state of the art script but it works for me.

     

    I have put up a blog post for explaining how it works (hope you don't mind)

     

    http://www.zerohoursleep.com/2010/10/disable-enable-organizations-in-exchange-2010-sp1-multi-tenant/


    Full time IT consultant since 1998 mainly on Exchange\ISA\AD MCSE NT4.0,2000/2003, CCNA MCITP: Enterprise Messaging Administrator 2007/2010 MCT since 2001
    Saturday, October 16, 2010 9:10 PM
  • I liked!

    You disable the AcceptMessagesOnlyFrom that is a good idea and make sense too.

    Tks a lot!


    Fabrizio Zavalloni
    Sunday, October 17, 2010 12:39 PM
  • Thank you for the feedback

     

    If you get to use them and/or enhance them I would appreciate a note on the blog

     

    cheers


    Full time IT consultant since 1998 mainly on Exchange\ISA\AD MCSE NT4.0,2000/2003, CCNA MCITP: Enterprise Messaging Administrator 2007/2010 MCT since 2001
    Sunday, October 17, 2010 5:32 PM
  • i have tried changing user attribute but user still able to login. is there a way to block login for perticular users in multi tenancy?

    Thanks,

    Nag


    Regards, Nag www.itsnag.info

    Friday, January 4, 2013 5:29 PM