From b7eb0f370f5b087e0a1e36cf3b8989b7c4139b77 Mon Sep 17 00:00:00 2001 From: Jerry Aldrich Date: Tue, 25 Jun 2019 15:29:20 -0700 Subject: [PATCH] Add CLI target examples for Windows domain users Signed-off-by: Jerry Aldrich --- README.md | 7 +++++-- docs/shell.md | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 51ed22bba..acf49f2d1 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,18 @@ Chef InSpec makes it easy to run your tests wherever you need. More options are # run test locally inspec exec test.rb -# run test on remote host on SSH +# run test on remote host via SSH inspec exec test.rb -t ssh://user@hostname -i /path/to/key # run test on remote host using SSH agent private key authentication. Requires Chef InSpec 1.7.1 inspec exec test.rb -t ssh://user@hostname -# run test on remote windows host on WinRM +# run test on remote windows host via WinRM inspec exec test.rb -t winrm://Administrator@windowshost --password 'your-password' +# run test on remote windows host via WinRM as a domain user +inspec exec test.rb -t winrm://windowshost --user 'UserName@domain' --password 'your-password' + # run test on docker container inspec exec test.rb -t docker://container_id ``` diff --git a/docs/shell.md b/docs/shell.md index 28f1712b5..acf3f8010 100644 --- a/docs/shell.md +++ b/docs/shell.md @@ -39,6 +39,7 @@ path, `--ssl` to use SSL for transport layer encryption. $ inspec shell -t ssh://root@192.168.64.2:11022 # Login to remote machine using ssh as root. $ inspec shell -t ssh://user@hostname:1234 -i /path/to/user_key # Login to hostname on port 1234 as user using given ssh key. $ inspec shell -t winrm://UserName:Password@windowsmachine:1234 # Login to windowsmachine over WinRM as UserName. +$ inspec shell -t winrm://windowsmachine --user 'UserName@domain' --password 'Secret123!' # Login to windowsmachine as UserName@domain.org. $ inspec shell -t docker://container_id # Login to a Docker container. ```