Windows Vista Forums

$FormatEnumerationLimit works only if changed globally

  1. #1


    Roman Kuzmin Guest

    $FormatEnumerationLimit works only if changed globally

    $FormatEnumerationLimit works only if $global:FormatEnumerationLimit is set.
    I wonder: if this by design or should I submit it as a bug?

    # BEGIN SCRIPT

    $global:FormatEnumerationLimit = 4 # ensure default PS value

    function Test
    {
    $e = 1 | Select-Object Prop1
    $e.Prop1 = 1..10

    $FormatEnumerationLimit = 8
    $e
    }

    Test

    # END SCRIPT


    OUTPUT
    Prop1
    -----
    {1, 2, 3, 4...}

    EXPECTED OUTPUT
    Prop1
    -----
    {1, 2, 3, 4, 5, 6, 7, 8...}


    --
    Thanks,
    Roman Kuzmin



    http://code.google.com/p/farnet/
    PowerShell and .NET in FAR Manager


      My System SpecsSystem Spec

  2. #2


    Keith Hill [MVP] Guest

    Re: $FormatEnumerationLimit works only if changed globally

    It seems like a bug to me.

    BTW there's another bug with FormatEnumerationLimit. In PSCX we used to
    bump this to 100 in the profile but in certain circumstances that would
    cause the Format-Custom applet to hang.

    --
    Keith

    "Roman Kuzmin" <z@xxxxxx> wrote in message
    news:A0110B6A-811A-413F-9DDE-1082BC80488D@xxxxxx

    > $FormatEnumerationLimit works only if $global:FormatEnumerationLimit is
    > set.
    > I wonder: if this by design or should I submit it as a bug?
    >
    > # BEGIN SCRIPT
    >
    > $global:FormatEnumerationLimit = 4 # ensure default PS value
    >
    > function Test
    > {
    > $e = 1 | Select-Object Prop1
    > $e.Prop1 = 1..10
    >
    > $FormatEnumerationLimit = 8
    > $e
    > }
    >
    > Test
    >
    > # END SCRIPT
    >
    >
    > OUTPUT
    > Prop1
    > -----
    > {1, 2, 3, 4...}
    >
    > EXPECTED OUTPUT
    > Prop1
    > -----
    > {1, 2, 3, 4, 5, 6, 7, 8...}
    >
    >
    > --
    > Thanks,
    > Roman Kuzmin
    >
    > http://code.google.com/p/farnet/
    > PowerShell and .NET in FAR Manager
    >

      My System SpecsSystem Spec

  3. #3


    Roman Kuzmin Guest

    Re: $FormatEnumerationLimit works only if changed globally

    > It seems like a bug to me.
    I think I'll submit it, say, tomorrow. Perhaps we'll get more comments.

    > BTW there's another bug with FormatEnumerationLimit. In PSCX we used to
    > bump this to 100 in the profile but in certain circumstances that would
    > cause the Format-Custom applet to hang.
    Yes, I know this problem, too. On the other hand, it looks like rather a
    problem of Format-Custom.

    --
    Thanks,
    Roman Kuzmin

    http://code.google.com/p/farnet/
    PowerShell and .NET in FAR Manager



      My System SpecsSystem Spec

  4. #4


    Roman Kuzmin Guest

    Re: $FormatEnumerationLimit works only if changed globally

    Submitted as
    https://connect.microsoft.com/feedba...5675&SiteID=99

    --
    Thanks,
    Roman Kuzmin

    http://code.google.com/p/farnet/
    PowerShell and .NET in FAR Manager



      My System SpecsSystem Spec

  5. #5


    Keith Hill [MVP] Guest

    Re: $FormatEnumerationLimit works only if changed globally

    Voted. Don't forget that you can vote on your own submissions.

    --
    Keith

    "Roman Kuzmin" <z@xxxxxx> wrote in message
    news:F6B548C5-D335-4010-9D20-C909327E5A77@xxxxxx

    > Submitted as
    > https://connect.microsoft.com/feedba...5675&SiteID=99
    >
    > --
    > Thanks,
    > Roman Kuzmin
    >
    > http://code.google.com/p/farnet/
    > PowerShell and .NET in FAR Manager
    >
    >

      My System SpecsSystem Spec

$FormatEnumerationLimit works only if changed globally

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible FormatEnumerationLimit related bug Keith Hill [MVP] PowerShell 4 30 May 2007
Folder view the same globally =?Utf-8?B?U2FtIFN0ZWluaGF1c2Vy?= Vista General 1 19 Jan 2007
How to globally move the “Program Files” and “Users” folders? Philippe LeBel Vista file management 1 18 Jun 2006
How to globally move the “Program Files” and “Users” folders? Philippe LeBel Vista file management 0 12 Jun 2006
How to globally move “Program Files” and “Users” folders? Philippe LeBel Vista file management 0 12 Jun 2006