Class: Specinfra::Command::Windows::Base::Group

Inherits:
Specinfra::Command::Windows::Base show all
Defined in:
lib/specinfra/command/windows/base/group.rb

Class Method Summary collapse

Methods inherited from Specinfra::Command::Windows::Base

create

Class Method Details

.check_exists(group) ⇒ Object



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