I have the commands
Get-Date
Get-EventLog security -newest 1 | Format-List
in a file called c:\scripts\test100.ps1
and this
powershell.exe -noexit c:\scripts\test100.ps1
in file c:\scripts\ps100.cmd
I am running PowerShell version 1.0 on a XP SP2 box and on a SBS 2003 SP1
box
Per...
"RichS" <RichS@xxxxxx> wrote in message
news:5F432C72-B875-449F-8ABD-987BB94CFD67@xxxxxx
>I cannot reproduce this error. What version of PowerShell and what
>operating
> system are you using?
> --
> Richard Siddaway
> Please note that all scripts are supplied "as is" and with no warranty
> Blog: http://richardsiddaway.spaces.live.com/
> PowerShell User Group: http://www.get-psuguk.org.uk
>
>
> "Per Moeller-Olsen" wrote:
>
>> When I run this in PowerShell:
>>
>> Get-Date
>>
>> Get-EventLog security -newest 1 | Format-List
>>
>> I get this error:
>>
>> out-lineoutput : Object of type
>> "Microsoft.PowerShell.Commands.Internal.Format.FormatStartData" is not
>> legal
>> or not in the correct sequence.
>> This is likely caused by a user-specified "format-list" command which is
>> conflicting with the default formatting.
>>
>> When I just run this:
>>
>> Get-EventLog security -newest 1 | Format-List
>>
>> no problem.
>>
>> It is as if Get-Date modifies something when it comes to Format-List.
>> It's
>> not only Get-Date that does it, commands like Get-Process and Get-Host do
>> the same thing.
>>
>> How do I work around this problem?
>>
>> Per...
>>
>>
>>
>>