Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. $Manufacturer = (Get-WmiObject -class Win32_ComputerSystem).Manufacturer #Fabricant
  2.  
  3. $Bool_VMware = $Manufacturer -eq "VMware, Inc." #Vrai si Machine Vmware
  4.  
  5. $Bool_DELL = $Manufacturer -eq "Dell Inc." #Vrai si Machine Dell
  6.  
  7.  
  8.  
  9. if ($Bool_DELL = $false) #Si le poste n'est pas un Dell
  10.  
  11. {
  12.  
  13. if( (Test-Path -Path HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\State) -or $Bool_VMware){
  14.  
  15. Write-CMTraceLog -Logstring "Secure boot test" -Component "Interface_master" -Type 1 -LogPath $_LogFile
  16.  
  17. [System.Windows.Forms.MessageBox]::Show("SecureBoot\State CHECK")
  18.  
  19. }
  20.  
  21. Else
  22.  
  23. {LogWrite "UEFI disable on computer" $CommandName 3}
  24.  
  25.  
  26.  
  27.  
  28.  
  29. if(($(Get-ItemPropertyValue -Path HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\State -Name UEFISecureBootEnabled -EA SilentlyContinue) -eq 1)-or $Bool_VMware)
  30.  
  31. {
  32.  
  33. #[System.Windows.Forms.MessageBox]::Show("SecureBoot CHECK à 1")
  34.  
  35. }
  36.  
  37. Else
  38.  
  39. {LogWrite """secure boot"" disable on computer." $CommandName 3}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement