Splatting - Input string was not in a correct format
问题 I can't seem to get my splatting to work in my Invoke-WmiMethod command. I declare the hash table like so: $HKU = 2147483651 $MyParams = @{ 'Class' = 'StdRegProv'; 'Name' = 'EnumKey'; 'ArgumentList' = "$HKU,''"; 'ComputerName' = ''; } # additional code determining ComputerName... # $MyParams['ComputerName'] = $MyComputer; $Vals = Invoke-WmiMethod @MyParams This line gives me the following error: Invoke-WmiMethod : Input string was not in a correct format. At C:\Users\Person\Desktop\tmp.ps1