none
Powershell ISE vs EMS Same command different output RRS feed

  • Question

  • Hello, discovered a strange thing on my Exchange 2016 CU10 server. When I run Get-MailboxDatabaseCopyStatus via EMS I get information for Status and ContentIndexState that they are healthy.  When I run same command via Powershell ISE I get completely different information for Status ServiceDown and for ContentIndexState Unknown. How is this possible, any advice?

    Output from EMS
    [PS] C:\Windows\system32>Get-MailboxDatabaseCopyStatus -Server srvmbx04

    Name              Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                                                                                   Length    Length           State
    ----              ------          --------- ----------- --------------------   ------------
    MDB04\SRVMBX04    Healthy         0         1           7/17/2019 12:11:53 AM  Healthy
    MDB02\SRVMBX04    Healthy         0         1           7/17/2019 12:11:53 AM  Healthy
    MDB01\SRVMBX04    Healthy         0         0           7/17/2019 12:11:15 AM  Healthy
    MDB03\SRVMBX04    Healthy         0         0           7/17/2019 12:09:58 AM  Healthy


    Output from Powershell ISE (same server, run as with same account and privileges as EMS)

    PS C:\Users\testadmin> Get-MailboxDatabaseCopyStatus -Server SRVmbx04

    Name              Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                                                                                   Length    Length           State       
    ----                  ------          --------- ----------- --------------------   ------------
    MDB04\SRVMBX04    ServiceDown     0         0                                  Unknown     
    MDB02\SRVMBX04    ServiceDown     0         0                                  Unknown     
    MDB01\SRVMBX04    ServiceDown     0         0                                  Unknown     
    MDB03\SRVMBX04    ServiceDown     0         0                                  Unknown 

    Tuesday, July 16, 2019 10:24 PM

Answers

  • Hi djntmc,

    First, the result of this command is healthy when you use EMS, it means you don't need to worry about the health of DAG.

    About this phenomenon, could you describe about how do you use PowerShell connect to Exchange and run this command init?

    There only two way that supported to connect to Exchange server: EMS and remote PowerShell. PowerShell isn't supported, there may exist compatibility issue.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    • Marked as answer by djntmc Thursday, July 18, 2019 9:36 PM
    Wednesday, July 17, 2019 6:20 AM
    Moderator
  • Hi Kyle,

    Thx for your reply. I supposed that exist some compatibility issue. Locally on server I open PowerShell without "run as admin' privileges add snap-in for exchange 2016 (I'm not use remote powershell or load EMS profiles in to PShellISE because I'm on server) after that I run command and get information DB status is ServiceDown. 
    In the same open window (shell) I check the DB status on another server (another DAG member) and get the correct information. That situation is little confused me, how I get correct information for another server but no for local server when I run command. After that I close that shell and open Powershell ISE with "run as admin" privileges, add snap-in for exchange, in that case I got correct information for all databases on all servers. After that I figure that problem is in privileges or extended rights but I still don't understand how this is possible or that is normal situation.

    Regards,

    Djntmc

    Locally on server I open PowerShell without "run as admin' privileges add snap-in for exchange 2016

    You still must use remote powershell. Using the snap-in is not supported

    • Marked as answer by djntmc Thursday, July 18, 2019 9:36 PM
    Thursday, July 18, 2019 11:07 AM
    Moderator

All replies

  • Hi djntmc,

    First, the result of this command is healthy when you use EMS, it means you don't need to worry about the health of DAG.

    About this phenomenon, could you describe about how do you use PowerShell connect to Exchange and run this command init?

    There only two way that supported to connect to Exchange server: EMS and remote PowerShell. PowerShell isn't supported, there may exist compatibility issue.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    • Marked as answer by djntmc Thursday, July 18, 2019 9:36 PM
    Wednesday, July 17, 2019 6:20 AM
    Moderator
  • Hi Kyle,

    Thx for your reply. I supposed that exist some compatibility issue. Locally on server I open PowerShell without "run as admin' privileges add snap-in for exchange 2016 (I'm not use remote powershell or load EMS profiles in to PShellISE because I'm on server) after that I run command and get information DB status is ServiceDown. 
    In the same open window (shell) I check the DB status on another server (another DAG member) and get the correct information. That situation is little confused me, how I get correct information for another server but no for local server when I run command. After that I close that shell and open Powershell ISE with "run as admin" privileges, add snap-in for exchange, in that case I got correct information for all databases on all servers. After that I figure that problem is in privileges or extended rights but I still don't understand how this is possible or that is normal situation.

    Regards,

    Djntmc

    Thursday, July 18, 2019 10:55 AM
  • Hi Kyle,

    Thx for your reply. I supposed that exist some compatibility issue. Locally on server I open PowerShell without "run as admin' privileges add snap-in for exchange 2016 (I'm not use remote powershell or load EMS profiles in to PShellISE because I'm on server) after that I run command and get information DB status is ServiceDown. 
    In the same open window (shell) I check the DB status on another server (another DAG member) and get the correct information. That situation is little confused me, how I get correct information for another server but no for local server when I run command. After that I close that shell and open Powershell ISE with "run as admin" privileges, add snap-in for exchange, in that case I got correct information for all databases on all servers. After that I figure that problem is in privileges or extended rights but I still don't understand how this is possible or that is normal situation.

    Regards,

    Djntmc

    Locally on server I open PowerShell without "run as admin' privileges add snap-in for exchange 2016

    You still must use remote powershell. Using the snap-in is not supported

    • Marked as answer by djntmc Thursday, July 18, 2019 9:36 PM
    Thursday, July 18, 2019 11:07 AM
    Moderator