New-Share
New-Share
Creates a new file system share. The share can be created on the local or remote computer.
The share is created with the following share permissions:
- Name: Everyone
- Access type: Full access
Settings:
- Server name
Machine on which the new share is to be created. To create the share on the computer running the script, use the name localhost. If you specify the name of a remote computer, WinRM must be enabled on that computer and the account used to run the script must have the appropriate privileges to create the share. - Share name
Name under which the shared directory can be accessed. - Directory you want to share
Local path located on the computer where the share is to be created. - Comments
Comment of the share as it is displayed in the share management. - User limit
Number of users who can access the share simultaneously. Enter -1 to make no explicit limit.
Example:
In the following example, the local directory D:\Sources is shared under the name sources$ on the machine where the command is run.
Corresponds to DSM eScript command:
- CreateShare
See also: