WinSession
Send-ActiveUserMessage
Overview
Displays a message to the active user on the device.
Description
BY DEFAULT, this function will:
- Send a message to the user on the screen with the specified Title and Message
- The dialog box will only contain the 'OK' response
- The dialog box will time out in 60-seconds
Cmdlet Attributes
CmdletBinding : []
Parameters
Title : System.String
The title message to be displayed in the message box.
Attributes
Parameter : [Mandatory, Position = 0]
Message : System.String
The message to be displayed in the message box.
Attributes
Parameter : [Mandatory, Position = 1]
DialogType : System.String
The set of options which should be displayed in the message box ( ex: OK
, OK
and Cancel
, etc. ).
Default: 'OK'
Attributes
Parameter : [Position = 2]
ValidateSet : ['AbortRetryIgnore', 'CancelTryContinue', 'OK', 'OKCancel', 'RetryCancel', 'YesNo', 'YesNoCancel']
Timeout : System.Int32
The amount of time to wait before returning a [ MESSAGE_RESPONSE ]
value indicating a timeout was reached.
Default: 60
Attributes
Parameter : [Position = 3]
Output
Type: [ MESSAGE_RESPONSE ]
The response chosen by the logged-in user ( this includes a timeout ).
Example
PS> Send-ActiveUserMessage -Title 'Luke' -Message 'I AM your father!' -DialogType 'AbortRetryIgnore' -Timeout 60
IGNORE
History
Author | Date | Version | Release Notes |
---|---|---|---|
Anthony Maxwell | 09/20/2023 | 1.0.0 | - Inital release. |
Start-ProcessAsActiveUser
Overview
Starts a Windows process in the context of the logged in, active user.
Cmdlet Attributes
CmdletBinding : []
Parameters
Path : System.String
The path to the application to launch.
Attributes
Parameter : [Mandatory = $true, Position = 0, ValueFromPipeline = $true]
ArgumentList : System.String[]
Any command-line arguments which should be passed to the launched application.
Default: @()
Attributes
Parameter : [Position = 1]
WorkingDirectory : System.String
The path to be used as the working directory by the launched application.
Default: "${env:SystemDrive}\"
Attributes
Parameter : [Position = 2]
Output
Type: [ System.Boolean ]
Indicates if the process successfully launched.
Example
PS> Start-ProcessAsActiveUser -Path "${env:SystemDrive}\Program Files\8x8 Inc\8x8 Work\8x8 Work.exe"
True
History
Author | Date | Version | Release Notes |
---|---|---|---|
Anthony Maxwell | 09/21/2023 | 1.0.0 | - Initial release. |
Test-UserActive
Overview
Determines if a user is actively working on the device through RDP or at the physical console.
Example
PS> Test-UserActive
True
History
Author | Date | Version | Release Notes |
---|---|---|---|
Anthony Maxwell | 09/20/2023 | 1.0.0 | - Inital release. |