GithubHelp home page GithubHelp logo

isabella232 / train-winrm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inspec/train-winrm

0.0 0.0 0.0 119 KB

WinRM transport for Train

License: Apache License 2.0

Shell 1.40% Ruby 74.41% PowerShell 0.96% HCL 23.23%

train-winrm's Introduction

train-winrm - Train Plugin for connecting to Windows via Remote Management

Gem Version Build status

  • Project State: Active
  • Issues Response SLA: 3 business days
  • Pull Request Response SLA: 3 business days

This plugin allows applications that rely on Train to communicate with the WinRM API. For example, you could use this to audit Windows Server 2016 machines.

This plugin relies on the winrm and winrm-fs gems for implementation.

Train itself has no CLI, nor a sophisticated test harness. Chef InSpec does have such facilities, so installing Train plugins will require a Chef InSpec installation. You do not need to use or understand Chef InSpec.

Train plugins may be developed without a Chef InSpec installation.

To Install this as a User

ChefDK Installation

After August 2019, this plugin will be distributed with ChefDK; you do not need to install it separately.

Manual Installation using inspec plugin install

Train plugins are distributed as gems. You may choose to manage the gem yourself, but if you are an Chef InSpec user, Chef InSpec can handle it for you.

You will need Chef InSpec v2.3 or later.

Simply run:

$ inspec plugin install train-winrm

You can then run, using Chef InSpec as an example:

you@home $ inspec some-profile winrm://someuser@somehost --password somepassword

From Ruby code, you may use this plugin as follows:

require 'train'
transport = Train.create(
  'winrm',
  host: '1.2.3.4',
  user: 'Administrator',
  password: '...',
  ssl: true,
  self_signed: true
)
conn = transport.connection

Target Options for Train-WinRM

host

Required String. The hostname or IP address used for connection.

port

Optional Integer, default 5985 (plain) or 5896 (SSL). The port number to which the connection should be made.

user

Optional String, username used for sign in. Default Administrator.

password

Optional String, password used for sign in. None sent if not provided.

ssl

Optional Boolean. Defaults to false. Determines whether to use SSL to encrypt communications.

Several other options exist. To see these options, run:

puts Train.options('winrm')

Reporting Issues

Bugs, typos, limitations, and frustrations are welcome to be reported through the GitHub issues page for the train-winrm project.

You may also ask questions in the #inspec channel of the Chef Community Slack team. However, for an issue to get traction, please report it as a github issue.

Development on this Plugin

Development Process

If you wish to contribute to this plugin, please use the usual fork-branch-push-PR cycle. All functional changes need new tests, and bugfixes are expected to include a new test that demonstrates the bug.

Reference Information

Plugin Development is documented on the train project on GitHub.

Unit tests

Run bundle exec rake test:unit to run the unit tests.

Testing changes against a Windows Machine

Install Vagrant and VirtualBox. Check the Vagrantfile to verify that it references a Windows 2016 evaluation VagrantBox to which you have access.

Then, run bundle exec rake test:integration. There are sub-tasks you can use to run only the integration tests; to see a list of all tasks, run rake -aT.

train-winrm's People

Contributors

clintoncwolfe avatar chef-ci avatar miah avatar tas50 avatar tduffield avatar catriona1 avatar nik08 avatar zenspider avatar jeremiahsnapp avatar chef-expeditor[bot] avatar jayashrig158 avatar skeshari12 avatar swatu15 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.