Skip to content

Commit 3efd48c

Browse files
committed
Updated Set-SmbServerConfiguration example
1 parent ec40634 commit 3efd48c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docset/winserver2022-ps/smbshare/Set-SmbServerConfiguration.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,18 @@ This command sets the SMB Service configuration without user confirmation.
6464
### Example 2: Turn on SMB signing and encryption
6565

6666
```powershell
67-
Set-SmbServerConfiguration -RequireSecuritySignature $True -EnableSecuritySignature $True -EncryptData $True -Confirm:$false
68-
```
69-
70-
This command turns on SMB signing and encryption without user confirmation.
67+
$Parameters = @{
68+
RequireSecuritySignature = $True
69+
EnableSecuritySignature = $True
70+
EncryptData = $True
71+
Confirm = $false
72+
}
73+
Set-SmbServerConfiguration @Parameters
74+
```
75+
76+
This command turns on SMB signing and encryption without user confirmation. This example uses
77+
splatting to pass parameter values from the '$Parameters' variable to the command. Learn more about
78+
[Splatting](/powershell/module/microsoft.powershell.core/about/about_splatting).
7179

7280
### Example 3: Turn off the default server and workstations shares
7381

0 commit comments

Comments
 (0)