Auto-commit: 2025-10-31 08:58:35
This commit is contained in:
23
Bios-ActiveTPM-Dell/ActiveTPM.ps1
Normal file
23
Bios-ActiveTPM-Dell/ActiveTPM.ps1
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
Function Enable-TPM_Dell {
|
||||
param(
|
||||
[string] $BiosPassword = ""
|
||||
)
|
||||
|
||||
$DellModulePath = "${env:ProgramFiles}\WindowsPowerShell\Modules\DellBIOSProvider"
|
||||
if (test-path $DellModulePath) {
|
||||
write-host "PASS"
|
||||
import-module DellBIOSProvider
|
||||
If ($BiosPassword -eq "") {
|
||||
Set-Item -Path DellSmbios:\TpmSecurity\TpmSecurity "Enabled"
|
||||
} Else {
|
||||
Set-Item -Path DellSmbios:\TpmSecurity\TpmSecurity "Enabled" -Password $BiosPassword
|
||||
}
|
||||
} Else {
|
||||
Write-Error "DellBIOSProvider Module Not Exist..."
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Enable-TPM_Dell
|
||||
Reference in New Issue
Block a user