-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathSecureBoot.ps1
More file actions
34 lines (31 loc) · 1.01 KB
/
SecureBoot.ps1
File metadata and controls
34 lines (31 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<#
.SYNOPSIS
Secure Boot
.DESCRIPTION
Enable Secure Boot
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2022 v5.8.207
Created on: 6/29/2022 8:32 AM
Created by: Mick Pletcher
Filename: SecureBoot.ps1
===========================================================================
#>
#Install Dell BIOS Provider PowerShell Module
Try {
Import-Module -Name DellBIOSProvider
}
Catch {
Find-Module -Name DellBIOSProvider | Install-Module -Force
Import-Module -Name DellBIOSProvider
}
#Secure Boot Enable
Write-Host "Secure Boot....." -NoNewline
If ((Get-Item -Path DellSmbios:\SecureBoot\SecureBoot).CurrentValue -ne "Enabled") {
Set-Item -Path DellSMBIOS:\SecureBoot\SecureBoot Enabled
}
If ((Get-Item -Path DellSmbios:\SecureBoot\SecureBoot).CurrentValue -eq "Enabled") {
Write-Host "Enabled" -ForegroundColor Yellow
} else {
Write-Host "Disabled" -ForegroundColor Red
}