This article provides some guidance and examples of commands that can be sent through the command interface to Windows Devices. To see example commands for Windows and Android Devices, see the following articles:
Timeouts
If a supplied command does not return within 60 seconds, the UI will display a timeout message.
If a command does not return at all (e.g. it spawns a sub-prompt for further input), subsequent use of the command interface will fail until 5 minutes has passed. At this point, the interface kills the process so that further commands are possible.
PsExec
Note that PsExec (used in many of the Windows examples below) is a SysInternals tools (https://docs.microsoft.com/en-us/sysinternals/downloads/psexec), and the use of PsExec is subject to a separate EULA (attach PDF from https://bsquarecorp.atlassian.net/browse/SQONE-2596).
Additionally, PsExec does not execute correctly if Hyper-V is running virtual machines on the system. This is being investigated and may be fixed in a future release.
Windows Examples
Example Command |
Description |
systeminfo |
Shows system information including patch level |
shutdown /r /t 10 |
Reboots the machine after 10 seconds |
& "C:\Program Files (x86)\SquareOne\Command\PsExec.exe" -d -accepteula -h -i 1 <executable> <parameters>
|
Starts specified executable (examples below). Note: Ensure that the detach (-d) flag is included so that PsExec does not wait for the process to exit |
& "C:\Program Files (x86)'\SquareOne\Command\PsExec.exe" -d -accepteula -h -i 1 "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --fullscreen --loop --video-on-top c:\video\video.mp4 |
Starts VLC video player (if installed), playing the specified video, looped and full screen. |
& "C:\Program Files (x86)\SquareOne\Command\PsExec.exe" -d -accepteula -h -i 1 "C:\Program Files (x86)\Internet Explorer\iexplore.exe" -k "www.bsquare.com" |
Starts Internet Explorer, directed at the Bsquare website, and in full screen mode |
Get-Service | Where-Object {$_.status -eq 'running'} |
Shows list of running services |
Get-Process | Where-Object {$_.cpu -gt 0} |
Shows list of processes (consuming CPU cycles) |
Get-Process | Where-Object {$_.name -eq <process name>} |
Find a process with the specified name |
TaskKill /f /im <executable> |
Stops the specified executable |
TaskKill /f /pid <PID number> |
Stop the specified process |
Get-CimInstance SoftwareLicensingProduct | where { $_.PartialProductKey } | select Description, LicenseStatus |
Check Software (e.g. Windows) Licensing status |
C:\"Program Files (x86)"\SquareOne\RecoveryAgent\RecoveryAgent.exe <WIM file> |
Stores specified WIM file into recovery partition* |
C:\"Program Files (x86)"\SquareOne\RecoveryAgent\RecoveryAgent.exe <WIM file> -restart |
Stores specified WIM file into recovery partition and then applies it* |
C:\"Program Files (x86)"\SquareOne\RecoveryAgent\RecoveryAgent.exe -restart |
Recovers to image stored in recovery partition* |