【问题标题】:NativeCommandError when mounting a file share in an Azure VM using net use使用 net use 在 Azure VM 中装载文件共享时出现 NativeCommandError
【发布时间】:2017-10-11 08:04:51
【问题描述】:

我关注了this document,并且能够启动虚拟机。

现在我正在尝试挂载文件共享,以便可以使用此 article 从仪表板添加文件。

我在 Windows 虚拟机的 powershell 上执行了Connect 命令:

net use c \\userone.file.core.windows.net\windows /u:AZURE\userone 761lb852i305joijOIJAOIJWOIVJWAORIJVklmvlkmlksrvjjksss5Djt2yJnFcS0Lg7i1fO3iY4u+rS7ti9ct5g1RlERCSPzC9nQ==

c,以便我希望在虚拟机的该驱动器上共享文件。

但我收到以下错误:

PS C:\Users\userwindow>  net use c \\userone.file.core.windows.net\windows /u:AZURE\userone 761lb852i305joijOIJAOIJWOIVJWAORIJVklmvlkmlksrvjjksss5Djt2yJnFcS0Lg7i1fO3iY4u+rS7ti9ct5g1RlERCSPzC9nQ==

net : The syntax of this command is:
At line:1 char:2
+  net use c \\userone.file.core.windows.net\windows /u:AZURE\user ...
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (The syntax of this command is::String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[domainname\]username]
        [/USER:[dotted domain name\]username]
        [/USER:[username@dotted domain name]
        [/SMARTCARD]
        [/SAVECRED]
        [[/DELETE] | [/PERSISTENT:{YES | NO}]]
NET USE {devicename | *} [password | *] /HOME
NET USE [/PERSISTENT:{YES | NO}]

我做错了什么?

【问题讨论】:

    标签: windows powershell azure virtual-machine fileshare


    【解决方案1】:

    您必须使用双点来指定驱动器号:

    net use c: \\userone.file.core.windows.net\windows /u:AZURE\userone 761lb852i305joijOIJAOIJWOIVJWAORIJVklmvlkmlksrvjjksss5Djt2yJnFcS0Lg7i1fO3iY4u+rS7ti9ct5g1RlERCSPzC9nQ==
    

    注意:您可能希望使用不同的驱动器号,因为 c: 已在使用中!

    【讨论】:

    • 奇怪的是,在他们提供的示例中,他们没有双点是有原因的。还有,它是一个全新的Windows VM,怎么能用呢?已经在使用是什么意思?真的想在那里挂载文件共享。提前谢谢!
    • @JoKo windows默认使用c:作为OS盘,所以你应该使用其他盘符,比如Z。在官方文章中,我们可以找到这样的例子net use z: \\samples.file.core.windows.net\logs /u:AZURE\samples <storage-account-key>
    猜你喜欢
    • 2021-09-22
    • 2021-12-08
    • 1970-01-01
    • 1970-01-01
    • 2018-10-24
    • 2022-08-14
    • 2013-07-07
    • 2021-09-23
    • 1970-01-01
    相关资源
    最近更新 更多