Get-LocalGroupMember PowerShell cmdlet issues - An unspecified error occurred: error code = 1789

We've recently been working on the new local account management PowerShell cmdlets and found an issue with the Get-LocalGroupMember cmdlet

If a user group has a member that cannot be resolved normally most APIs will return just the SID of the account, and certainly the Computer Management MMC shows the user as the SID and as an unknown account.


Unfortunately the  Get-LocalGroupDetails PowerShell cmdlet fails completely with the following error



 Get-LocalGroupDetails. An unspecified error occurred: error code = 1789

If you use an -ErrorAction SilentlyContinue parameter the cmdlet will return with no members which is obviously misleading as there may be other, valid accounts in the group.



Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Enable function lock for F1-F12 on HP ZBook mobile workstations