lsshare

displays information about a share 

Command


SYNOPSIS

lsshare [-ahlPprTtuv] [-S hostname] [-n sharename]... [//hostname/sharename]


DESCRIPTION

The lsshare utility displays information about one or more shares. If the -n sharename option is specified, only information about that share is displayed; otherwise, information about all shares on the machine is displayed.

Normally, lsshare displays the name, type, and associated remark for a share are reported, although additional information can be displayed by specifying appropriate options. However, displaying this additional information requires appropriate permissions on the machine where the share resides.

Output fields displayed by lsshare are separated by tabs.

Options

-a access 

displays share level permissions for the specified shares. This option is only relevant for shares that reside on Windows 95/98/Me systems; it is ignored when dealing with shares that reside on 8.1/2012R2/10/2016/2019/11/2022 systems. Shares on 8.1/2012R2/10/2016/2019/11/2022 systems use individual user permissions rather than share level permissions. When working on a 8.1/2012R2/10/2016/2019/11/2022 system, you can use the lsacl utility to list the user permissions assigned to a share that resides on a 8.1/2012R2/10/2016/2019/11/2022 system.

-h 

displays information about hidden shares. Normally, hidden shares are not displayed.

-l 

(long form) displays all information about the specified shares. This is equivalent to -ahPprtu.

Because information on current uses and maximum uses is not available for drives that are shared on Windows 95/98/Me systems, this option always displays this information as 0:U for such drrives.

-n sharename 

specifies the name of the share about which information is to be displayed. If sharename is a UNC name of the form //hostname/name, the effect is the same as specifying -S hostname -n name. You can specify multiple -n options to display information about mulitple shares.

If you do not specify this option, lsshare displays information about all shares on the machine.

-P 

displays the persistence of the specified shares.

-p 

displays the remote path of the displayed shares.

-r 

displays the remark associated with each specified share.

-S hostname 
-S //hostname 

Specifies a remote machine. If this option is not specified (and a UNC name is not used for -n sharename), lsshare displays information about shares on the local machine.

You can use either hostname or //hostname to specify the name of the remote machine. Both syntaxes refer to the same machine.

Note:

When running this utility on a 8.1/2012R2/10/2016/2019/11/2022 system and using the -S to specify a remote Windows 95/98/Me system, some operations may fail, due to limitations in those older operating systems.

-T 

separates output fields with a tab character.

-t 

displays the type of each specified share.

-u 

displays the maximum number of concurrent uses allowed for the specified shares. Because this information is not available for drives that are shared on Windows 95/98/Me systems, this option always displays 0:U for such drrives.

-v 

attempts to list connections to each sharename. If the system sharing the resource is running with user-level security, the output describes which user made each connection. If that system is running with share-level security, the output describes which computer made each connection.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

An error occurred.

2 

A usage error occurred.


PORTABILITY

Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
lsacl, mkshare, rmshare


PTC MKS Toolkit 10.4 Documentation Build 39.