Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix of issue 750 and 756 #158

Merged
merged 2 commits into from
Jun 6, 2017
Merged

Fix of issue 750 and 756 #158

merged 2 commits into from
Jun 6, 2017

Conversation

bingbing8
Copy link

$idRefShortValue = ($a.IdentityReference.Value).split('\')[-1]
if ($idRefShortValue -in $specialIdRefs )
{
$ruleIdentity = Get-UserSID -User (New-Object Security.Principal.NTAccount $idRefShortValue)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this logic is duplicated in two places.. better to create a internal method so that it can be expanded in future as and when we run into this kind of exceptions... Its easy to maintain if its in one place..

Copy link
Author

@bingbing8 bingbing8 Jun 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are similar, but not same. Wrapping them in a function does not save code lines and need at least 6 parameters. plus need a logic in caller to call continue if wrapping them in function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants