As Micheal mentioned, it looks like a mistake (or false advertising!).
EDIT: At first, I thought the ">" operator worked, but I made a mistake in my test. This is not as one would expect. However, you can try using a new element instead:
new-item -force -path $path -value "bar" -type file
Not exactly the same, but you can create a simple function to do what you want:
function Out-FileForce { PARAM($path) PROCESS { if(Test-Path $path) { Out-File -inputObject $_ -append -filepath $path } else { new-item -force -path $path -value $_ -type file } } }
zdan
source share