win_domain_group_membership: Fix missing @extra_vars on Get-ADObject to support different domain and credentials for retrieval (#57429)

* win_domain_group_membership - Fix missing @extra_vars on Get-ADObject to support dirrent domain and credentials for retrival

* win_domain_group_membership - Fix missing extra_vars on Get-ADObject
This commit is contained in:
ShachafGoldstein 2019-06-10 23:26:01 +03:00 committed by Jordan Borean
parent 13f73adef5
commit a8e133105c
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "win_domain_group_membership - Fix missing @extra_vars on Get-ADObject to support dirrent domain and credentials for retrival (https://github.com/ansible/ansible/issues/57404)"

View file

@ -52,7 +52,7 @@ $members_before = Get-AdGroupMember -Identity $name @extra_args
$pure_members = [System.Collections.Generic.List`1[String]]@()
foreach ($member in $members) {
$group_member = Get-ADObject -Filter "SamAccountName -eq '$member' -and $ad_object_class_filter" -Properties objectSid, sAMAccountName
$group_member = Get-ADObject -Filter "SamAccountName -eq '$member' -and $ad_object_class_filter" -Properties objectSid, sAMAccountName @extra_vars
if (!$group_member) {
Fail-Json -obj $result "Could not find domain user, group, service account or computer named $member"
}