I can't seem to get [Microsoft.Win32.RegistryValueKind]::TryParse to work properly. Each solution I try always returns Cannot find an overload for "TryParse" and the argument count: "2". (or "3") despite the fact it shows the following.
PS C:\Windows\system32> [Microsoft.Win32.RegistryValueKind]::TryParse
OverloadDefinitions
-------------------
static bool TryParse[TEnum](string value, [ref] TEnum result)
static bool TryParse[TEnum](string value, bool ignoreCase, [ref] TEnum result)
In my experience any of the following should normally work just fine.
[Microsoft.Win32.RegistryValueKind]::TryParse('dword',[ref]$Null)
[Microsoft.Win32.RegistryValueKind]::TryParse('dword',$true,[ref]$Null)
In the meantime I can just cast the string as [Microsoft.Win32.RegistryValueKind] but I am curious as to what I am doing wrong.