mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2026-03-02 23:07:02 -05:00
Get the Device-ID when on Agent #4369
Labels
No labels
Can't Replicate
Closed
Feedback
Fixed - Please Verify & Close
Low Priority
Plugin's in use
Sponsor required
Stale
bootstrap
bug
docker
docs
duplicate
enhancement
help wanted
important
invalid
question
sponsor found
temporarily fixed
upstream fix needed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/MeshCentral#4369
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @prononext on GitHub (Jun 19, 2023).
Dear MeshCentral Fans,
does anyone know how to get the device ID when I am on a agent (Windows + Unix)?
The node ID of the group/mesh I can get with "$filepathtomyagent -nodeid" but I need the deviceid.
Background is that I want to automate some actions and notifications via meshctrl and to directly communicate with the device from the agent or another host I need to get the deviceid.
I am happy for any hint on this topic.
Have a great day.
@si458 commented on GitHub (Jun 19, 2023):
i think you only need the nodeid to communicate to a computer over meshctrl?
what do you mean by deviceid exactually?
@prononext commented on GitHub (Jun 19, 2023):
That is what I also thought but the nodeid is different from the deviceid which I use in the meshctrl command.
So I get the nodeid via my command above and then I compared it to the one which is in the URL of my meshcentral server inside that specific device.
I tried both ids with meshctrl, but only the one I got from meshcentral GUI worked with meshctrl and not the one I got with "meshagent -nodeid" on the agent itself.
Any ideas?
@si458 commented on GitHub (Jun 19, 2023):
no a clue im sorry, i dont use the meshctrl.js, but ill look into it in my free time for you 👍
@si458 commented on GitHub (Nov 5, 2023):
if you want to get the nodeid of the device and its windows, you can check the windows registry as its stored there
HKEY_LOCAL_MACHINE\SOFTWARE\Open Source\APPLICATIONNAMEHERE\NodeIdEDIT:
the return value is in hex format, so it needs to be converted
the following can be used to reverse the value in nodejs