I have to review some scripts what my Ex-Colleague left behind and I am very curious why he is using $a = $(Read-Host -Prompt \"Write something\") in the Parame
$a = $(Read-Host -Prompt \"Write something\")
$() is for evaluating subexpressions in strings. It does nothing here.
$()
You don't need () around read-host either, you can simply use $a = Read-Host -Prompt 'your input here'
$a = Read-Host -Prompt 'your input here'
(-Prompt needs a string as parameter).
-Prompt