Managing File Shares

by Jul 31, 2023

Creating a new file share for your network requires Administrator privilege and this PowerShell code:

$Parameters = @{
Name = "Packages"
Path = "C:\Repo1"
FullAccess = "{0}\{1}" -f $env:userdomain, $env:username
}

New-SmbShare @Parameters

Or use classic parameters:

PS> New-SmbShare -Name Packages -Path c:\repo1 -FullAccess 'domain\username' 

Just make sure you run this with Administrator privileges, and make sure the local folder (specified in -Path) does exist.