Configuring sharing using PowerShell

Managing shares and sessions is possible using PowerShell as well. Windows Server 2016 support for SMB sharing operations is provided via the SmbShare PowerShell module and its cmdlets. The following examples show how you can use the SmbShare cmdlet to get information about the shares.

  • To display the SmbShare commands, type the following commands:
Get-Command -Module SmbShare -name *smbs*

The output of the preceding command is seen in the following screenshot:

  • To list all available shares, you could use Server Manager, but the Get-SmbShare PowerShell command will display all shares on a computer, including ...

Get Installation, Storage, and Compute with Windows Server 2016: Microsoft 70-740 MCSA Exam Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.