-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathPPI.ps1
More file actions
71 lines (67 loc) · 2.31 KB
/
PPI.ps1
File metadata and controls
71 lines (67 loc) · 2.31 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<#
.SYNOPSIS
Configure PPI
.DESCRIPTION
Configure TPM PPI settings
.PARAMETER Password
BIOS Password
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2022 v5.8.207
Created on: 6/29/2022 1:37 PM
Created by: Mick Pletcher
Filename: PPI.ps1
===========================================================================
#>
param
(
[ValidateNotNullOrEmpty()]
[string]$Password
)
#Install Dell BIOS Provider PowerShell Module
Try {
Import-Module -Name DellBIOSProvider
}
Catch {
Find-Module -Name DellBIOSProvider | Install-Module -Force
Import-Module -Name DellBIOSProvider
}
#TPM PPI Provision Override
If ("TpmPpiPo" -in (Get-ChildItem DellSmbios:\TPMSecurity\).Attribute) {
Write-Host "TPM PPI Provision Override....." -NoNewline
If ((Get-Item -Path DellSmbios:\TPMSecurity\TpmPpiPo).CurrentValue -ne "Enabled") {
Set-Item -Path DellSMBIOS:\TPMSecurity\TpmPpiPo Enabled -Password $Password
}
If ((Get-Item -Path DellSmbios:\TPMSecurity\TpmPpiPo).CurrentValue -eq "Enabled") {
Write-Host "Enabled" -ForegroundColor Yellow
}
else {
Write-Host "Disabled" -ForegroundColor Red
}
}
#TPM PPI Deprovision Override
If ("TpmPpiDpo" -in (Get-ChildItem DellSmbios:\TPMSecurity\).Attribute) {
Write-Host "TPM PPI Deprovision Override....." -NoNewline
If ((Get-Item -Path DellSmbios:\TPMSecurity\TpmPpiDpo).CurrentValue -ne "Enabled") {
Set-Item -Path DellSMBIOS:\TPMSecurity\TpmPpiDpo Enabled -Password $Password
}
If ((Get-Item -Path DellSmbios:\TPMSecurity\TpmPpiDpo).CurrentValue -eq "Enabled") {
Write-Host "Enabled" -ForegroundColor Yellow
}
else {
Write-Host "Disabled" -ForegroundColor Red
}
}
#PPI Clear Override
If ("TpmPpiClearOverride" -in (Get-ChildItem DellSmbios:\TPMSecurity\).Attribute) {
Write-Host "TPM PPI Clear Override....." -NoNewline
If ((Get-Item -Path DellSmbios:\TPMSecurity\TpmPpiClearOverride).CurrentValue -ne "Enabled") {
Set-Item -Path DellSMBIOS:\TPMSecurity\TpmPpiClearOverride Enabled -Password $Password
}
If ((Get-Item -Path DellSmbios:\TPMSecurity\TpmPpiClearOverride).CurrentValue -eq "Enabled") {
Write-Host "Enabled" -ForegroundColor Yellow
}
else {
Write-Host "Disabled" -ForegroundColor Red
}
}