dsccommunity / ComputerManagementDsc

DSC resources for for configuration of a Windows computer. These DSC resources allow you to perform computer management tasks, such as renaming the computer, joining a domain and scheduling tasks as well as configuring items such as virtual memory, event logs, time zones and power settings.
https://dsccommunity.org
MIT License
295 stars 81 forks source link

Computer: Delete existing AD Computer object when joining Computer to Domain #386

Closed nickgw closed 2 years ago

nickgw commented 2 years ago

Pull Request (PR) description

When joining a computer to a domain, if a computer object with the same name already exists in the domain it will be deleted.

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

codecov[bot] commented 2 years ago

Codecov Report

Merging #386 (f59de8f) into main (49b3657) will increase coverage by 0%. The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #386   +/-   ##
===================================
  Coverage    90%    90%           
===================================
  Files        17     17           
  Lines      1690   1716   +26     
===================================
+ Hits       1528   1554   +26     
  Misses      162    162           
Impacted Files Coverage Δ
source/DSCResources/DSC_Computer/DSC_Computer.psm1 90% <100%> (+1%) :arrow_up:
kilasuit commented 2 years ago

@nickgw Please change use of backticks in your code to us splatting instead as per https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_splatting?view=powershell-7.2

nickgw commented 2 years ago

@nickgw Please change use of backticks in your code to us splatting instead as per https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_splatting?view=powershell-7.2

@kilasuit Should be all set now now

PlagueHO commented 2 years ago

Hi @nickgw - I've merged your other PR (Awesome, thank you), but it's caused some conflicts. Can you resolve?

nickgw commented 2 years ago

Hi @nickgw - I've merged your other PR (Awesome, thank you), but it's caused some conflicts. Can you resolve?

Hey @PlagueHO , thanks! I've resolved the merge conflicts.

nickgw commented 2 years ago

@PlagueHO I didn't link the issue I was resolving on the other PR correctly. You can close this out: https://github.com/dsccommunity/ComputerManagementDsc/issues/234

PlagueHO commented 2 years ago

Thanks @nickgw - another great job and much appreciated. I'll get onto review tomorrow.