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