Add new session parameter to win_psexec (#44263)

* Add new session parameter to win_psexec

* Indicate which version the session option was added in

* Added changelog fragment and minor edit on doc entry
pull/41101/merge
Xyon 6 years ago committed by Jordan Borean
parent 2bd0a66c08
commit 03261b3053

@ -0,0 +1,2 @@
minor_changes:
- win_psexec - Added the ``session`` option to specify a session to start the process in

@ -24,6 +24,7 @@ $elevated = Get-AnsibleParam -obj $params -name "elevated" -type "bool" -default
$limited = Get-AnsibleParam -obj $params -name "limited" -type "bool" -default $false
$system = Get-AnsibleParam -obj $params -name "system" -type "bool" -default $false
$interactive = Get-AnsibleParam -obj $params -name "interactive" -type "bool" -default $false
$session = Get-AnsibleParam -obj $params -name "session" -type "int"
$priority = Get-AnsibleParam -obj $params -name "priority" -type "str" -validateset "background","low","belownormal","abovenormal","high","realtime"
$timeout = Get-AnsibleParam -obj $params -name "timeout" -type "int"
$extra_opts = Get-AnsibleParam -obj $params -name "extra_opts" -type "list"
@ -83,6 +84,9 @@ If ($system -eq $true) {
If ($interactive -eq $true) {
$arguments += "-i"
If ($session -ne $null) {
$arguments += $session
}
}
If ($limited -eq $true) {

@ -65,6 +65,13 @@ options:
- Run the program so that it interacts with the desktop on the remote system.
type: bool
default: 'no'
session:
description:
- Specifies the session ID to use.
- This parameter works in conjunction with I(interactive).
- It has no effect when I(interactive) is set to C(no).
type: int
version_added: '2.7'
limited:
description:
- Run the command as limited user (strips the Administrators group and allows only privileges assigned to the Users group).

Loading…
Cancel
Save