{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7105","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7105/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7105/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7105/events","html_url":"https://github.com/PowerShell/PowerShell/issues/7105","id":333467519,"node_id":"MDU6SXNzdWUzMzM0Njc1MTk=","number":7105,"title":"Get-LocalGroupMember -Group Administrators bug","user":{"login":"amazoko","id":40373371,"node_id":"MDQ6VXNlcjQwMzczMzcx","avatar_url":"https://avatars3.githubusercontent.com/u/40373371?v=4","gravatar_id":"","url":"https://api.github.com/users/amazoko","html_url":"https://github.com/amazoko","followers_url":"https://api.github.com/users/amazoko/followers","following_url":"https://api.github.com/users/amazoko/following{/other_user}","gists_url":"https://api.github.com/users/amazoko/gists{/gist_id}","starred_url":"https://api.github.com/users/amazoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amazoko/subscriptions","organizations_url":"https://api.github.com/users/amazoko/orgs","repos_url":"https://api.github.com/users/amazoko/repos","events_url":"https://api.github.com/users/amazoko/events{/privacy}","received_events_url":"https://api.github.com/users/amazoko/received_events","type":"User","site_admin":false},"labels":[{"id":401720606,"node_id":"MDU6TGFiZWw0MDE3MjA2MDY=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Area-Cmdlets","name":"Area-Cmdlets","color":"5319e7","default":false},{"id":311043049,"node_id":"MDU6TGFiZWwzMTEwNDMwNDk=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Resolution-Duplicate","name":"Resolution-Duplicate","color":"ffffff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-18T23:19:02Z","updated_at":"2018-06-20T12:32:31Z","closed_at":null,"author_association":"NONE","body":"we stumbled on the following bug.\r\n\r\nI think there is the problem, that a non existing SID is in this group, and it cannot be skipped.\r\n\r\nPS C:\\Windows\\system32> Get-LocalGroupMember -Group Administrators\r\n\r\nGet-LocalGroupMember : Failed to compare two elements in the array.\r\n\r\nAt line:1 char:1\r\n\r\n+ Get-LocalGroupMember -Group Administrators\r\n\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  + CategoryInfo          : NotSpecified: (:) [Get-LocalGroupMember], InvalidOperationException\r\n\r\n    + FullyQualifiedErrorId : An unspecified error occurred.,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand\r\n\r\nPS C:\\Windows\\system32> $error[0] | fl * -force\r\n\r\nwriteErrorStream      : True\r\n\r\nPSMessageDetails      :\r\n\r\nException             : System.InvalidOperationException: Failed to compare two elements in the array. ---> System.NullReferenceException: Object reference not set to an\r\n\r\n                        instance of an object.\r\n\r\n                           at Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand.<>c.<ProcessesMembership>b__20_0(LocalPrincipal p1, LocalPrincipal p2)\r\n\r\n                           at System.Collections.Generic.ArraySortHelper`1.SwapIfGreater(T[] keys, IComparer`1 comparer, Int32 a, Int32 b)\r\n\r\n                           at System.Collections.Generic.ArraySortHelper`1.DepthLimitedQuickSort(T[] keys, Int32 left, Int32 right, IComparer`1 comparer, Int32 depthLimit)\r\n\r\n                           at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)\r\n\r\n                           --- End of inner exception stack trace ---\r\n\r\n                           at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)\r\n\r\n                           at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)\r\n\r\n                           at System.Collections.Generic.List`1.Sort(Comparison`1 comparison)\r\n\r\n                           at Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand.ProcessesMembership(IEnumerable`1 membership)\r\n\r\n                           at Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand.ProcessRecord()\r\n\r\nTargetObject          :\r\n\r\nCategoryInfo          : NotSpecified: (:) [Get-LocalGroupMember], InvalidOperationException\r\n\r\nFullyQualifiedErrorId : An unspecified error occurred.,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand\r\n\r\nErrorDetails          :\r\n\r\nInvocationInfo        : System.Management.Automation.InvocationInfo\r\n\r\nScriptStackTrace      : at <ScriptBlock>, <No file>: line 1\r\n\r\nPipelineIterationInfo : {0, 1}"},"comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments/398732260","html_url":"https://github.com/PowerShell/PowerShell/issues/7105#issuecomment-398732260","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7105","id":398732260,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODczMjI2MA==","user":{"login":"mklement0","id":588825,"node_id":"MDQ6VXNlcjU4ODgyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/588825?v=4","gravatar_id":"","url":"https://api.github.com/users/mklement0","html_url":"https://github.com/mklement0","followers_url":"https://api.github.com/users/mklement0/followers","following_url":"https://api.github.com/users/mklement0/following{/other_user}","gists_url":"https://api.github.com/users/mklement0/gists{/gist_id}","starred_url":"https://api.github.com/users/mklement0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mklement0/subscriptions","organizations_url":"https://api.github.com/users/mklement0/orgs","repos_url":"https://api.github.com/users/mklement0/repos","events_url":"https://api.github.com/users/mklement0/events{/privacy}","received_events_url":"https://api.github.com/users/mklement0/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T12:32:31Z","updated_at":"2018-06-20T12:32:31Z","author_association":"CONTRIBUTOR","body":"@iSazonov: \r\n\r\nThanks for finding the duplicate. \r\n\r\nTo ensure that I don't point others to the wrong place in the future: \r\n\r\n* I now see that the _source code_ for `Get-LocalGroupMember` is in the PS Core repo, but it appears not to be _available at runtime_ - a comment of yours on the linked issue suggests that is _disabled_ on purpose.\r\n\r\n   * Short of testing the availability of a command in a console window, is there an easy way to tell from the source code what commands are currently disabled?\r\n\r\n* What's the policy in this scenario on reporting issues that - by definition - surface in _Windows PowerShell_ only, but _potentially_ affect PS Core should the code be activated in the future?  \r\n\r\n  * I guess it makes sense to report such issues in this repo [too], but that won't happen unless the reporter has gone out of their way to look for inactive code in the Core repo that relates to the problem they're seeing in Windows PowerShell.\r\n\r\n\r\n"}}
{"actor":{"display_login":"mklement0"}}