This plugin extends Kaholo's capabilities to include making remote commands to Windows machines using WinRM or PowerShell.
Windows Remote Management (WinRM) is the Microsoft implementation of the WS-Management protocol, which is a standard Simple Object Access Protocol (SOAP)-based, firewall-friendly protocol that allows interoperation between hardware and operating systems from different vendors.
PowerShell is a cross-platform task automation solution made up of a command-line shell, a scripting language, and a configuration management framework.
Remote Windows hosts must have WinRM configured in order to be reachable by the Kaholo plugin. Please refer to the Microsoft Documentation for configuring WinRM.
Powershell may also have additional requirements. Please refer to the Microsoft Documentation for configuring remote PowerShell.
To access plugin settings and accounts in Kaholo, go to Settings | Plugins and click on the name of the plugin, which is a blue hyperlink. In this case "PowerShell Remoting". There find two tabs, one for "Settings" and another for "Accounts".
There are no settings for this plugin so the Settings tab will be disabled
Kaholo Accounts are a collection of parameters, often including vaulted secrets, that act together as a set to provide configuration and authentication for the plugin. The name of the account is arbitrary and setting an account to be the default one causes new pipeline actions of the type PowerShell Remoting to come pre-configured to use that account, as a convenience only.
In the case of PowerShell Remoting, accounts include the following parameters:
The hostname or IP address of the Windows machine where the command will be run. This parameter is optional because an account may apply to a wide variety of different hosts and specifying a host at the account level may not be required.
The port on which WinRM or PowerShell connections may be accepted. If left empty the default value of 5985 is assumed.
The username of the user running the remote shell. This may be a local Windows account such as "Administrator" or a Windows Domain account such as "CONTOSO\thwilson".
The password for the configured username, stored in Kaholo Vault so it will not appear in UI, error messages, or log files.
This same method may be used for both WinRM and PowerShell commands. There is a Boolean parameter that when selected runs the command using PowerShell.
This parameter is the hostname or IP address of the Windows machine where the command will be run. It must of course be accessible over the network on the configured port (or 5985 if not configured) from the Kaholo Agent where the pipeline runs. If the hostname is configured in the Kaholo Account it may be left empty at the Action level. If configured differently in both places the action-level configuration takes precedence over the account-level one. If configured in neither place 127.0.0.1 is assumed.
Provide the port address if some alternative port is in use. If not specified, the port specified in the Account will be used, and if that is not specified either, 5985 (Microsoft default) will be used.
The command(s) to execute in WinRM or using PowerShell executable. To execute multiple commands separate them with ;
.
If enabled, the command will be run using PowerShell command powershell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -InputFormat Text -Command & {
Command }
.