Sha256: 40af87f90c6b6dc5720c26fd265e7ddd1dad9ad1aa4a96a8b50144be788aba05

Contents?: true

Size: 264 Bytes

Versions: 524

Compression:

Stored size: 264 Bytes

Contents

function FindUser
{
  param($userName, $domain)
  if ($domain -eq $null) {$selectionCriteria = " and LocalAccount = true"}
  else {$selectionCriteria = " and Domain = '$domain'"}

  Get-WmiObject Win32_UserAccount -filter "Name = '$userName' $selectionCriteria"
}

Version data entries

524 entries across 524 versions & 4 rubygems

Version Path
specinfra-2.82.25 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.24 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.23 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.22 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.21 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.20 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.19 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.18 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.17 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.16 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.15 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.14 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.13 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.12 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.11 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.10 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.9 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.8 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.7 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.82.6 lib/specinfra/backend/powershell/support/find_user.ps1