1

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:

http://blogs.technet.com/b/heyscriptingguy/archive/2014/10/02/use-powershell-to-create-local-groups.aspx

# 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.

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .