Having had to setup and manage a lot of Windows Workgroup clients recently i noticed that without Group Policy this becomes a pain pretty quickly. It is also becoming more common run a Workgroup network as small businesses ditch their servers for cloud services like Office 365 and Box.
As an excuse to write some Powershell i wrapped the most common changes i was making into a module. Bulk changes to local client settings are usually made with Group Policy, but with that unavailable in a Workgroup there are no other built-in options for automating changes.
The module "LocalMachine" can be found in the PowerShell Gallery, and GitHub with some extra details on usage.
LocalMachine
Currently the following cmdlets are available:
New-LocalUser
Get-LocalUser
Set-LocalUser
Remove-LocalUser
Set-LocalAccountPassword
Test-LocalAccountPassword
Add-LocalGroupMember
Get-LocalGroupMember
Remove-LocalGroupMember
New-LocalGroup
Get-LocalGroup
Set-LocalGroup
Remove-LocalGroup
Set-PowerStandbyOptions
Set-RemoteDesktopOptions
Import-RegistryHive
Remove-RegistryHive
The "User" and "Group" cmdlets have all the functionality of the Windows GUI (Computer Management) except for (currently) adding domain users to a local group. The "Set Options" cmdlets provide access to settings that i have found myself changing frequently and under the hood wrap up WMI queries which are not easy to remember. The registry cmdlets can be used to load and unload a registry hive from a file on disk (eg. a users NTUSER.DAT
).
As time allows i will make additions to the "Set Options" cmdlets.
Comments
comments powered by Disqus