Linux 新建PSDrive:找不到与参数名称';坚持';
如何在Linux上创建持久的Linux 新建PSDrive:找不到与参数名称';坚持';,linux,powershell,.net-core,filesystems,new-psdrive,Linux,Powershell,.net Core,Filesystems,New Psdrive,如何在Linux上创建持久的PSDrive PS /home/nicholas> PS /home/nicholas> Get-PSDrive Name Used (GB) Free (GB) Provider Root
PSDrive
PS /home/nicholas>
PS /home/nicholas> Get-PSDrive
Name Used (GB) Free (GB) Provider Root CurrentLocation
---- --------- --------- -------- ---- ---------------
/ 149.53 764.93 FileSystem / home/nicholas
Alias Alias
Env Environment
Function Function
Temp 149.53 764.93 FileSystem /tmp/
Variable Variable
PS /home/nicholas>
PS /home/nicholas> New-PSDrive
cmdlet New-PSDrive at command pipeline position 1
Supply values for the following parameters:
Name: foo
PSProvider: Filesystem
Root: /
Name Used (GB) Free (GB) Provider Root CurrentLocation
---- --------- --------- -------- ---- ---------------
foo 149.53 764.93 FileSystem /
PS /home/nicholas>
PS /home/nicholas> Get-PSDrive
Name Used (GB) Free (GB) Provider Root CurrentLocation
---- --------- --------- -------- ---- ---------------
/ 149.53 764.93 FileSystem / home/nicholas
Alias Alias
Env Environment
foo 149.53 764.93 FileSystem /
Function Function
Temp 149.53 764.93 FileSystem /tmp/
Variable Variable
PS /home/nicholas>
PS /home/nicholas> Remove-PSDrive
cmdlet Remove-PSDrive at command pipeline position 1
Supply values for the following parameters:
Name[0]: foo
Name[1]:
PS /home/nicholas>
PS /home/nicholas> Get-PSDrive
Name Used (GB) Free (GB) Provider Root CurrentLocation
---- --------- --------- -------- ---- ---------------
/ 149.53 764.93 FileSystem / home/nicholas
Alias Alias
Env Environment
Function Function
Temp 149.53 764.93 FileSystem /tmp/
Variable Variable
PS /home/nicholas>
PS /home/nicholas> New-PSDrive -Persist -Name covid -PSProvider FileSystem -Root /home/nicholas/ -Scope Global
New-PSDrive: A parameter cannot be found that matches parameter name 'Persist'.
PS /home/nicholas>
如上所述,创建短暂的驱动显然效果良好。我希望,如果可以创建这样一个驱动器,那么创建一个新的持久性驱动器应该可以正常工作
也许我只是没有正确使用语法。Persist在Linux/MacOS平台上不受支持。没有存储持久连接的位置。任何这样的驱动器都必须使用配置文件脚本(或类似的脚本)进行持久化。