考虑以下
$y = 'foo'
$x = {
write-host $y
}
powershell -NoProfile -ExecutionPolicy Bypass -Command "$x"
这不会打印 foo,但我想要它。有没有办法强制 powershell 内联这些变量?
考虑以下
$y = 'foo'
$x = {
write-host $y
}
powershell -NoProfile -ExecutionPolicy Bypass -Command "$x"
这不会打印 foo,但我想要它。有没有办法强制 powershell 内联这些变量?