Hi.
If I have:
Write-Host "[$(Get-Date -displayhint time)] backup starting..."
I get:
[02/17/2010 1:26:12pm] backup starting...
i. e. the Get-Date
parameters are being ignored and is just returning the output of Get-Date
.
What's the best way to do inject the current time in the middle of a string?
thanks