-
Notifications
You must be signed in to change notification settings - Fork 141
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
xADOrganizationalUnit: Catch Exception When the Path Property specifies a Non-Existing Path #413
xADOrganizationalUnit: Catch Exception When the Path Property specifies a Non-Existing Path #413
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #413 +/- ##
====================================
+ Coverage 92% 92% +<1%
====================================
Files 20 20
Lines 2538 2541 +3
Branches 10 10
====================================
+ Hits 2345 2348 +3
Misses 183 183
Partials 10 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r1, 3 of 3 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @X-Guardian)
DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.psm1, line 30 at r3 (raw file):
try { $ou = Get-ADOrganizationalUnit -Filter { Name -eq $Name } -SearchBase $Path -SearchScope OneLevel -Properties ProtectedFromAccidentalDeletion, Description
Might be worth splitting this line with a backtick so that it gets in below 120 chars. Alternatively, could splat this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r1, 2 of 3 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @PlagueHO)
DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.psm1, line 30 at r3 (raw file):
Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
Might be worth splitting this line with a backtick so that it gets in below 120 chars. Alternatively, could splat this.
Yeah, spatting this would make it easier to read, especially when revewing. But won't hold the PR up because of it since it is old code. There are more places this need to be resolved. I will add an issue for this. The local variable could also be more descriptive, also another PR. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @PlagueHO)
Pull Request (PR) description
This PR adds code to the
xADOrganizationalUnit
resource to catch theADIdentityNotFoundException
returned byGet-ADOrganizationalUnit
and return an improved error message.This Pull Request (PR) fixes the following issues
Task list
Entry should say what was changed, and how that affects users (if applicable).
and comment-based help.
This change is