Using PowerShell. Trying to label a filename using a variable that the user enters.
function foo
{ $name = Read-Host -Prompt "Get name"
...
....
}
foo | Out-file -FilePath c:\temp\$name.log
result is a file is made but its just c:\temp\.log
. How can I use input to the $name
to name the file?