3

私は頻繁に使用します

ii .

PowerShell で をクリックして、Windows エクスプローラーで現在のディレクトリを開きます。これは常に機能していましたが、今では何も起こりません。

コマンドレットはInvoke-Item引き続き機能します。ii somefile.txt実行すると、そのファイルがテキスト エディターで開きます。しかし、ディレクトリはもう機能しません。

さらに、start .動作しません。を使用するexplorer .と機能します。

ランニング

Trace-Command -Name ParameterBinding {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

ランニング

Trace-Command -Name CommandDiscovery {ii .} -PSHost

戻り値

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実際に何を呼び出しているのか、またはそれを変更する方法がわかりません。

どうすればこれを再び機能させることができますか?

4

1 に答える 1

2

なぜそれが機能しなくなったのかを正確に理解するのは非常に困難ですが、powershell と cmd で同じ代替手段を使用しない理由は次のとおりです。

start .

explorer .あまりにも動作します)

重要な場合ii .は、Powershell コンソールおよび/またはコンピューターを再起動してみてください。またii . -whatif、それが機能しなくなった理由の手がかりが得られるかどうかを確認してみてください。

于 2012-04-13T13:06:03.417 に答える