简体   繁体   中英

Do we need to use transient remoting session in powershell framework?

In our powershell test auotmation framework , code need to be executed in remote test machine from a driver node(where jenkins and Source code repository is installed and configured). To connect to remote node powershell remoting has been used. What i see is for every function at the starting New-pssession is being created and at the end of function the session is getting removed. So when we run the test suite ,multiple times we made remote connection. Why this transient connection is being used? I have seen similar automation framework for linux where they use ssh as permanent connection and close the connection only at the closure of test suite.

Is there any problem with powershell remoting which required this decision? Is powershell remoting stable as SSH connection?

Which connection is recommended for framework? Is it transient or permanent? Please some one help me to understand.

You can set up powershell remoting as an SSH connection or using WinRM (WMI). For instructions on how to set either one up, check the link https://docs.microsoft.com/en-us/powershell/scripting/core-powershell/running-remote-commands?view=powershell-6

I would use WMI as a means of remoting. Enterprise applications like RMMs use this for Windows, however if you need it to be cross platform then SSH will be needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM