• Uncategorized

    Managing Windows Server 2012 Shares From Powershell

    SMB cmdlets come in two modules. Before you can really use these in powershell you first need to import them. These are called SmbShare and SmbWitness, so to import the modules: Import-Module SmbShare Import-Module SmbWitness Or for short: Import-Module Smb* Once the SMB modules are imported, we’ll start by looking at what shares you’ve got on your system using Get-SmbShare: Get-SmbShare Next, we can create a new share with the minimum two pieces of information required and adding who get’s FullAccess, which is not required: New-SmbShare -Name BAK -Path E:BAK -FullAccess krypted Then we can provide a little more information if we so choose. Here, I’m going to add a…