Skip to content

Commit 0b2b990

Browse files
authored
Merge pull request #3787 from Xelu86/Update_SmbMapping
Added new parameters for SmbMapping
2 parents ea6c458 + 2a6dfb7 commit 0b2b990

File tree

3 files changed

+262
-88
lines changed

3 files changed

+262
-88
lines changed

docset/winserver2025-ps/smbshare/Get-SmbMapping.md

+43-24
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: SmbMapping.cdxml-help.xml
44
Module Name: SmbShare
5-
ms.date: 12/20/2016
5+
ms.date: 02/22/2024
66
online version: https://learn.microsoft.com/powershell/module/smbshare/get-smbmapping?view=windowsserver2025-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-SmbMapping
@@ -21,14 +21,17 @@ Get-SmbMapping [[-LocalPath] <String[]>] [[-RemotePath] <String[]>] [-CimSession
2121
```
2222

2323
## DESCRIPTION
24-
The **Get-SmbMapping** cmdlet retrieves the Server Message Block (SMB) client directory mappings created for a server.
25-
This can be a mapping from a local drive letter to a remote shared folder, or it can be a mapping without a local path.
24+
25+
The `Get-SmbMapping` cmdlet retrieves the Server Message Block (SMB) client directory mappings
26+
created for a server. This can be a mapping from a local drive letter to a remote shared folder, or
27+
it can be a mapping without a local path.
2628

2729
## EXAMPLES
2830

2931
### Example 1: Get SMB client directory mappings
30-
```
31-
PS C:\>Get-SmbMapping
32+
33+
```powershell
34+
Get-SmbMapping
3235
Status Local Path Remote Path
3336
------ ---------- -----------
3437
OK X: \\Contoso-SO\VMFiles
@@ -38,8 +41,9 @@ OK Y:
3841
This command retrieves the SMB client directory mappings created for the SMB server.
3942

4043
### Example 2: Get SMB client directory mapping for a directory
41-
```
42-
PS C:\>Get-SmbMapping -LocalPath X: | Select-Object -Property *
44+
45+
```powershell
46+
Get-SmbMapping -LocalPath "X:" | Select-Object -Property *
4347
Status : OK
4448
LocalPath : X:
4549
RemotePath : \\Contoso-SO\VMFiles
@@ -49,12 +53,15 @@ CimInstanceProperties : {LocalPath, RemotePath, Status}
4953
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
5054
```
5155

52-
This command retrieves the SMB client directory mapping for the X: directory created for the SMB server.
56+
This command retrieves the SMB client directory mapping for the **X:** directory created for the SMB
57+
server.
5358

5459
## PARAMETERS
5560

5661
### -AsJob
57-
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
62+
63+
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to
64+
complete.
5865

5966
```yaml
6067
Type: SwitchParameter
@@ -69,9 +76,11 @@ Accept wildcard characters: False
6976
```
7077
7178
### -CimSession
72-
Runs the cmdlet in a remote session or on a remote computer.
73-
Enter a computer name or a session object, such as the output of a [New-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227967) or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet.
74-
The default is the current session on the local computer.
79+
80+
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session
81+
object, such as the output of a [New-CimSession](/powershell/module/cimcmdlets/get-cimsession)
82+
or [Get-CimSession](/powershell/module/cimcmdlets/get-cimsession) cmdlet. The default is the
83+
current session on the local computer.
7584
7685
```yaml
7786
Type: CimSession[]
@@ -86,6 +95,7 @@ Accept wildcard characters: False
8695
```
8796
8897
### -LocalPath
98+
8999
Specifies the local path used to map the remote path on this computer.
90100
91101
```yaml
@@ -101,7 +111,8 @@ Accept wildcard characters: False
101111
```
102112
103113
### -RemotePath
104-
Specifies the remote path that is accessed from this computer.
114+
115+
Specifies the remote path that's accessed from this computer.
105116
106117
```yaml
107118
Type: String[]
@@ -116,9 +127,12 @@ Accept wildcard characters: False
116127
```
117128
118129
### -ThrottleLimit
119-
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
120-
If this parameter is omitted or a value of `0` is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
121-
The throttle limit applies only to the current cmdlet, not to the session or to the computer.
130+
131+
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If
132+
this parameter is omitted or a value of `0` is entered, then Windows PowerShell calculates an
133+
optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the
134+
computer. The throttle limit applies only to the current cmdlet, not to the session or to the
135+
computer.
122136

123137
```yaml
124138
Type: Int32
@@ -133,24 +147,29 @@ Accept wildcard characters: False
133147
```
134148

135149
### CommonParameters
136-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
150+
151+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
152+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
153+
-WarningAction, and -WarningVariable. For more information, see
154+
[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).
137155

138156
## INPUTS
139157

140-
### None
158+
### System.String[]
141159

142160
## OUTPUTS
143161

144162
### Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/SMB/MSFT_SmbMapping
145-
The `Microsoft.Management.Infrastructure.CimInstance` object is a wrapper class that displays Windows Management Instrumentation (WMI) objects.
146-
The path after the pound sign (`#`) provides the namespace and class name for the underlying WMI object.
147-
This cmdlet returns a **MSFT_SmbMapping** object that represents the mappings created from the SMB client to SMB shares.
163+
164+
The `Microsoft.Management.Infrastructure.CimInstance` object is a wrapper class that displays
165+
Windows Management Instrumentation (WMI) objects. The path after the pound sign (`#`) provides the
166+
namespace and class name for the underlying WMI object. This cmdlet returns a **MSFT_SmbMapping**
167+
object that represents the mappings created from the SMB client to SMB shares.
148168

149169
## NOTES
150170

151171
## RELATED LINKS
152172

153-
[New-SmbMapping](./New-SmbMapping.md)
154-
155-
[Remove-SmbMapping](./Remove-SmbMapping.md)
173+
[New-SmbMapping](New-SmbMapping.md)
156174

175+
[Remove-SmbMapping](Remove-SmbMapping.md)

0 commit comments

Comments
 (0)