代码之家  ›  专栏  ›  技术社区  ›  jasonh

使用PowerShell枚举Linux SMB共享

  •  3
  • jasonh  · 技术社区  · 16 年前

    我可以列出我自己计算机的共享,没有问题:

    gwmi Win32_Share
    

    但是当我尝试的时候

    gwmi Win32_Share -computer myserver
    

    哪里 myserver 是运行BusyBox的HP MediaVault mv2120。我得到的答复是: Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

    3 回复  |  直到 16 年前
        1
  •  5
  •   x0n    16 年前

    WMI中的“W”代表“Windows”,虽然SAMBA在让服务器消息块(SMB)工作方面做得相当不错,但它没有在Linux上实现WMI。不幸的是,不同的接口/协议。

        2
  •  2
  •   Preethi    15 年前

    不有一个适用于Linux的wmiclient包。使用它,我们可以从Linux与Windows进行通信。

    RPC服务器不可用:我们必须在Windows计算机中启动RPC相关服务和WMI服务。

        3
  •  0
  •   Thomas Lee    16 年前

    答案是否定的-Linux没有WMI服务。

    Get-WMIObject仅适用于Windows系统(直到Linux社区中有人实现WMI!)