Benutzer:MovGP0/Core Server/SMB
aus Wikipedia, der freien Enzyklopädie
Server Message Block (SMB) Fileshares
SMB Share am Server Einrichten
PS |
cmd |
Beschreibung
|
Get-SmbShare |
net share
|
Get-SmbShare | select Name,CurrentUsers |
|
New-SmbShare -Name "Tools" -LocalPath "D:\tools" -RemotePath "\\foobar.local\sharename" -ContinuouslyAvailable -ReadAccess "DOMAIN\USERNAME"
|
net share "Tools"="D:\tools"; icacls "D:\tools" /grant "DOMAIN\USERNAME" R:
|
Remove-SmbShare -Name "Tools"
|
net share "Tools" -Delete
|
Get-SmbShare -Name 'repository$' | Get-SmbShareAccess |
|
Kontrolle welche Benutzer und Benutzergruppen Zugriff haben
|
SMB Share am Klient Einbinden
PS |
cmd
|
Get-SmbMapping |
net use
|
New-SmbMapping -LocalPath "Z:" -RemotePath "\\foobar.local\sharename"
|
net use Z: "\\foobar.local\sharename" -persistent:yes
|
New-SmbMapping -LocalPath "Z:" -RemotePath "\\foobar.local\sharename" -Username 'DOMAIN\USER' -Password 'PASSWORD' -SaveCredentials
|
net use Z: "\\foobar.local\sharename" /user:DOMAIN\USERNAME
|
Remove-SmbMapping "Z:" -UpdateProfile -Force
|
net use Z: -delete
|
|