The Dell KACE K1000 Systems Management appliance offers the option to define custom device actions that will start a remote session or execute custom commands like ping etc. Most of these actions only work with Internet Explorer since they use ActiveX.
This article describes a custom solution that can launch the device actions from the most common browsers available for Microsoft Windows.
The download is available here Download, it is a KACE K1000 script (6.4 SP2) for Windows that can be imported into a K1000 appliance. Download the script and copy it to the clientdrop share of the K1000 and import it into the K1000. From there the script can be deployed to all the Windows computers from where the device action(s) shall be executed.
If a dedicated Remote Control Software like UltraVNC Viewer is required on those PCs that Software must be deployed separately. Built in commands like mstsc, ping etc. do not require a separate installation.
This is an example of a custom action for the UltraVNC Viewer in the K1000:
K1000DeviceAction://C:/Program Files (x86)/uvnc bvba/UltraVNC/vncviewer@exe@KACE_HOST_IP
K1000DeviceAction:// is a pseudo protocol being created by the script on the computers the script gets deployed to. It makes the browser accept custom commands since it simulates a custom protocol.
C:/Program Files (x86)/uvnc bvba/UltraVNC/vncviewer is the path to the UltraVNC Viewer including the filename of the file to execute without the extension .exe. Make sure to use / instead of \ in the path, otherwise the action will not work.
exe is the Extension of the file to execute
KACE_HOST_IP is a K1000 device action variable for the remote computer's IP address
@ is a separation character allowing the script to generate the command(s) to execute.
The common pattern for the action is: K1000DeviceAction://Path/FileToExecute@FileType@Parameter(s), any other device action can be created using this pattern.
An action running a ping looks like this: K1000DeviceAction://cmd@exe@"/k ping KACE_HOST_IP"
Opening a Windows Explorer showing the content of C$ on a remote computer can be done using: K1000DeviceAction://cmd@exe@"/k net use \\KACE_HOST_IP\c$ && explorer \\KACE_HOST_IP\c$"
Whenever more than 1 parameter is required for the device action like in the example above, make sure to include the parameters in quotation marks:
"/k net use \\KACE_HOST_IP\c$ && explorer \\KACE_HOST_IP\c$"
In the example above I have only used explorer but not explorer.exe, because otherwise the K1000 Website will return en error. There seems to be a hardcoded check for .exe in the K1000.
On the computers where the device action shall be executed popups must be allowed for the K1000 Website in the browser settings.
The solution has been tested with Windows 7, 8, 8.1 and 10 running MS Internet Explorer, Microsoft Edge, Google Chrome and Firefox.
Here are some screenshots showing how it looks like running the action from Microsoft Edge:
NOTE: This is a custom solution that is not officially supported by Dell Software Support !
K1000DeviceAction://C:/Program Files (x86)/teamviewer/teamviewer@exe@"-i KACE_CUSTOM_INVENTORY_TEAMVIEWERID"
For RDP:
K1000DeviceAction://mstsc@exe@/v:KACE_HOST_IP - brucegoose03 8 years ago
You might need to install other software to open this address.
Tried to open RDP frpm firefox
k1000deviceaction://mstsc@exe@/v:10.100.32.100 - rahimpal 8 years ago
Settings > Resources > Import > Choose action drop-down > Import from Network Share. - designworks 8 years ago
This is probably cause for its own question but I have got this working from a command prompt.
"runas /user:domain\user "powershell -noexit -command {enter-pssession machinename}"
but it doesn't actually enter into a pssession like it should.
If I execute
"powershell -noexit -command {enter-pssession dtw00108}"
from an elevated command prompt it does what I want it to. Open a new PowerShell window in a remote session.
And worse still, if I try and put either command into my K1000 as a custom action it bitches about the action only being able to executed with Internet Explorer for the former (??) and does nothing for the latter of the two.
Any ideas fellas? - designworks 8 years ago
Seems as if the v7.0 agent does not provide the variables like %KACE_OS_ARCH% anymore.
I fixed it by replacing the inline Batch-script with this:
If Not Exist "%ALLUSERSPROFILE%\Dell\K1000_DeviceAction" md "%ALLUSERSPROFILE%\Dell\K1000_DeviceAction"
IF DEFINED PROGRAMFILES(x86) (copy "%~dp0k1000_deviceaction_X64.exe" "%ALLUSERSPROFILE%\Dell\K1000_DeviceAction" /Y) ELSE ( copy "%~dp0k1000_deviceaction_X86.exe" "%ALLUSERSPROFILE%\Dell\K1000_DeviceAction" /Y)
REG ADD HKCR\K1000DeviceAction /f
REG ADD HKCR\K1000DeviceAction /t REG_SZ /d "K1000 Device Action Protocol" /f
REG ADD HKCR\K1000DeviceAction /v "URL Protocol" /t REG_SZ /f
REG ADD HKCR\K1000DeviceAction\DefaultIcon /d %WINDIR%\System32\mstsc.exe /t REG_SZ /f
REG ADD HKCR\K1000DeviceAction\Shell /f
REG ADD HKCR\K1000DeviceAction\shell\open /f
IF DEFINED PROGRAMFILES(x86) (REG ADD HKCR\K1000DeviceAction\shell\open\command /t REG_SZ /d """"%ALLUSERSPROFILE%\Dell\K1000_DeviceAction\K1000_deviceaction_X64.exe""" """%%1"" /f) ELSE (REG ADD HKCR\K1000DeviceAction\shell\open\command /t REG_SZ /d """"%ALLUSERSPROFILE%\Dell\K1000_DeviceAction\K1000_deviceaction_X86.exe""" """%%1"" /f) - chrpetri 8 years ago
I will try this script and report back.
UPDATE: Bingo! Working! Thanks!! - designworks 7 years ago
"runas /user:domain\user ""powershell -noexit -command {enter-pssession machinename}"""
? - chrpetri 8 years ago
powershell.exe -noexit Enter-PSSession -ComputerName KACE_HOST_NAME
Im in a multi domain forest and would much prefer using KACE_HOST_IP but cannot get this to work atm. Looks like a WinRM issue though and not a KACE one. - tOBdavian 7 years ago
I don't get any errors, and it opens the blank tab, but nothing happens beyond that. - DaveMT 7 years ago
Please post your action string here so we can check whats wrong. :) - chrpetri 7 years ago
The commands we used for Goverlan Remote Control are listed below.
Goverlan RC-Internal:
K1000DeviceAction://C:/Program Files/Goverlan Reach Console 9/GoverRMC@exe@KACE_HOST_IP
Goverlan RC-External:
K1000DeviceAction://C:/Program Files/Goverlan Reach Console 9/GoverRMC@exe@REACH: KACE_HOST_IP - khaslbauer 7 years ago
Pretty certain my activex settings for the trusted site are correct...... - mtopo 7 years ago
Something might be wrong in the HKEY_CLASSES_ROOT\K1000DeviceAction\ registry key on your machine that is trying to run the commands. I get the error message you mentioned when the key is not present (or named differently). - chrpetri 7 years ago
Getting an error, "Array variable has incorrect number of subscripts or subscript dimension range exceeded" - kmccully 6 years ago