Use PowerShell to List SMB Shares on Linux

I can list my own shared computer resources without problems:

gwmi Win32_Share

But when I try

gwmi Win32_Share -computer myserver

Where myserveris the HP MediaVault mv2120 working with BusyBox. I am returning the answer:Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

Is there any way to do this?

+3
source share
3 answers

β€œW” in WMI means β€œWindows,” and while SAMBA does semi-decent work with Message Server (SMB), it does not implement WMI on Linux. Unfortunately, not the same interface / protocol.

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

+4
source

. Linux wmiclient. , Windows Linux.

RPC : , RPC, WMI Windows.

+2

Answer NO: Linux does not have a WMI service.

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

0
source

Source: https://habr.com/ru/post/1715785/


All Articles