PSColor icon indicating copy to clipboard operation
PSColor copied to clipboard

get-childitem directory: shows wrong directory

Open veepee78 opened this issue 6 years ago • 8 comments

Go to c:\windows directory and then get-childitem c:\users. -> directory: shows c:\windows, it should show c:\users.

veepee78 avatar Mar 19 '18 13:03 veepee78

This works fine for me. What exact version of Windows, what exact version of Powershell, what version of PSColor, did you install from here manually or from PowerShell Gallery, etc.?

vr8hub avatar Mar 20 '18 19:03 vr8hub

win 10 1709 16299.309 x64 PSVersion 5.1.16299.251 Script 1.0.0.0 pscolor

Installed from powershell gallery, install-module..

PS C:\MaestroNG\Devel\Installation> Get-ChildItem c:\temp

Directory:  C:\MaestroNG\Devel\Installation

Mode LastWriteTime Length Name


d----- 24.10.2017 13.56 1 b d----- 18.10.2017 11.33 1 bb

veepee78 avatar Mar 21 '18 08:03 veepee78

That's what I'm on as well. I can't even imagine a scenario where PSColor would be interfering with this.

PS C:\windows\system32> get-computerinfo -property windows*

WindowsBuildLabEx              : 16299.15.amd64fre.rs3_release.170928-1534
WindowsCurrentVersion          : 6.3
WindowsEditionId               : Professional
WindowsInstallationType        : Client
WindowsInstallDateFromRegistry : 2/27/2018 9:49:00 PM
WindowsProductId               : 00330-80000-00000-AA917
WindowsProductName             : Windows 10 Pro
WindowsRegisteredOrganization  :
WindowsRegisteredOwner         : Windows User
WindowsSystemRoot              : C:\Windows
WindowsVersion                 : 1709

PS C:\windows\system32> $psversiontable.psversion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      16299  251

PS C:\windows\system32> get-module pscolor

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.0.0.0    pscolor                             Out-Default

PS C:\windows\system32> get-childitem c:\temp

    Directory:  C:\temp

Mode                LastWriteTime     Length  Name
----                -------------     ------  ----
-a----        5/16/2017   3:30 PM       2653 vrice.pfx

vr8hub avatar Mar 22 '18 14:03 vr8hub

Well, I am able to reproduce this on my home computer as well. Similar specs. Exactly same result as with the work computer. I didn't have anything powershell related installed on my home machine.

Install-Module pscolor Import-Module PSColor PS C:> dir C:\Temp\

Directory:  C:\

Mode LastWriteTime Length Name


d----- 18.3.2018 23:12 1 NVIDIA

Here with debug: (just dir c:\temp)

PS C:> C:\Users\veepee\Documents\test.ps1 Hit Line breakpoint on 'C:\Users\veepee\Documents\test.ps1:2' [DBG]: PS C:>> Stopped at: { [DBG]: PS C:>> Stopped at: if(($_ -is [System.IO.DirectoryInfo]) -or ($_ -is [System.IO.FileInfo])) [DBG]: PS C:>> Stopped at: FileInfo $_ [DBG]: PS C:>>

Directory:  C:\

Mode LastWriteTime Length Name


d----- 18.3.2018 23:12 1 NVIDIA Stopped at: $_ = $null [DBG]: PS C:>> Stopped at: $steppablePipeline.Process($_) [DBG]: PS C:>> Stopped at: }

and one more time with and without the module..

PS C:\Users\veepee> dir c:\temp

Directory: C:\temp

Mode LastWriteTime Length Name


d----- 18.3.2018 23:12 NVIDIA -a---- 10.1.2018 18:16 2240808 fe1dbb5a98cb4443939b32b1858eec08-le64.cache-4 -a---- 30.10.2016 13:08 231028 rep.html -a---- 9.12.2017 2:23 9734 t.txt

PS C:\Users\veepee> Import-Module PSColor PS C:\Users\veepee> dir c:\temp

Directory:  C:\Users\veepee

Mode LastWriteTime Length Name


d----- 18.3.2018 23:12 1 NVIDIA -a---- 10.1.2018 18:16 2,14MB fe1dbb5a98cb4443939b32b1858eec08-le64.cache-4 -a---- 30.10.2016 13:08 225,61KB rep.html -a---- 9.12.2017 2:23 9,51KB t.txt

PS C:\Users\veepee>

veepee78 avatar Mar 22 '18 15:03 veepee78

Weird. I have two Win10 VM's, both work as I showed above. I've never seen anything like that as long as I've been using PSColor (since I started playing with Win10, say six months or so). Sorry I can't be of more help. David (the author) might have an idea, but he doesn't frequent here very often these days.

Just for grins you might get the latest pscolor.zip from here and install it and see if it makes a difference. It has a change to allow the module to be removed (the way the original worked it borked the system if it was removed). It shouldn't matter — the example I posted earlier was from a stock PowerShell Gallery install just like yours.

You might also try the usual troubleshooting steps — e.g. boot into Safe mode and see if it happens there, etc.

vr8hub avatar Mar 22 '18 15:03 vr8hub

I've got the same problem, and have experienced it right from day 1 (when I first installed PSColor many years ago). I've just installed the latest version (by extracting from the zip file). I'm running on Windows 10 Pro, build 10.0.16299

I've got a directory structure as follows: image

The output of gci -r c:\pccolortest without the PSColor module... image

The output of gci -r c:\pccolortest with the PSColor module... image

HisRoyalRedness avatar May 17 '18 21:05 HisRoyalRedness

(Disclaimer: I'm not the developer, just a contributor.)

I believe you, I just can't help you, because I can't reproduce the problem. I've never had the issue (three different machines, multiple VM's), either with the original version of PsColor, or with the various updates I've made to it (some local only). I'm on Win10 1709 though, so it's possible (though unlikely IMO) that might make a difference.

On May 17, 2018, at 4:49 PM, Keith Fletcher [email protected] wrote:

I've got the same problem, and have experienced it right from day 1 (when I first installed PCColor many years ago). I've just installed the latest version (by extracting from the zip file). In running on Windows 10 Pro, build 10.0.16299

I've got a directory structure as follows: https://user-images.githubusercontent.com/3274184/40205588-b2c5708e-5a80-11e8-962b-b1cf937f688b.png The output of gci -r c:\pccolortest without the PSColor module... https://user-images.githubusercontent.com/3274184/40205478-4b2d3b1e-5a80-11e8-9a46-f3f1ccaae7aa.png The output of gci -r c:\pccolortest with the PSColor module... https://user-images.githubusercontent.com/3274184/40205522-6e0b5f44-5a80-11e8-8ac9-3d71d66bc83b.png

vr8hub avatar May 17 '18 23:05 vr8hub

I'm sorry, I thought I posted solution. It was a conflict with another addon. It's couple of months back, I cant remember anymore what was the conflicting addon. I believe I did load it through profile.

veepee78 avatar May 19 '18 10:05 veepee78