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.91.0 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.90.1 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.90.0 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.89.0 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.88.2 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.88.1 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.88.0 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.87.2 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.87.1 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.87.0 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.86.0 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.85.1 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.85.0 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.84.1 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.84.0 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.83.4 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.83.3 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.83.2 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.83.1 lib/specinfra/backend/powershell/support/find_user.ps1
specinfra-2.83.0 lib/specinfra/backend/powershell/support/find_user.ps1