I am trying to get a key using PowerShell that will uniquely identify a Windows computer that is relatively durable, i.e., doesn't change between re-installs of Windows.
I came across Windows.System.Profile.SystemIdentification
which is part of the Windows UWP API but unfortunately so far, I have been unsuccessful in getting this with PowerShell.
How to get Windows 10 Device ID in UWP application?
I have been trying for the past several days and the farthest I have gone is the following:
PS> [Windows.System.Profile.SystemIdentification,Windows.System.Profile,ContentType=WindowsRuntime] | Out-Null
PS> $systemID = [Windows.System.Profile.SystemIdentification]::GetSystemIdForPublisher()
PS> $systemID
Id Source
-- ------
System.__ComObject Uefi
PS> $systemID | Get-Member
TypeName: Windows.System.Profile.SystemIdentificationInfo
Name MemberType Definition
---- ---------- ----------
CreateObjRef Method System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetLifetimeService Method System.Object GetLifetimeService()
GetType Method type GetType()
InitializeLifetimeService Method System.Object InitializeLifetimeService()
ToString Method string ToString()
Id Property Windows.Storage.Streams.IBuffer Id {get;}
Source Property Windows.System.Profile.SystemIdentificationSource Source {get;}
How can I get the Id
property which has a type of Windows.Storage.Streams.IBuffer Id {get;}
?