We had an issue where McAfee was unfortunately deployed on accident - to every single server across 3 large environments (not by me :)).

The latest patch 4 onward mcafee 8.8 is incompatible with anything under HRP5. XenApp servers would randomly die.

So you need to be running HRP06 or higher, which if you have an ‘interesting’ change management process, can take several weeks to get tested, deployed etc.

I found WMI would fail on screwed servers. So here is a quick script to ascertain which servers are dead:

  
if(!(get-module -name activedirectory)){
  
import-module activedirectory}

$serverlist = get-adcomputer -filter 'Name -like "*<hostname-keyword>*"'
  
foreach ($pc in $serverlist){
  
if(test-connection $pc.name -quiet -Count 1){
      
try{
          
$temp = get-wmiobject win32_operatingsystem -ComputerName $pc.Name -ErrorAction Stop | Select \*last\*
      
}
      
Catch{
          
write-host -ForegroundColor Red $pc.name "Error!"
      
}
  
}}
  

Output looks like this:

  
PS C:\Windows\System32\WindowsPowerShell\v1.0> D:\temp\get-serverdead.ps1
  
AU-CTX-P001 Error!
  
AU-CTX-P011 Error!