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
This commit is contained in:
parent
2bd0a66c08
commit
03261b3053
3 changed files with 13 additions and 0 deletions
2
changelogs/fragments/win_psexec_session-selection.yaml
Normal file
2
changelogs/fragments/win_psexec_session-selection.yaml
Normal file
|
@ -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…
Reference in a new issue