The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

goldfinger (9) [Avatar] Offline
#1
Hi Bruce,
I read Jeffrey's note about "Why Can’t I Pipe Format-Table to Export-Csv (and get something useful)?" But I think I have another problem.

If I run the following commands interactive in powershell all do work.
But this is not the case in a scriptfile!

test.ps1:
'Command Running'
Get-Service | Where-Object {$_.Status -eq "running"} | Format-Table name

'Get-Service'
Get-Service

' But now I get an error -> bug or feature?'
'Error "Microsoft.PowerShell.Commands.Internal.Format.FormatStartData...'
Get-Service | Where-Object {$_.Status -eq "running"} | Format-Table name