Skip to content

Commit

Permalink
Merge pull request #2102 from microsoft/dpaul-HcLocalGroupFix
Browse files Browse the repository at this point in the history
Include "-ErrorAction Stop" to Get-LocalGroupMember
  • Loading branch information
lusassl-msft authored Jun 14, 2024
2 parents 12778b9 + 136b432 commit 5ea7b1a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function Get-ExchangeInformation {
CatchActionFunction = ${Function:Invoke-CatchActions}
ScriptBlock = {
[PSCustomObject]@{
LocalGroupMember = (Get-LocalGroupMember -SID "S-1-5-32-544")
LocalGroupMember = (Get-LocalGroupMember -SID "S-1-5-32-544" -ErrorAction Stop)
ADGroupMembership = (Get-ADPrincipalGroupMembership (Get-ADComputer $env:COMPUTERNAME).DistinguishedName)
}
}
Expand Down

0 comments on commit 5ea7b1a

Please sign in to comment.