As of 2015, are there any simple CmdLets, either in an MS module or a community project, for managing roles and permissions and ACLs, as easy to use as the old DOS commands, e.g. net localgroup
?
I don't mean to ask the same thing over and over, answered in myriad ways all across the web, but I'm a programmer and former IT pro for large enterprise estates, I have written many CmdLets in C# for all kinds of stuff.
I've always thought that the 'UX' for many of the simplest automation tasks has been overly arduous, needing every IT shop to churn out the same helper scripts, and wondered if it had been solved yet.
An example is this:
# CreateLocalGroup.ps1
$cn = [ADSI]"WinNT://edlt"
$group = $cn.Create("Group","mygroup")
$group.setinfo()
$group.description = "Test group"
$group.SetInfo()
Which isn't hard, per se, but considering that this has got to be a top 10 use-case for PS, I'm amazed there isn't a simple CmdLet for it - only one of my programmer colleagues at this gig knew what ADSI is, sort of.
Yes and no.
If you are running Windows 10 or Server 2016 and newer the Microsoft.PowerShell.LocalAccounts module is available for use.
However on Windows 8.1 or Server 2012 R2 and older you'll still have to use the old methods for local account administration event if you update to PowerShell 5 or later.