With the recent release of PowerShell 5.1—part of Windows Management Framework (WMF) 5.1—Microsoft introduced new cmdlets for working with local user and group accounts: Get-LocalUser, New-LocalUser, Remove-LocalUser, New-LocalGroup, Add-LocalGroupMember, and Get-LocalAdministrators. In this article, I will explore how to use these cmdlets by showing a few simple examples as well as how to perform some advanced tasks.

Prior to this release, having to perform tasks with local users and groups from the Windows command line could be cumbersome. It was necessary to revert to commands such as net user, VB scripting, or using the Active Directory Service Interfaces (ADSI) WinNT provider such as Sitaram showed here on 4sysops.

Read more on 4sysops.com

Categories: Technical

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Technical

Restart multiple computers with the PowerShell PCSVDevice module

To restart multiple computers with PowerShell and without relying on functionality of the remote operating system, you can use the PCSVDevice module. The module contains several useful cmdlets for out-of-band management and supports the IPMI Read more…

Technical

Remotely migrate user data with USMT and PowerShell

USMT has been a staple for system administrators for years and has greatly reduced the time to migrate data between computers. USMT has the ability to migrate user files, OS settings, and application settings. It Read more…

Technical

Deploy VMware VMs with PowerCLI and MDT

If you are managing Windows servers, chances are you have a mix of physical and virtual servers in your data center. While VMware provides a method to create VMs from templates to simplify server deployments, Read more…