You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The constructor for 'System.DirectoryServices.DirectoryEntry' in Delete-ADSIObject is using the wrong variable.
It is using $DomainName as the first argument instead of $Path
Verbose logs
This causes the machine to be added to the domain but the rename fails when there is an existing computer object in AD.
When running the code for Delete-ADSIObject directly DeleteTree() returns an unspecified error has occurred.
DSC configuration
# 'ComputerName' must exist in 'DomainName' for this problem to occur
Computer 'NameAndDomain'
{
Name ='ComputerName'
DomainName ='DomainName'
Credential =$Credential
}
Problem description
The constructor for 'System.DirectoryServices.DirectoryEntry' in Delete-ADSIObject is using the wrong variable.
It is using $DomainName as the first argument instead of $Path
Verbose logs
DSC configuration
Suggested solution
Replace $DomainName with $Path
Operating system the target node is running
PowerShell version and build the target node is running
ComputerManagementDsc version
The text was updated successfully, but these errors were encountered: