locked
Command Prompt equivalent of COMPMGMT.MSC - WITHOUT RPC or Get-WMIObject RRS feed

  • Question

  • I am looking query the active sessions to a network share on a SAN server from the command line, where the standard solutions are not available. I have already trawlled the internet for a solution without success,

    Because the SAN server not a true Windows server, there are no Remote Command Prompt or RDP solutions available.
    RPC is not available. The only connection is available through IPC, so it is configured only to be accessible through Computer Management (compmgmt.msc).

    The Computer Management snap-in is able to access this server on our SAN and provide a list of users, the connected machines, and how long they have been connected.
    On a normal server I would be able to use this powershell command to get the same information:
    Get-WmiObject Win32_ServerConnection -ComputerName SERVERNAME | Select-Object ShareName,UserName,ComputerName

    But this standard solution is not available: if it try this command against the server on our SAN I get:
    Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

    Connection to the same server through COMPMGMT.MSC encounters no problems - I get the information I need, but no way to extract it to a parse-able table.

    In short - how does COMPMGMT.MSC communicate over IPC to get this information, and can this be replicated from the command line to get the information in a table that can be parsed from Powershell?
    If this is not available natively in Windows Powershell, which DLLs, entry points and calls would be required to build the code and Powershell wrapper for this?
    Thursday, October 5, 2017 8:35 AM

All replies