How To Manage Windows File Shares With PowerShell
Think you can do better? Show us!
Chances are, you are already familiar with managing file share permissions in Windows through the GUI. What happens when you need to manage 10, 20, 100 or more file shares accross multiple servers? Clicking through the GUI would be way too time consuming. PowerShell to the rescue! In this Snip, Matt will take us through some of the *-SmbShare cmdlets available in PowerShell. We will explore using Get-SmbShare to discover file shares that are currently configured and use New-SmbShare, Set-SmbShare and Grant-SmbShareAccess to manage these shares. We will also see how to remove or deny access to a share with the Revoke-SmbShareAccess and Block-SmbShareAccess commands as well. Prerequisites include: 1. PowerShell 3.0 or higher 2. Windows 8/Windows Server 2012 or higher