-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathTurnOnTPM.ps1
37 lines (32 loc) · 1012 Bytes
/
TurnOnTPM.ps1
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
35
36
37
<#
.SYNOPSIS
Turn On TPM
.DESCRIPTION
Turn on the TPM
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2022 v5.8.207
Created on: 6/29/2022 10:16 AM
Created by: Mick Pletcher
Filename: TurnOnTPM.ps1
===========================================================================
#>
#Install Dell BIOS Provider PowerShell Module
Try {
Import-Module -Name DellBIOSProvider
}
Catch {
Find-Module -Name DellBIOSProvider | Install-Module -Force
Import-Module -Name DellBIOSProvider
}
#TPM On
Write-Host "TPM....." -NoNewline
If ((Get-Item -Path DellSmbios:\TPMSecurity\TpmSecurity).CurrentValue -ne "Enabled") {
Set-Item -Path DellSMBIOS:\TPMSecurity\TpmSecurity Enabled
}
If ((Get-Item -Path DellSmbios:\TPMSecurity\TpmSecurity).CurrentValue -eq "Enabled") {
Write-Host "On" -ForegroundColor Yellow
}
else {
Write-Host "Off" -ForegroundColor Red
}