This topic contains 2 replies, has 2 voices, and was last updated by
August 1, 2019 at 8:39 am #168961ParticipantTopics: 3Replies: 2Points: -6Rank: Member
I'm kind of new to this site, so this is my first question. If i'm doing something wrong, please let me know.
About the question I got, recently we upgraded our management servers tot server 2016. Now I came to the conclusion that the Exchange Management Shell (Tools) from Exchange 2013 is not supported in Server 2016.
Now I created a own script with the Enter-PsSession, but when I run this with Powershell (Right-Click > Run With or Open With) it starts the import, but closes after the script is done. What I want is when the import is done, I can enter commands.
It works when I manually open it in Powershell ISE of when I first open Powershell and then open the script, but I want it to work when I press Right-Click etc.
Does someone has an solution?
August 1, 2019 at 8:54 am #168967ParticipantTopics: 8Replies: 18Points: 108Rank: Participant
If you want to keep the Enter-PSSession open so you can use it, it needs to be running in an interactive console window.
This means either opening a new console or potentially using Start-Process to create a console that stays open when right/double-clicking to open.
Start-Process's help examples will show you how IIRC.
August 1, 2019 at 9:03 am #168973ParticipantTopics: 3Replies: 2Points: -6Rank: Member
Thank you for your reply. I don´t know if I fully understand it. I created a new PS file, put the Start-Process -path "...\ExchangeManagementScript.ps1" into it and when I run it, it start the script, but still closes after completing.
You must be logged in to reply to this topic.