PackageDeployment Module Help

Package Deployment Module

New-Share Cmdlet

Version 4.0.0.5

New-Share

Synopsis

Creates a new local or remote file share.

Syntax

New-Share [-ServerName] <String> [-ShareName] <String> [-SharePath] <String> [[-Comment] <String>] [-UserLimit] <String> [[-Context] <String>] [-ContinueOnError] [<CommonParameters>]

Description

Creates a local or remote SMB share.

Parameters

-ServerName <String>

Name of the machine the share is to be created on.

Required

True

Position

1

Accepts pipeline input

False

-ShareName <String>

Name of the share under which the shared path can be accessed.

Required

True

Position

2

Accepts pipeline input

False

-SharePath <String>

Local path of the directory to be shared.

Required

True

Position

3

Accepts pipeline input

False

-Comment <String>

Comment of the share.

Required

False

Position

4

Accepts pipeline input

False

-UserLimit <String>

Maximum number of simultaneous share accesses. -1 for unlimited.

Required

True

Position

5

Accepts pipeline input

False

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution in Service context.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
ComputerPerService: Execution in service context; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

5

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".