Repository navigation
Implement LocalAccounts module using supported APIs #4305
Description
Activity
- addedWG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issuesIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassif
on Jul 21, 2017 Looks like https://docs.microsoft.com/en-us/windows/win32/api/lmaccess/ APIs are now public. So we could port this to Core, just need to map the old API calls to public ones.
Any news on this module?
In PowerShell 7 it's still not working...PS> Get-LocalGroup Get-LocalGroup: The 'Get-LocalGroup' command was found in the module 'Microsoft.PowerShell.LocalAccounts', but the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.LocalAccounts'. PS> Import-Module -Name Microsoft.PowerShell.LocalAccounts Import-Module: The parameter is incorrect. PS> Import-Module -Name Microsoft.PowerShell.LocalAccounts -UseWindowsPowerShell Import-Module: The parameter is incorrect. PS>
TravisEz13 commented
on May 20, 2020 MemberAuthorMore actionsTravisEz13 commented
on May 20, 2020 MemberAuthorMore actionsSteve Lee (@SteveL-MSFT) Do we still need this if it works. Looks like it loads directly in PowerShell 7.
Interesting! I upgraded PowerShell 7.0.0 to PowerShell 7.0.1 but still have the same error message.
There is certainly a difference between our systems...If
Import-Module -Name Microsoft.PowerShell.LocalAccountsisn't working, please file a different issue with repro steps.This is working fine on my machine (and has for a while). I agree with Travis Plunk (@TravisEz13) (and Steve Lee (@SteveL-MSFT) offline), that this isn't something we need to do for Windows specifically given that it already ships in the box and is fully compatible.
- addedResolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.The issue won't be fixed, possibly due to compatibility reason.
on Jul 13, 2020

The code for the previous implementation is here:
https://github.com/PowerShell/PowerShell/tree/master/src/Microsoft.PowerShell.LocalAccounts
removed due to #4272