#PSTip How to create a share in Windows Server 2012
Quite easy, with a one-liner. Windows Server 2012 provides Windows PowerShell cmdlets and WMI objects to manage SMB file servers and SMB file shares. The SMB cmdlets are packaged into two modules called SmbShare and SmbWitness. These modules are automatically loaded (thanks to new module auto-loading feature) whenever you refer to any of the contained cmdlets. No upfront configuration is required. (Note: Check the output of the Get-Module command before and after you run the following one-liner to see that SmbShare module is loaded behind the scenes.)
New-SmbShare –Name MyShare –Path C:\Test –Description 'Test Shared Folder' –FullAccess Administrator –ReadAccess EveryoneShare on: