Module win_domain_computer fix delete computer with child

pull/44500/head
Daniel Sánchez Fábregas 6 years ago
parent 77bff99f3c
commit bbecdbc042

@ -129,8 +129,9 @@ Function Add-ConstructedState($desired_state) {
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
Function Remove-ConstructedState($initial_state) { Function Remove-ConstructedState($initial_state) {
Try { Try {
Remove-ADComputer ` Get-ADComputer $initial_state.name `
-Identity $initial_state.name ` | Remove-ADObject `
-Recursive `
-Confirm:$False ` -Confirm:$False `
-WhatIf:$check_mode -WhatIf:$check_mode
} Catch { } Catch {

Loading…
Cancel
Save