Sha256: fa47458a5fdc7d373def1d0f41f953b8106c41c96e9aa91cdec25601cd50c94d

Contents?: true

Size: 477 Bytes

Versions: 524

Compression:

Stored size: 477 Bytes

Contents

function FindUserGroup
{
  param($userName, $groupName, $userDomain, $groupDomain)
  $user = FindUser -userName $userName -domain $userDomain
  $group = FindGroup -groupName $groupName -domain $groupDomain
  if ($user -and $group) {
    Get-WmiObject Win32_GroupUser -filter ("GroupComponent = 'Win32_Group.Domain=`"" + $group.domain + "`",Name=`"" + $group.name + "`"' and PartComponent = 'Win32_UserAccount.Domain=`"" + $user.domain + "`",Name=`"" + $user.name + "`"'")
  }
}

Version data entries

524 entries across 524 versions & 4 rubygems

Version Path
specinfra-2.76.5 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.76.4 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.76.3 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.76.2 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.76.1 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.76.0 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.75.1 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-rb19-2.44.7 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.75.0 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.74.0 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.73.4 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.73.3 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.73.2 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.73.1 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.73.0 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.72.1 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.72.0 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.71.3 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.71.2 lib/specinfra/backend/powershell/support/find_usergroup.ps1
specinfra-2.71.1 lib/specinfra/backend/powershell/support/find_usergroup.ps1