Your hashtable declaration is incorrect. When you are manually creating a hashtable put each value on separate lines.
$getRegistryPropertyParams = @{
Path = "HKLM:\SOFTWARE\Microsoft\Microsoft SQLServer\MSSQL$($SqlVersion).$($InstanceName)\Setup"
Name = 'SAID'
}
If you want to put everything on a single line then PS considers it to be one statement. But you need to generate it as multiple statements so use the semicolon to separate the statements that PS should look at.
$getRegistryPropertyParams = @{ Path = "HKLM:\SOFTWARE\Microsoft\Microsoft SQLServer\MSSQL$($SqlVersion).$($InstanceName)\Setup"; Name = 'SAID' }
Now PS sees the first statement, up to the semicolon as the first line and then everything after that as the second. This is no different than if you manually typed in the first line and pressed ENTER and then entered the second line.
This is how PS works in general so this is not specific to hashtables. Use a semicolon to "insert" a newline in the middle of commands.