Reputation: 353
I want to output some variables to a logging text file. Here's what I'm doing now...
' Copying $DevRoot\$File to $RemoteRoot\$ServerName\$File' >> $LogFile
But it's outputting that exactly....
Copying $DevRoot\$File to $RemoteRoot\$ServerName\$File
What am I doing wrong?
Upvotes: 2
Views: 76
Reputation: 3163
Use double quotes instead of single quotes. Double quotes tell PowerShell to interpret any variables or escaped characters before rendering, while single quotes are interpreted literally.
Upvotes: 4