This is the built-in help made by Microsoft for the command 'Get-SmbShare', in PowerShell version 4 - as retrieved from
Windows version 'Microsoft Windows 8.1 Enterprise' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Retrieves the Server Message Block (SMB) shares on the computer.
Get-SmbShare [[-Name] <String[]>] [[-ScopeName] <String[]>] [-AsJob] [-AvailabilityType <AvailabilityType[]>] [-CachingMode <CachingMode[]>] [-CaTimeout <UInt32[]>] [
-CimSession <CimSession[]>] [-ConcurrentUserLimit <UInt32[]>] [-ContinuouslyAvailable <Boolean[]>] [-EncryptData <Boolean[]>] [-FolderEnumerationMode <FolderEnumerati
onMode[]>] [-IncludeHidden] [-Scoped <Boolean[]>] [-ShareState <ShareState[]>] [-Special <Boolean[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
The Get-SMBShare cmdlet retrieves objects that represent the Server Message Block (SMB) shares being displayed by the computer.
<
Online Version: http://go.microsoft.com/fwlink/?LinkId=289540
New-SmbShare
Remove-SmbShare
Set-SmbShare
<
EXAMPLE 1
PS C:\>Get-SMBShare
Name ScopeName Path Description
---- --------- ---- -----------
ADMIN$ * C:\Windows Remote Admin
C$ * C:\ Default share
ClusterStorage$ Contoso-SO C:\ClusterStorage Cluster Shared Volumes Def...
D$ * D:\ Default share
F$ * F:\ Default share
G$ * G:\ Default share
H$ * H:\ Default share
I$ Contoso-FS I:\ Cluster Default Share
I$ * I:\ Default share
IPC$ * Remote IPC
J$ Contoso-FS J:\ Cluster Default Share
J$ * J:\ Default share
K$ * K:\ Default share
L$ * L:\ Default share
M$ * M:\ Default share
N$ * N:\ Default share
VMS1 Contoso-FS I:\VMS
VMS2 Contoso-FS J:\VMS
VMS3 Contoso-SO C:\ClusterStorage\Volume1\VMS
VMS4 Contoso-SO C:\ClusterStorage\Volume2\VMS
VMS5 * D:\VMS
This example retrieves the SMB shares on the computer.
EXAMPLE 2
PS C:\>Get-SmbShare –Name VMS1
Name ScopeName Path Description
---- --------- ---- -----------
VMS1 Contoso-FS I:\VMS
This example retrieves the SMB shares on the computer named VMS1.
EXAMPLE 3
PS C:\>Get-SmbShare –Name VMS1 | Format-List
Name : VMS1
ScopeName : Contoso-FS
Path : I:\VMS
Description :
This example displays the information about the SMB shares on the computer named VMS1.
EXAMPLE 4
PS C:\>Get-SmbShare –Name VMS1 | Format-List –Property *
PresetPathAcl : System.Security.AccessControl.DirectorySecurity
ShareState : Online
AvailabilityType : Clustered
ShareType : FileSystemDirectory
FolderEnumerationMode : Unrestricted
CachingMode : Manual
CATimeout : 0
ConcurrentUserLimit : 0
ContinuouslyAvailable : True
CurrentUsers : 3
Description :
EncryptData : False
Name : VMS1
Path : I:\VMS
Scoped : True
ScopeName : Contoso-FS
SecurityDescriptor : O:BAG:DUD:(A;;FA;;;S-1-5-21-219828122-4198910963-4161819395-500)(A;;FA;;;S-1-5-21-219828122-419
8910963-4161819395-1106)(A;;FA;;;S-1-5-21-219828122-4198910963-4161819395-1109)
ShadowCopy : False
Special : False
Temporary : False
Volume : \\?\Volume{b02c4ba7-e6f1-11e1-93eb-0008a1c0ef0d}\
PSComputerName :
CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbShare
CimInstanceProperties : {AvailabilityType, CachingMode, CATimeout, ConcurrentUserLimit...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
This example displays all of the information about the SMB shares on the computer named VMS1.
EXAMPLE 5
PS C:\>Get-SmbShare | Where-Object -Property AvailabilityType -Eq ScaleOut
Name ScopeName Path Description
---- --------- ---- -----------
ClusterStorage$ Contoso-SO C:\ClusterStorage Cluster Shared Volumes Def...
VMS3 Contoso-SO C:\ClusterStorage\Volume1\VMS
VMS4 Contoso-SO C:\ClusterStorage\Volume2\VMS
This example retrieves the SMB shares on the computer with scaled out availability.
EXAMPLE 6
PS C:\>Get-SmbShare -ScopeName Contoso-FS
Name ScopeName Path Description
---- --------- ---- -----------
I$ Contoso-FS I:\ Cluster Default Share
J$ Contoso-FS J:\ Cluster Default Share
VMS1 Contoso-FS I:\VMS
VMS2 Contoso-FS J:\VMS
This example retrieves the SMB shares on the computer that are connect to the SMB server named Contoso-FS.