Skip to content

Commit 2781eef

Browse files
authored
Merge pull request #1371 from msbemba/patch-43
Update Grant-SmbShareAccess.md
2 parents ec72cde + d7b08d5 commit 2781eef

File tree

2 files changed

+34
-18
lines changed

2 files changed

+34
-18
lines changed

docset/winserver2012-ps/smbshare/Grant-SmbShareAccess.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Adds an allow access control entry (ACE) for a trustee to the security descripto
1616

1717
## SYNTAX
1818

19-
### UNNAMED_PARAMETER_SET_1
19+
### Query
2020
```
2121
Grant-SmbShareAccess [-AccessRight <ShareAccessRight>] [-AccountName <String[]>] [-AsJob]
2222
[-CimSession <CimSession[]>] [-Force] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm]
2323
[-WhatIf]
2424
```
2525

26-
### UNNAMED_PARAMETER_SET_2
26+
### InputObject (cdxml)
2727
```
2828
Grant-SmbShareAccess [-Name] <String[]> [[-ScopeName] <String[]>] [-AccessRight <ShareAccessRight>]
2929
[-AccountName <String[]>] [-AsJob] [-CimSession <CimSession[]>] [-Force] [-ThrottleLimit <Int32>] [-Confirm]
@@ -35,27 +35,26 @@ The **Grant-SmbShareAccess** cmdlet adds an allow access control entry (ACE) for
3535

3636
## EXAMPLES
3737

38-
### Example 1
38+
### Example 1: Adds an allow ACE for a trustee
3939
```
40-
PS C:\>Grant-SmbShareAccess -Name VMFiles -AccountName Contoso\Contoso-HV2$ -AccessRight Full
40+
PS C:\>Grant-SmbShareAccess -Name "VMFiles" -AccountName "Contoso\Contoso-HV2$" -AccessRight Full
4141
Confirm
4242
Are you sure you want to perform this action?
4343
Performing operation 'Modify' on Target 'Contoso-SO,VMFiles'.
4444
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
45-
45+
4646
Name ScopeName AccountName AccessControlType AccessRight
4747
---- --------- ----------- ----------------- -----------
4848
VMFiles Contoso-SO Contoso\Administrator Allow Full
4949
VMFiles Contoso-SO Contoso\Contoso-HV1$ Allow Full
5050
VMFiles Contoso-SO Contoso\Contoso-HV2$ Allow Full
5151
```
5252

53-
This example adds an allow ACE for a trustee to the security descriptor of the SMB share named VMFiles for the account named Contoso\Contoso-HV2$.
53+
This command adds an allow ACE for a trustee to the security descriptor of the SMB share named VMFiles for the account named Contoso\Contoso-HV2$.
5454

55-
### Example 2
55+
### Example 2: Adds an allow ACE for a trustee without confirmation
5656
```
5757
PS C:\>Grant-SmbShareAccess -Name VMFiles -AccountName "Contoso\Domain Admins" -AccessRight Change -Force
58-
5958
Name ScopeName AccountName AccessControlType AccessRight
6059
---- --------- ----------- ----------------- -----------
6160
VMFiles Contoso-SO Contoso\Administrator Allow Full
@@ -64,7 +63,7 @@ VMFiles Contoso-SO Contoso\Contoso-HV2$ Allow
6463
VMFiles Contoso-SO Contoso\Domain Admins Allow Change
6564
```
6665

67-
This example adds an allow ACE for a trustee to the security descriptor of the SMB share named VMFiles for the account named Contoso\Contoso-HV2$ without user confirmation.
66+
This command adds an allow ACE for a trustee to the security descriptor of the SMB share named VMFiles for the account named Contoso\Contoso-HV2$ without user confirmation.
6867

6968
## PARAMETERS
7069

@@ -210,6 +209,23 @@ Accept pipeline input: False
210209
Accept wildcard characters: False
211210
```
212211

212+
### -SmbInstance
213+
Specifies the input to this cmdlet.
214+
You can use this parameter, or you can pipe the input to this cmdlet.
215+
216+
```yaml
217+
Type: SmbInstance
218+
Parameter Sets: Query
219+
Aliases:
220+
Accepted values: Default, CSV, SBL, SR
221+
222+
Required: False
223+
Position: Named
224+
Default value: None
225+
Accept pipeline input: True (ByPropertyName)
226+
Accept wildcard characters: False
227+
```
228+
213229
### -Confirm
214230
Prompts you for confirmation before running the cmdlet.
215231

docset/winserver2012r2-ps/smbshare/Grant-SmbShareAccess.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,26 @@ The **Grant-SmbShareAccess** cmdlet adds an allow access control entry (ACE) for
4343

4444
## EXAMPLES
4545

46-
### Example 1
46+
### Example 1: Adds an allow ACE for a trustee
4747
```
48-
PS C:\>Grant-SmbShareAccess -Name VMFiles -AccountName Contoso\Contoso-HV2$ -AccessRight Full
48+
PS C:\>Grant-SmbShareAccess -Name "VMFiles" -AccountName "Contoso\Contoso-HV2$" -AccessRight Full
4949
Confirm
5050
Are you sure you want to perform this action?
5151
Performing operation 'Modify' on Target 'Contoso-SO,VMFiles'.
5252
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
53-
53+
5454
Name ScopeName AccountName AccessControlType AccessRight
5555
---- --------- ----------- ----------------- -----------
5656
VMFiles Contoso-SO Contoso\Administrator Allow Full
5757
VMFiles Contoso-SO Contoso\Contoso-HV1$ Allow Full
5858
VMFiles Contoso-SO Contoso\Contoso-HV2$ Allow Full
5959
```
6060

61-
This example adds an allow ACE for a trustee to the security descriptor of the SMB share named VMFiles for the account named Contoso\Contoso-HV2$.
61+
This command adds an allow ACE for a trustee to the security descriptor of the SMB share named VMFiles for the account named Contoso\Contoso-HV2$.
6262

63-
### Example 2
63+
### Example 2: Adds an allow ACE for a trustee without confirmation
6464
```
6565
PS C:\>Grant-SmbShareAccess -Name VMFiles -AccountName "Contoso\Domain Admins" -AccessRight Change -Force
66-
6766
Name ScopeName AccountName AccessControlType AccessRight
6867
---- --------- ----------- ----------------- -----------
6968
VMFiles Contoso-SO Contoso\Administrator Allow Full
@@ -72,7 +71,7 @@ VMFiles Contoso-SO Contoso\Contoso-HV2$ Allow
7271
VMFiles Contoso-SO Contoso\Domain Admins Allow Change
7372
```
7473

75-
This example adds an allow ACE for a trustee to the security descriptor of the SMB share named VMFiles for the account named Contoso\Contoso-HV2$ without user confirmation.
74+
This command adds an allow ACE for a trustee to the security descriptor of the SMB share named VMFiles for the account named Contoso\Contoso-HV2$ without user confirmation.
7675

7776
## PARAMETERS
7877

@@ -218,13 +217,14 @@ Accept wildcard characters: False
218217
```
219218
220219
### -SmbInstance
221-
{{Fill SmbInstance Description}}
220+
Specifies the input to this cmdlet.
221+
You can use this parameter, or you can pipe the input to this cmdlet.
222222
223223
```yaml
224224
Type: SmbInstance
225225
Parameter Sets: Query
226226
Aliases:
227-
Accepted values: Default, CSV
227+
Accepted values: Default, CSV, SBL, SR
228228

229229
Required: False
230230
Position: Named

0 commit comments

Comments
 (0)