diff options
Diffstat (limited to 'lib/chef/resource/windows_ad_join.rb')
-rw-r--r-- | lib/chef/resource/windows_ad_join.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/resource/windows_ad_join.rb b/lib/chef/resource/windows_ad_join.rb index fd08f9149a..e62b931a75 100644 --- a/lib/chef/resource/windows_ad_join.rb +++ b/lib/chef/resource/windows_ad_join.rb @@ -96,6 +96,7 @@ class Chef def on_domain? node_domain = powershell_out!("(Get-WmiObject Win32_ComputerSystem).Domain") raise "Failed to check if the system is joined to the domain #{new_resource.domain_name}: #{node_domain.stderr}}" if node_domain.error? + node_domain.stdout.downcase.strip == new_resource.domain_name.downcase end |