Class: WinRM::WSMV::CreateShell
- Defined in:
- lib/winrm/wsmv/create_shell.rb
Overview
WSMV message to create a remote shell
Constant Summary collapse
- UTF8_CODE_PAGE =
utf8 as default codepage msdn.microsoft.com/en-us/library/dd317756(VS.85).aspx
65001
Constants included from Header
Header::RESOURCE_URI_CMD, Header::RESOURCE_URI_POWERSHELL
Constants included from SOAP
SOAP::NS_ADDRESSING, SOAP::NS_CIMBINDING, SOAP::NS_ENUM, SOAP::NS_SCHEMA_INST, SOAP::NS_SOAP_ENV, SOAP::NS_TRANSFER, SOAP::NS_WIN_SHELL, SOAP::NS_WSMAN_CONF, SOAP::NS_WSMAN_DMTF, SOAP::NS_WSMAN_FAULT, SOAP::NS_WSMAN_MSFT
Instance Attribute Summary collapse
-
#codepage ⇒ Object
Returns the value of attribute codepage.
-
#env_vars ⇒ Object
Returns the value of attribute env_vars.
-
#i_stream ⇒ Object
Returns the value of attribute i_stream.
-
#idle_timeout ⇒ Object
Returns the value of attribute idle_timeout.
-
#noprofile ⇒ Object
Returns the value of attribute noprofile.
-
#o_stream ⇒ Object
Returns the value of attribute o_stream.
-
#working_directory ⇒ Object
Returns the value of attribute working_directory.
Instance Method Summary collapse
-
#initialize(session_opts, shell_opts = {}) ⇒ CreateShell
constructor
A new instance of CreateShell.
Methods inherited from Base
Methods included from Header
#action_command, #action_delete, #action_enumerate, #action_enumerate_pull, #action_get, #action_receive, #action_send, #action_signal, #merge_headers, #resource_uri_cmd, #resource_uri_shell, #resource_uri_wmi, #selector_shell_id, #shared_headers
Methods included from SOAP
Constructor Details
#initialize(session_opts, shell_opts = {}) ⇒ CreateShell
Returns a new instance of CreateShell.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/winrm/wsmv/create_shell.rb', line 29 def initialize(session_opts, shell_opts = {}) @session_opts = session_opts @shell_uri = opt_or_default(shell_opts, :shell_uri, RESOURCE_URI_CMD) @i_stream = opt_or_default(shell_opts, :i_stream, 'stdin') @o_stream = opt_or_default(shell_opts, :o_stream, 'stdout stderr') @codepage = opt_or_default(shell_opts, :codepage, UTF8_CODE_PAGE) @noprofile = opt_or_default(shell_opts, :noprofile, 'FALSE') @working_directory = opt_or_default(shell_opts, :working_directory) @idle_timeout = opt_or_default(shell_opts, :idle_timeout) @env_vars = opt_or_default(shell_opts, :env_vars) end |
Instance Attribute Details
#codepage ⇒ Object
Returns the value of attribute codepage.
26 27 28 |
# File 'lib/winrm/wsmv/create_shell.rb', line 26 def codepage @codepage end |
#env_vars ⇒ Object
Returns the value of attribute env_vars.
27 28 29 |
# File 'lib/winrm/wsmv/create_shell.rb', line 27 def env_vars @env_vars end |
#i_stream ⇒ Object
Returns the value of attribute i_stream.
26 27 28 |
# File 'lib/winrm/wsmv/create_shell.rb', line 26 def i_stream @i_stream end |
#idle_timeout ⇒ Object
Returns the value of attribute idle_timeout.
27 28 29 |
# File 'lib/winrm/wsmv/create_shell.rb', line 27 def idle_timeout @idle_timeout end |
#noprofile ⇒ Object
Returns the value of attribute noprofile.
26 27 28 |
# File 'lib/winrm/wsmv/create_shell.rb', line 26 def noprofile @noprofile end |
#o_stream ⇒ Object
Returns the value of attribute o_stream.
26 27 28 |
# File 'lib/winrm/wsmv/create_shell.rb', line 26 def o_stream @o_stream end |
#working_directory ⇒ Object
Returns the value of attribute working_directory.
27 28 29 |
# File 'lib/winrm/wsmv/create_shell.rb', line 27 def working_directory @working_directory end |