win_domain_group_membership - Fix to a fix in extra_args (#58943)

* win_domain_group_membership - Fix to a fix in extra_args

* addig missing l on the fly
This commit is contained in:
Shachaf92 2019-07-16 22:38:42 +03:00 committed by Jordan Borean
parent e5e3486be6
commit 681ab6515a

View file

@ -35,7 +35,7 @@ if ($null -ne $domain_username) {
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $domain_username, $domain_password
$extra_args.Credential = $credential
}
if ($nul -ne $domain_server) {
if ($null -ne $domain_server) {
$extra_args.Server = $domain_server
}
@ -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 @extra_vars
$group_member = Get-ADObject -Filter "SamAccountName -eq '$member' -and $ad_object_class_filter" -Properties objectSid, sAMAccountName @extra_args
if (!$group_member) {
Fail-Json -obj $result "Could not find domain user, group, service account or computer named $member"
}