This code based on the sample code in Virtual machine generation identifier.
C:\>getvmgenid.exe
VmCounterValue: 7b5857dc5fa32925:1430435a6ee58a42
msDS-GenerationId: 25 29 A3 5F DC 57 58 7B
Copyright (c) 2019-present Takeshi Katano. All rights reserved. This software is released under the MIT License.
Disclaimer: The codes stored herein are my own personal codes and do not related my employer's any way.