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

DSC_Computer: Fix for Delete-ADSIObject #415

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The class-based resources are now re-using the module DscResource.Base - Fixes [Issue #404](https://github.com/dsccommunity/ComputerManagementDsc/issues/404).
- Removed the file `source/build.psd1` as it is no longer required for the
build pipeline.
- Fixed Delete-ADSIObject so that existing AD Computer objects will be deleted. Fixes [Issue #414](https://github.com/dsccommunity/ComputerManagementDsc/issues/414).
- PSResourceRepository
- The resource now supports the read-only property `Reasons` that the
compliance part (audit via Azure Policy) of Azure AutoManage Machine
Expand Down
4 changes: 2 additions & 2 deletions source/DSCResources/DSC_Computer/DSC_Computer.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,8 @@ function Delete-ADSIObject
$params = @{
TypeName = 'System.DirectoryServices.DirectoryEntry'
ArgumentList = @(
$DomainName,
$Credential.UserName
$Path,
$Credential.UserName,
$Credential.GetNetworkCredential().password
)
ErrorAction = 'Stop'
Expand Down