Summary: Use Windows PowerShell to cast to the WMI UInt value type.
I am comparing data from WMI, and it seems strange. I found the value type is a UInt32, and when I looked it up, I found that it is an unsigned 32-bit integer. How can I use Windows PowerShell to create one of these?
Use [uint32] and cast your normal integer to this type, for example:
PS C:\> [uint32]$a = 3
PS C:\> $a.GetType()
IsPublic IsSerial Name BaseType
——– ——– —- ——–
True True UInt32 System.ValueType
0 comments