Creates a share, replacing any existing share with the same name.
Install-SmbShare [-Name] <String> [-Path] <String> [[-Description] <String>] [[-FullAccess] <String[]>] [[-ChangeAccess] <String[]>] [[-ReadAccess] <String[]>] [<CommonParameters>]
Creates a new Windows SMB share, or replaces an existing share with the same name. Optionally grants permissions on that share. Unfortunately, there isn't a way in Carbon to set permissions on a share after it is created. Send us the code!
Permissions don't apply to the file system. They only apply to the share. Use Grant-Permission
to grant file system permissions.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Name | String | The share's name. | true | false | |
Path | String | The path to the share. | true | false | |
Description | String | A description of the share | false | false | |
FullAccess | String[] | The identities who have full access to the share. | false | false | @() |
ChangeAccess | String[] | The identities who have change access to the share. | false | false | @() |
ReadAccess | String[] | The identities who have read access to the share | false | false | @() |
Install-Share -Name TopSecretDocuments -Path C:\TopSecret -Description 'Share for our top secret documents.' -ReadAccess "Everyone" -FullAccess "Analysts"
Shares the C:\TopSecret directory as TopSecretDocuments
and grants Everyone
read access and Analysts
full control.