Minimum rights to list windows shares

0

I need to list remote shares with a NON-admin user.

The user has the NTFS ReadAndExecute permission on folders and the SMB Read permission on shares.

I tried 3 methods:

Get-CimInstance

Get-CimInstance -ClassName Win32_Share
Get-CimInstance : Access denied 
    + CategoryInfo          : PermissionDenied: (root\cimv2:Win32_Share:String) [Get-CimInstance], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041003,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand

Get-SmbShare

Get-SmbShare

Name                       ScopeName Path Description                                                      
----                       --------- ---- -----------                                                      
ADMIN$                     *              Remote Admin                                                     
C$                         *              Default share                                                    
D$                         *              Default share                                                    
home.User1$                *
home.User2$                *    
home.User3$                *

As you can notice, the Path property is empty.

Net Share

Net Share

Net : System error 5 has occurred.
     + CategoryInfo          : NotSpecified: (System error 5 has occurred.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Access is denied.

How can I make this NON-Admin user able to list all shares with their path property.

windows
network-share
asked on Server Fault Aug 5, 2019 by Luke

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0