Skip to content

Commit 9566942

Browse files
authored
Computer: Fix for Delete-ADSIObject (#415)
1 parent fcff2e0 commit 9566942

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- The class-based resources are now re-using the module DscResource.Base - Fixes [Issue #404](https://github.com/dsccommunity/ComputerManagementDsc/issues/404).
1212
- Removed the file `source/build.psd1` as it is no longer required for the
1313
build pipeline.
14+
- Fixed Delete-ADSIObject so that existing AD Computer objects will be deleted. Fixes [Issue #414](https://github.com/dsccommunity/ComputerManagementDsc/issues/414).
1415
- PSResourceRepository
1516
- The resource now supports the read-only property `Reasons` that the
1617
compliance part (audit via Azure Policy) of Azure AutoManage Machine

source/DSCResources/DSC_Computer/DSC_Computer.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,8 @@ function Delete-ADSIObject
773773
$params = @{
774774
TypeName = 'System.DirectoryServices.DirectoryEntry'
775775
ArgumentList = @(
776-
$DomainName,
777-
$Credential.UserName
776+
$Path,
777+
$Credential.UserName,
778778
$Credential.GetNetworkCredential().password
779779
)
780780
ErrorAction = 'Stop'

0 commit comments

Comments
 (0)