Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

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

Reply
 
Old 03-29-2008   #1 (permalink)
Roman Kuzmin


 
 

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
Old 03-29-2008   #2 (permalink)
RichS


 
 

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

> 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
Old 04-01-2008   #3 (permalink)
Roman Kuzmin


 
 

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
Old 04-01-2008   #4 (permalink)
Jon


 
 

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

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

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

Thread Tools


Similar Threads
Thread Forum
location is not available help Vista General
location is not available..? Vista General
Re: LOCATION IS NOT AVAILABLE Vista General
Location ID .NET General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46