使用 PowerShell 枚举 Linux SMB 共享

发布于 2024-08-02 04:35:13 字数 319 浏览 3 评论 0原文

我可以毫无问题地列出我自己的计算机的共享:

gwmi Win32_Share

但是当我尝试

gwmi Win32_Share -computer myserver

Where myserver is an HP MediaVault mv2120 running BusyBox.我收到响应:Get-WmiObject:RPC 服务器不可用。 (HRESULT 异常:0x800706BA)

有什么方法可以完成此操作吗?

I can list my own computer's shares no problem with:

gwmi Win32_Share

But when I try

gwmi Win32_Share -computer myserver

Where myserver is an HP MediaVault mv2120 running BusyBox. I get back the response: Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

Is there any way to get this done?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

污味仙女 2024-08-09 04:35:13

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

如果您想从 Windows 查看 SAMBA 共享,请使用 NET VIEW \\1.2.3.4,其中 1.2.3.4 是您的 Unix 机器的 IP。

The "W" in WMI stands for "Windows," and while SAMBA does a half-decent job at getting server message block (SMB) working, it does not implement WMI on Linux. Not the same interface/protocol unfortunately.

If you want to view SAMBA shares from windows, use NET VIEW \\1.2.3.4 where 1.2.3.4 is the IP of your Unix box.

爱要勇敢去追 2024-08-09 04:35:13

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

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

No.. There is a wmiclient package available for Linux. Using that we can communicate Windows from Linux.

The RPC server is unavailable: We have to start RPC related services and WMI service in Windows machine.

浅浅淡淡 2024-08-09 04:35:13

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

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

The answer is NO - Linux does not have a WMI service.

Get-WMIObject only works against Windows systems (until someone in the Linux community implements WMI!)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文