Can one confirm this? when the sample script run I get an error:
### test.ps1 ###
get-process | select-object cpu, name
dir | Select-Object name, length | format-table -auto
############
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-table"
command which is conflicting with the d
fault formatting.
The first command runs, but the second produces an error.
The script runs successfuly as long as it contains only the second command.
-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Hebrew weblog:
http://blogs.microsoft.co.il/blogs/scriptfanatic
> this is a better example...
>
> this as script not working correct:
>
> get-process | select-object cpu, name
> dir | Select-Object name, length
> "BiswangerG" wrote:
>
>> No, this was a example...
>>
>> this the self problem as script:
>>
>> 01 get-process | select-object name, cpu
>> 02 get-process | select-object name, cpu
>> the line 02 show only the name and not cpu... whenn i write this
>> manuel in PowerShell is all okay.... as script not work.
>>
>> "Andrey Nepomnyaschih" wrote:
>>
>>> I don't think this has something to do with PowerShell. It is the
>>> WMI provider which can't find the information inside SMBIOS.
>>>
>>> Most likely the $databaseserver server simply doesn't have this
>>> information stored.
>>>
>>> BiswangerG ?????:
>>>
>>>> Hello,
>>>>
>>>> i have the PowerShell V2 (CTP) and have createt a ps1 script with
>>>> more Select-Object commands. The first command with Select-Object
>>>> is Okay, the secend Command with Select-Object works not correkt.
>>>>
>>>> z.B. from script:
>>>>
>>>> Get-WmiObject Win32_ComputerSystem -computername $applikationserver
>>>> | Select-Object Name, Manufacturer, model Get-WmiObject
>>>> Win32_ComputerSystem -computername $databaseserver | Select-Object
>>>> Name, Manufacturer, model
>>>>
>>>> the PowerShell Shows only from first Name, Manufacturer, model...
>>>> with the secend shows name without manufacturerer, model...
>>>>
>>>> what is the problem here?
>>>>