Windows Vista Forums

BUG? Invalid location after Set-Location \\MyMachine
  1. #1


    Roman Kuzmin Guest

    BUG? Invalid location after Set-Location \\MyMachine

    Let's invoke the following command (where \\MyMachine is the existing
    network name):

    0> Set-Location \\MyMachine
    Set-Location : Command execution stopped because the shell variable
    "ErrorActionPreference" is set to Stop: The UNC path should be of the form
    \\server\share.
    At line:1 char:13
    + Set-Location <<<< \\MyMachine

    So far so good, the error says the command is not good. But it looks like
    the current location is not quite valid after that and we cannot invoke
    Get-ChildItem, for instance:



    0> Get-ChildItem
    Get-ChildItem : Cannot process argument because the value of argument "path"
    is invalid. Change the value of the "path" argument and run the operation
    again.
    At line:1 char:13
    + Get-ChildItem <<<<

    The current location seems to be incomplete:
    0> Get-Location
    Path
    ----
    Microsoft.PowerShell.Core\FileSystem::


    Can you reproduce this? Is this a bug or am I missing something? I use
    PowerShell v1, is this the same in CTP v2?

    --
    Thanks,
    Roman Kuzmin

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



      My System SpecsSystem Spec

  2. #2


    RichS Guest

    RE: BUG? Invalid location after Set-Location \\MyMachine

    On Vista SP1 with the CTP of V2 I cannot reproduce this. I get the error
    message on the set-location but the Get-ChildItem works OK after that and
    set-location gives the correct result.

    I have V1 installed on a virtual machine I'll spin that up and try it on there

    --
    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


    "Roman Kuzmin" wrote:

    > Let's invoke the following command (where \\MyMachine is the existing
    > network name):
    >
    > 0> Set-Location \\MyMachine
    > Set-Location : Command execution stopped because the shell variable
    > "ErrorActionPreference" is set to Stop: The UNC path should be of the form
    > \\server\share.
    > At line:1 char:13
    > + Set-Location <<<< \\MyMachine
    >
    > So far so good, the error says the command is not good. But it looks like
    > the current location is not quite valid after that and we cannot invoke
    > Get-ChildItem, for instance:
    >
    > 0> Get-ChildItem
    > Get-ChildItem : Cannot process argument because the value of argument "path"
    > is invalid. Change the value of the "path" argument and run the operation
    > again.
    > At line:1 char:13
    > + Get-ChildItem <<<<
    >
    > The current location seems to be incomplete:
    > 0> Get-Location
    > Path
    > ----
    > Microsoft.PowerShell.Core\FileSystem::
    >
    >
    > Can you reproduce this? Is this a bug or am I missing something? I use
    > PowerShell v1, is this the same in CTP v2?
    >
    > --
    > 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: BUG? Invalid location after Set-Location \\MyMachine

    I downloaded and tried V2 CTP - the problem is still reproducible.

    I also found the similar (but not exactly the same) post at Connect:
    https://connect.microsoft.com/feedba...1817&SiteID=99

    --
    Thanks,
    Roman Kuzmin

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



      My System SpecsSystem Spec

  4. #4


    Jon Guest

    Re: BUG? Invalid location after Set-Location \\MyMachine

    "Roman Kuzmin" <z@xxxxxx> wrote in message
    news:B78F1FCE-5F8D-453F-99C0-9669B1AF5576@xxxxxx

    > Can you reproduce this? Is this a bug or am I missing something? I use
    > PowerShell v1, is this the same in CTP v2?
    >

    Yep, I can reproduce this (version 1), but only with

    $ErrorActionPreference = "stop"

    If it's set to "Continue" (the default), then the problem doesn't occur.

    --
    Jon




      My System SpecsSystem Spec

BUG? Invalid location after Set-Location \\MyMachine problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help!! - location is not available??? Elbon Network & Sharing 11 05 Feb 2010
Windows 2003 Server - NTFRS error 13506 - "Invalid CO Location" Castelfidardo Server General 0 20 Oct 2009
location is not available..? SeenuGuddu Vista General 6 23 May 2009
Re: LOCATION IS NOT AVAILABLE HankL Vista General 1 30 Mar 2009
More appropriate location CuriousGeorge Indigo 1 24 Jan 2007