Skip to content

Commit

Permalink
Computer: Fix for Delete-ADSIObject (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarpenter79 committed Jul 17, 2023
1 parent fcff2e0 commit 9566942
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 9566942

Please sign in to comment.