Win32_Share

The Win32_Share class represents a shared resource on a Win32 system. This may be a disk drive, printer, interprocess communication, or other shareable device.

Example: C:\PUBLIC.

Quick Start

Properties

In this WMI class, all WMI properties are read-only. You can only read values but not change them.

AccessMask

Data type UInt32

This property has been deprecated in favour of the GetAccessMask method of this class due to the expense of calling GetEffectiveRightsFromAcl. The value will be set to NULL

AllowMaximum

Data type Boolean

The AllowMaximum property indicates whether the number of concurrent users for this resource has been limited.

Values: $true or $false. A value of $true indicates the number of concurrent users of this resource has not been limited and the value in the MaximumAllowed property is ignored.

Caption

Data type String

The Caption property is a short textual description (one-line string) of the object.

Description

Data type String

The Description property provides a textual description of the object.

FileName

Data type String

The FileName input parameter is a string representing the fully qualified name of the copy of the file (or directory). Example: c:\temp\newdirectory.

InstallDate

Data type DateTime

The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.

MaximumAllowed

Data type UInt32

The MaximumAllowed property indicates the limit on the maximum number of users allowed to use this resource concurrently. The value is only valid if the AllowMaximum member set to $false

Example: 10.

Name

Data type String

The Name property indicates the alias given to a path set up as a share on a Win32 system.

Example: public.

Path

Data type String

The Path property indicates the local path of the Win32 share.

Example: C:\Program Files

Recursive

Data type Boolean

The Recursive input parameter is a boolean that indicates whether the copy will be applied recursively to files and directories within the directory specified by the CIM_LogicalFile instance.Note for file instances the Recursive input parameter is ignored.

StartFileName

Data type String

The StartFileName input parameter is a string that names the child file/directory to use as a starting point for CopyEx.The StartFileName property typically, is the StopFileName parameter specifying the file or directory at which anerror occurred from the previous method call. If this parameter is NULL, the operation is performed on the file ordirectory specified in the ExecMethod call.

Status

Data type String

The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are “OK”, “Degraded” and “Pred Fail”. “Pred Fail” indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are “Error”, “Starting”, “Stopping” and “Service”. The latter, “Service”, could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither “OK” nor in one of the other states.

'OK','Error','Degraded','Unknown','Pred Fail','Starting','Stopping','Service','Stressed','NonRecover','No Contact','Lost Comm'

Type

Data type UInt32

The Type property specifies the type of resource being shared. Types include disk drives, print queues, interprocess communications (IPC), and general devices.

$Type_ReturnValue = 
@{
    0='Disk Drive'
    1='Print Queue'
    2='Device'
    3='IPC'
  2147483648='Disk Drive Admin'
  2147483649='Print Queue Admin'
  2147483650='Device Admin'
  2147483651='IPC Admin'
}

Examples

See Also

Help and Questions

  Community Content

You are cordially invited to add knowledge to this page. If you have sample code or additional information related to this WMI class, please share it. Use the comment form to send your information. We will edit and incorparate it into the reference library. Thank you!

Please do not use the comment form to submit questions. If you have questions or need assistance, visit our free forum: Help me with WMI.

Content last updated: 2013-12-27 12:22:01 (UTC).

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin