Powershell调用项不再适用于在资源管理器中打开目录

Powershell调用项不再适用于在资源管理器中打开目录,powershell,windows-explorer,Powershell,Windows Explorer,我经常使用 ii . 在PowerShell中打开Windows资源管理器中的当前目录。这过去一直有效,但现在什么也没发生 Invoke-Itemcmdlet仍然有效。执行IIsomefile.txt操作将在文本编辑器中打开该文件。但是目录不再工作了 此外,启动。不起作用。使用资源管理器。确实有效 运行 Trace-Command -Name ParameterBinding {ii .} -PSHost Trace-Command -Name CommandDiscovery {ii .}

我经常使用

ii .
在PowerShell中打开Windows资源管理器中的当前目录。这过去一直有效,但现在什么也没发生

Invoke-Item
cmdlet仍然有效。执行
IIsomefile.txt
操作将在文本编辑器中打开该文件。但是目录不再工作了


此外,
启动。
不起作用。使用
资源管理器。
确实有效

运行

Trace-Command -Name ParameterBinding {ii .} -PSHost
Trace-Command -Name CommandDiscovery {ii .} -PSHost
返回

DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Invoke-Item]
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Invoke-Item]
DEBUG: ParameterBinding Information: 0 :     BIND arg [.] to parameter [Path]
DEBUG: ParameterBinding Information: 0 :         Binding collection parameter Path: argument type [String], parameter type [System.String[]],
collection type Array, element type [System.String], no coerceElementType
DEBUG: ParameterBinding Information: 0 :         Creating array with element type [System.String] and 1 elements
DEBUG: ParameterBinding Information: 0 :         Argument type String is not IList, treating this as scalar
DEBUG: ParameterBinding Information: 0 :         Adding scalar element of type String to array position 0
DEBUG: ParameterBinding Information: 0 :         BIND arg [System.String[]] to param [Path] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND cmd line args to DYNAMIC parameters.
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Invoke-Item]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing
DEBUG: CommandDiscovery Information: 0 : Looking up command: ii
DEBUG: CommandDiscovery Information: 0 : Alias found: ii  Invoke-Item
DEBUG: CommandDiscovery Information: 0 : Cmdlet found: Invoke-Item  Microsoft.PowerShell.Commands.InvokeItemCommand,
Microsoft.PowerShell.Commands.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
运行

Trace-Command -Name ParameterBinding {ii .} -PSHost
Trace-Command -Name CommandDiscovery {ii .} -PSHost
返回

DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Invoke-Item]
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Invoke-Item]
DEBUG: ParameterBinding Information: 0 :     BIND arg [.] to parameter [Path]
DEBUG: ParameterBinding Information: 0 :         Binding collection parameter Path: argument type [String], parameter type [System.String[]],
collection type Array, element type [System.String], no coerceElementType
DEBUG: ParameterBinding Information: 0 :         Creating array with element type [System.String] and 1 elements
DEBUG: ParameterBinding Information: 0 :         Argument type String is not IList, treating this as scalar
DEBUG: ParameterBinding Information: 0 :         Adding scalar element of type String to array position 0
DEBUG: ParameterBinding Information: 0 :         BIND arg [System.String[]] to param [Path] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND cmd line args to DYNAMIC parameters.
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Invoke-Item]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing
DEBUG: CommandDiscovery Information: 0 : Looking up command: ii
DEBUG: CommandDiscovery Information: 0 : Alias found: ii  Invoke-Item
DEBUG: CommandDiscovery Information: 0 : Cmdlet found: Invoke-Item  Microsoft.PowerShell.Commands.InvokeItemCommand,
Microsoft.PowerShell.Commands.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
我想可能是文件关联问题或其他什么。但我不知道实际调用的是什么
Invoke Item
,或者如何更改它


我如何才能让它再次工作?

很难准确地找出它可能不再适用于您的原因,但为什么不使用与powershell和cmd相同的替代方案:

start .
explorer.
也可以使用)


如果
ii.
很重要,请尝试重新启动Powershell控制台和/或计算机。也可以尝试做
ii-如果您想知道为什么它不再工作,您需要做些什么。

还有一个标准问题-您是否尝试过关闭和再次打开电脑?:)@Shedal
ii$pwd
不工作。从跟踪来看,PowerShell似乎正在工作。您可以从Sysinternals中看到为什么使用PROCMON失败。这将是一个有趣的用Sysinternals工具解决的“案例”文章。看起来您确实丢失了文件夹与explorer.exe的关联。在CMD提示符下尝试“启动c:\somefolder”,看看是否有效。我敢打赌不是。start通常是start过程的别名吗?@Christian-你问我这个问题是因为我说它在cmd中是相同的吗?您键入的命令是相同的,但不是实际的命令。是的,start是Powershell中启动进程的别名。
start。
也不起作用<代码>资源管理器。
可以。如果归结到这一点,我可以使用它,但我更喜欢
ii
的一致性。我这样问是因为使用
启动。
在powershell控制台中给出错误,就像执行
启动过程。
在7,8和2008 R2上工作。。另一个XP洞!:)