Skip to content
SAF InSpec Profile DeveloperSAF InSpec Profile Developer
MITRE InSpec Profile Developer Course
Course
Resources
Installation
  • Course

    • Course Overview
      • Starting the Journey
        • Studying an InSpec Profile
          • Exploring the InSpec Shell
            • Writing InSpec Controls
              • Generating InSpec Results
                • Viewing and Analyzing Results
                  • InSpec Examples
                    • Profile Inheritance & Overlays
                      • From STIG to Profile

                      Installing InSpec on Windows

                      May 22, 2022Less than 1 minute

                      On This Page
                      • Install Ruby
                      • Install InSpec
                        • Option 1 (Download as a package)
                        • Option 2 (Download as a ruby gem)
                      • Download additional required gems
                      • After Install

                      # Install InSpec on Windows

                      # Install Ruby

                      Go to https://rubyinstaller.org/downloads/open in new window and download and install the newest ruby that corresponds with your operating system, it will look like this: Ruby+Devkit x.x.x.

                      • Make sure when installing that the two checkboxes are checked for Add Ruby executables to your PATH and Associate .rb and .rbw files with this Ruby installation
                      • When installation is complete keep the last checkbox marked to perform ridk installation. Once console pops up and prompts you to interact then press enter. When this is complete close the command prompt

                      # Verify Ruby installation

                      • Open powershell
                      • type $ ruby -v, then press enter
                        • if a ruby version is returned then ruby is properly installed

                      # Verify Ruby Devkit installation

                      • Open powershell
                      • type $ gem install json --platform=ruby, then press enter
                        • If the devkit is installed properly then this command will install the RubyGems library JSON gem.

                      # Install InSpec

                      # Option 1 (Download as a package)

                      The InSpec package is available for MacOS, RedHat, Ubuntu and Windows. Download the latest package at InSpec Downloadsopen in new window or install InSpec via script:

                      # Windows
                      . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project inspec
                      

                      # Option 2 (Download as a ruby gem)

                      • Open powershell
                      • type $ gem install inspec, then press enter

                      # Download additional required gems

                      • type $ gem install bundler, then press enter
                      • type $ gem install test-kitchen, then press enter

                      # After Install

                      Once InSpec is installed, run $ inspec version to verify that the installation was successful.

                      Edit this pageopen in new window
                      Last update: 5/23/2022, 1:04:04 AM
                      Contributors: Aaron Lippold
                      Prev
                      Installing InSpec On Your Machine
                      Apache-2.0 | Copyright © 2022 - The MITRE Corporation
                      Copyright © 2022 Aaron Lippold