diff --git a/lib/chef/resource/windows_pagefile.rb b/lib/chef/resource/windows_pagefile.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/resource/windows_pagefile.rb
+++ b/lib/chef/resource/windows_pagefile.rb
@@ -120,7 +120,10 @@ class Chef
 
         # raise an exception if the target drive location is invalid
         def pagefile_drive_exist?(pagefile)
-          ::Dir.exist?(pagefile[0] + ":\\") ? nil : (raise "You are trying to create a pagefile on a drive that does not exist!")
+          if (::Dir.exist?(pagefile[0] + ":\\") == false)
+            raise "You are trying to create a pagefile on a drive that does not exist!"
+          end
+          # ::Dir.exist?(pagefile[0] + ":\\") ? nil : (raise "You are trying to create a pagefile on a drive that does not exist!")
         end
 
         # See if the pagefile exists
Updated the Windows Pagefile resource to use PowerShell over WMI, added a corresponding test file