lang/ps/ SmbShares
As easy as
New-SmbShare -Name myshare -Path c:\path\to\files
and
Get-Help Grant-SmbShareAccess
Grant-SmbShareAccess -Name Flibble -AccountName mrflibble -AccessRight Full
and to delete:
Remove-SmbShare -Name Users
and using pipes (this can be used to remove multiple shares in one line)
Get-SmbShare -Name Users | ForEach { Remove-SmbShare -Name $_.Name }