Connect-SmbShare
PackageDeployment Module Help |
Package Deployment Module |
Connect-SmbShare Cmdlet |
Version 4.0.0.5 |
Connect-SmbShare
Synopsis
Connects a SMB share to a network drive (net use)
Syntax
Connect-SmbShare [-ShareName] <String> [[-Username] <String>] [[-Password] <String>] [[-Drive] <String>] [-Persistent] [-PreventUninstall] [[-Context] <String>] [-ContinueOnError] [<CommonParameters>]
Description
Connects a SMB share to a network drive (net use).
Parameters
-SmbShare <String> |
||||||
The resource to access. |
||||||
|
-UserName <String> |
||||||
The user account under which the connection should be established. Data can be input as follows: <Username> , <Domain>\<Username> |
||||||
|
-Password <String> |
||||||
The password for the selected user account |
||||||
|
-Drive <String> |
||||||
The drive letter to assign |
||||||
|
-Persistent <SwitchParameter> |
||||||
If used, the drive will be connected permanently (will be reconnected after a reboot) |
||||||
|
-PreventUninstall <SwitchParameter> |
||||||
If used, the drive will not be disconnected during uninstall |
||||||
|
-Context <String> |
||||||
User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user. |
||||||
|
-ContinueOnError <SwitchParameter> |
||||||
If switch is used the script won't abort if an error occurs |
||||||
|
<CommonParameters> |
For more information about common parameters, type "Get-Help about_CommonParameters". |