Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Manufacturer = (Get-WmiObject -class Win32_ComputerSystem).Manufacturer #Fabricant
- $Bool_VMware = $Manufacturer -eq "VMware, Inc." #Vrai si Machine Vmware
- $Bool_DELL = $Manufacturer -eq "Dell Inc." #Vrai si Machine Dell
- if ($Bool_DELL = $false) #Si le poste n'est pas un Dell
- {
- if( (Test-Path -Path HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\State) -or $Bool_VMware){
- Write-CMTraceLog -Logstring "Secure boot test" -Component "Interface_master" -Type 1 -LogPath $_LogFile
- [System.Windows.Forms.MessageBox]::Show("SecureBoot\State CHECK")
- }
- Else
- {LogWrite "UEFI disable on computer" $CommandName 3}
- if(($(Get-ItemPropertyValue -Path HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\State -Name UEFISecureBootEnabled -EA SilentlyContinue) -eq 1)-or $Bool_VMware)
- {
- #[System.Windows.Forms.MessageBox]::Show("SecureBoot CHECK à 1")
- }
- Else
- {LogWrite """secure boot"" disable on computer." $CommandName 3}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement