Dueling PS Remote sessions

Welcome Forums General PowerShell Q&A Dueling PS Remote sessions

This topic contains 2 replies, has 2 voices, and was last updated by

2 years, 9 months ago.

  • Author
  • #43020

    Points: 50
    Rank: Member

    In our current environment we are running Exchange 2010 and Exchange 2013. I do terminations in bulk. When I do this I have to run it twice, once for each server.

    Is it possible to have a remote session to the 2010 server and a second remote session to the 2013 server coexisting at the same time and process all the terminations in one batch?

    If so how would it know which session to use?

  • #43051

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    When you use Import-PSSession, you can add -Prefix. So, -Prefix 2010 or -Prefix 2013. Your commands then become Get-2010Mailbox and Get-2013Mailbox – which is how it'll know which connection to use.

    • #43087

      Points: 50
      Rank: Member

      What a handy little item! I can't wait to try it. This will allow me to bring this all into one script instead of multiple ones and really have the process down pat!


The topic ‘Dueling PS Remote sessions’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort