Results 1 to 6 of 6

Thread: How to monitor MS Exchange Server 2007 by using PowerShell?

  1. #1
    Join Date
    Jan 2012
    Posts
    43

    How to monitor MS Exchange Server 2007 by using PowerShell?

    right now I am having an issue with Exchange server 2007. The get-mailbox | FL query is working fine when I am executing the same on power shell of Exchange server after executing Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin.

    I have executed the same on remote machine by using powershell console.
    Code:
    $server='192.168.1.23';$pwd= convertto-securestring '123' -asplaintext -force;$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist 'exchangeserver\Administrator',$pwd; invoke-command -computername $server -credential $cred -scriptblock {Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin get-mailbox | FL}
    However I am getting below mentioned error message.
    ‘The term 'Get-mailboxdatabase' is not recognised as the name of a cmdlet, function, script file or operable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.’




    When I tried to execute on remote machine again then again I got an error message and it can be stated as follow.
    ‘A positional parameter cannot be found that accepts argument 'get-mailbox'.

    +CategoryInfo :InvalidArgument: {:} [Add-PSSnapin], ParameterBIndingException
    +FullyQualifiedErrorId: PositionalParameterNotFound,Microsoft.Powershell.Commands.AddPSSnapinCommand’


    Can you tell me why I am not able to execute above mentioned query? Any help will be highly appreciated. Thanks a lot in advance.

  2. #2
    Join Date
    May 2011
    Posts
    443

    Re: How to monitor MS Exchange Server 2007 by using PowerShell?

    After going through your problem I recommend that you should add semi-colon between Add-PSSnapin Microsoft.Exchange.Management, PowerShell.Admin and get-mailbox | F.
    Code:
    {Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin; get-mailbox | FL}
    But simple solution which I can recommend over here is that you should install tool locally on your system. if you wanted 64 bit tool then you will be able to get the same from DVD. However you can download 32bit from official website.

  3. #3
    Join Date
    May 2011
    Posts
    271

    Re: How to monitor MS Exchange Server 2007 by using PowerShell?

    Remote Power Shell feature has been added into E2K10. Hence it wont work for you in Exchange 2007. But luckily it is working in Exchange 2007 SP2 management.
    • WinRM and PowerShell should be removed before you go an install new version.
    • WinRM 1.1 as well as PowerShell v2 should be installed for both exchange server as well as client.

    In Exchange 2007 you will require to execute cmdlets locally on your machine. It implies that machine should exist in terms of security and it will let you to execute Exchange Management Shell. You will not be able to login on the machine where code is running if there is no trust between domains and Exchange Server. if user is deletegated Exchange Administration rights then code would not run on 2007 as user will not be able to mentioned any credentials into EMS. You will be able to execute the code on machine you are having security context.

  4. #4
    Join Date
    Jun 2011
    Posts
    454

    Re: How to monitor MS Exchange Server 2007 by using PowerShell?

    I am not having idea about Exchange 2007 but you can try below mentioned steps for Exchange Server 2010.
    1. You should go for Exchange Server 2010 Client Access server and launch IIS Manager..
    2. Now you have to browse PowerShell Virtual directory which is available under of Default Web Site.
    3. Now you have to click on SSL Settings which is available into details pane.
    4. You have to double click on SSL Settings and you have to click on Require SSL option.
    5. From details pane you have to click on Apply in order to save settings which you have made into IIS manager.
    6. Finally you should restart IIS manager.

  5. #5
    Join Date
    Jul 2011
    Posts
    364

    Re: How to monitor MS Exchange Server 2007 by using PowerShell?

    I found below mentioned solution on internet and it worked for several people so give a try to same.

    First of all you should check and confirm that IIS WinRM extension has been installed on your system.

    Now launch powershell and simply execute below mentioned command.
    Code:
    WinRM Quickconfig
    Now you have to launch IIS and go for Powershell virtual directory and see that SSL should be disabled and also set authentification to Anonymous.

    After that you have to launch Windows powershell modules and execute below mentioned commands.
    Code:
    Remove-PowershellVirtualDirectory
    New-PowershellVirtuallirectory
    Finally you should restart IIS.

  6. #6
    Join Date
    Mar 2011
    Posts
    387

    Re: How to monitor MS Exchange Server 2007 by using PowerShell?

    As far as I know PowershellVirtualdirectory cmdlet does not seems to working on MS Exchange 2007. It is basically designed for Exchange 2010. It is working fine with Exchange 2010. In my situation code is working fine on 2010 the issue seems to be happening after removing Powershell from Exchange 20017.

Similar Threads

  1. Replies: 5
    Last Post: 12-12-2010, 07:54 PM
  2. Exchange server 2007 antivirus
    By WajidB in forum Networking & Security
    Replies: 2
    Last Post: 12-12-2010, 11:58 AM
  3. Defrag Exchange Server 2007
    By Rajnikant-Deva in forum Windows Software
    Replies: 6
    Last Post: 24-10-2010, 04:48 AM
  4. Windows Home Server with Exchange Server 2007
    By Endowed in forum Networking & Security
    Replies: 3
    Last Post: 16-08-2010, 11:34 AM
  5. Exchange Server 2007 and Virtualization
    By Tweaker in forum Windows Software
    Replies: 3
    Last Post: 10-08-2010, 05:53 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,246,471.52335 seconds with 17 queries