I'm trying to pass my variable into my JSON post parameters, however, the below code only works for hardcoding the values, but I need to pass the $var to the principal parameter:
$var="demo"
Write-Host $var
$postParams = @'
{ "scope": "DemoScope","principal": "$($var)" }
'@
So far I tried like $(var) and $($var) in the above script but nothing worked.