Method: WinRM::Connection#shell
- Defined in:
- lib/winrm/connection.rb
#shell(shell_type, shell_opts = {}) ⇒ Shell
Creates a new shell on the remote Windows server associated with this connection.
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/winrm/connection.rb', line 38 def shell(shell_type, shell_opts = {}) shell = shell_factory.create_shell(shell_type, shell_opts) if block_given? begin yield shell ensure shell.close end else shell end end |