1
在Powershell中,我正在定義一個名爲test
的新PSDrive。但是當我在控制檯輸入test:
時,它會引發錯誤。如果我輸入cd test:
它工作正常。我可以在不輸入「cd」的情況下導航到我的PSDrive嗎?
應該不是我能夠瀏覽到test
驅動器只需鍵入test:
?
PS> New-PSDrive -name test -psprovider FileSystem -root C:\test
WARNING: column "CurrentLocation" does not fit into the display and was removed.
Name Used (GB) Free (GB) Provider Root
---- --------- --------- -------- ----
test 128.42 FileSystem C:\test
PS> test:
The term 'test:' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:6
+ test: <<<<
+ CategoryInfo : ObjectNotFound: (test::String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
謝謝! – 2009-08-26 23:33:26