Advanced remoting - passing local hash table

Hi, short question here. Is it possible to pass local hash table to remote computer and execute command there using that hash table (splatting). The following does not work:


if($enable) {$value = 0}
if($disable) {$value = 1}

$property = @{
Path = “HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server”
Name = “fDenyTSConnections”
Value = $value
}

Invoke-Command -ComputerName SomeComputer -ScriptBlock {
Set-ItemProperty $using:property
}

I know $using:localvariable works with “simple” variable types such strings but is it possible to pass local hash table to remote computer via $using construction?

Sorry, I solved.

Set-ItemProperty @using:property