Skip to content

Commit 1258c19

Browse files
authored
Merge pull request MicrosoftDocs#3580 from MicrosoftDocs/main
Publish 07/31/2023, 3:30 PM
2 parents 6b2eb00 + 869e85f commit 1258c19

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

docset/winserver2022-ps/smbshare/Get-SmbShare.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,17 @@ The **Get-SmbShare** cmdlet retrieves objects that represent the Server Message
3030

3131
## EXAMPLES
3232

33-
### Example 1: Get SMB shares
33+
### Example 1: Get SMB shares on a local computer
3434
```
3535
PS C:\>Get-SMBShare
3636
Name ScopeName Path Description
3737
---- --------- ---- -----------
3838
ADMIN$ * C:\Windows Remote Admin
3939
C$ * C:\ Default share
40-
ClusterStorage$ Contoso-SO C:\ClusterStorage Cluster Shared Volumes Def...
4140
D$ * D:\ Default share
4241
F$ * F:\ Default share
43-
G$ * G:\ Default share
44-
H$ * H:\ Default share
45-
I$ Contoso-FS I:\ Cluster Default Share
46-
I$ * I:\ Default share
4742
IPC$ * Remote IPC
48-
J$ Contoso-FS J:\ Cluster Default Share
49-
J$ * J:\ Default share
50-
K$ * K:\ Default share
51-
L$ * L:\ Default share
52-
M$ * M:\ Default share
53-
N$ * N:\ Default share
54-
VMS1 Contoso-FS I:\VMS
55-
VMS2 Contoso-FS J:\VMS
56-
VMS3 Contoso-SO C:\ClusterStorage\Volume1\VMS
57-
VMS4 Contoso-SO C:\ClusterStorage\Volume2\VMS
58-
VMS5 * D:\VMS
43+
VMS1 * I:\VMS
5944
```
6045

6146
This command retrieves the SMB shares on the computer.
@@ -65,21 +50,29 @@ This command retrieves the SMB shares on the computer.
6550
PS C:\>Get-SmbShare -Name "VMS1"
6651
Name ScopeName Path Description
6752
---- --------- ---- -----------
68-
VMS1 Contoso-FS I:\VMS
53+
VMS1 * I:\VMS
6954
```
7055

7156
This command retrieves information about the SMB share named 'VMS1' on the local computer.
7257

73-
### Example 3: Display information about the SMB share named 'VMS1' on the local computer in a list
58+
### Example 3: Display information about the SMB shares on a remote computer
7459
```
75-
PS C:\>Get-SmbShare -Name "VMS1" | Format-List
76-
Name : VMS1
77-
ScopeName : Contoso-FS
78-
Path : I:\VMS
79-
Description :
60+
PS C:\>get-smbshare -CimSession "NEDFS1"
61+
62+
Name ScopeName Path Description PSComputerName
63+
---- --------- ---- ----------- --------------
64+
ADMIN$ * C:\Windows Remote Admin ae-dfsr-sr-01
65+
C$ * C:\ Default share ae-dfsr-sr-01
66+
D$ * D:\ Default share ae-dfsr-sr-01
67+
E$ * E:\ Default share ae-dfsr-sr-01
68+
IPC$ * Remote IPC ae-dfsr-sr-01
69+
IT dept * D:\data\IT dept ae-dfsr-sr-01
70+
procedures * D:\hr\procedures ae-dfsr-sr-01
71+
VHD and ISO * D:\data\VHD and ISO ae-dfsr-sr-01
72+
8073
```
8174

82-
This command displays the information about the SMB share named 'VMS1' on the local computer as a formatted list.
75+
This command displays the information about the SMB shares on the remote computer NEDFS1.
8376

8477
### Example 4: Display all properties about a specific SMB share on the local computer in a list
8578
```
@@ -99,7 +92,7 @@ EncryptData : False
9992
Name : VMS1
10093
Path : I:\VMS
10194
Scoped : True
102-
ScopeName : Contoso-FS
95+
ScopeName : *
10396
SecurityDescriptor : O:BAG:DUD:(A;;FA;;;S-1-5-21-219828122-4198910963-4161819395-500)(A;;FA;;;S-1-5-21-219828122-419
10497
8910963-4161819395-1106)(A;;FA;;;S-1-5-21-219828122-4198910963-4161819395-1109)
10598
ShadowCopy : False
@@ -114,7 +107,7 @@ CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
114107

115108
This command displays all of the information about the SMB share named 'VMS1' on the local computer as a formatted list.
116109

117-
### Example 5: Get shares on the local computer that have scaled out availability
110+
### Example 5: Get shares on the local failover cluster computer that have scale out availability
118111
```
119112
PS C:\>Get-SmbShare | Where-Object -Property AvailabilityType -Eq ScaleOut
120113
Name ScopeName Path Description
@@ -126,7 +119,7 @@ VMS4 Contoso-SO C:\ClusterStorage\Vo
126119

127120
This command retrieves the SMB shares on the computer that have scaled out availability.
128121

129-
### Example 6: Get shares that are connected to a specific server
122+
### Example 6: Get shares that are connected to a local failover cluster file server resource named "Contoso-FS"
130123
```
131124
PS C:\>Get-SmbShare -ScopeName "Contoso-FS"
132125
Name ScopeName Path Description
@@ -137,7 +130,7 @@ VMS1 Contoso-FS I:\VMS
137130
VMS2 Contoso-FS J:\VMS
138131
```
139132

140-
This command retrieves the SMB shares on the computer that are connected to the SMB server named Contoso-FS.
133+
This command retrieves the SMB shares on the Windows Server failover cluster that are connected to the clustered file server resource named Contoso-FS.
141134

142135
## PARAMETERS
143136

@@ -342,7 +335,7 @@ Accept wildcard characters: False
342335
```
343336
344337
### -ScopeName
345-
Specifies the scope of the share by name.
338+
Specifies the scope of the share by name. For use with Windows Server failover cluster file server resources.
346339
347340
```yaml
348341
Type: String[]

0 commit comments

Comments
 (0)