Exchange 2007 Get-MailboxDatabase RRS feed

  • Question

  • This is probably an oldie...

    Obviously Exchange 2007 PowerShell remoting is not supported by MS and isn't available using PowerShell sessions and Invoke-Command in this scenario due to the 'double hop' issue.

    However I have a requirement to use the Get-MailboxDatabase and Get-MailboxStatistics cmdlets remotely.

    The scenario is thus:

    Computer A (client) has the Exchange 2007 Shell installed

    Computer B (Server) has Exchange 2007 installed

    I need to be able to run these commands on computer A to return information.

    I can merrily create and update mailboxes from Computer A simply by using:

    Get-User -identity $upn -credential $creds -domain controller $dc ¦ Enable-Mailbox -database $db

    As the piping allows me to use a the "get" cmdlet to setup credentials for the remaining parts of the command.  However the Get-MailboxDatabase and Get-MailboxStatistics cmdlets don't have a -credential parameter.

    Without using new-pssession I need to be able to use these commands with also using credentials other than those I'm logged into Computer A with.

    Anyone come across a way of doing this?

    Monday, December 21, 2015 5:19 PM

All replies

  • The only way you can do this is to open your PowerShell session as the other user (RunAs will let you do this).  What account are you trying to use, and why won't your own account work for this?

    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Monday, December 21, 2015 7:52 PM