Method: Specinfra::Command::Windows::Base::Group.check_exists

Defined in:
lib/specinfra/command/windows/base/group.rb

.check_exists(group) ⇒ Object

[View source]

3
4
5
6
7
8
9
# File 'lib/specinfra/command/windows/base/group.rb', line 3

def check_exists(group)
  group_id, domain =  group
  Backend::PowerShell::Command.new do
    using 'find_group.ps1'
    exec "(FindGroup -groupName '#{group_id}'#{domain.nil? ? "" : " -domain '#{domain}'"}) -ne $null"
  end
end