Ajout dela structure MDT dans Infra-LAB

This commit is contained in:
2026-05-24 16:21:20 +02:00
parent fed8d42171
commit 049b03b4d4
522 changed files with 105109 additions and 0 deletions
@@ -0,0 +1,38 @@
<#
.DESCRIPTION
Clear HP Password Bios
.NOTES
Author: Aurelien HAMEZ & Patrick Pattyn
Version: 1.0
Date: 2021-07-22
.EXAMPLE
.\Clear-HPPwd.ps1
#>
Begin {
$MDPs = "password1.bin", "password2.bin", "password3.bin", "password4.bin", "password5.bin", "password6.bin"
}
Process {
#On configure le mot de passe si vide
$process = Start-Process -FilePath "$PSScriptRoot\BiosConfigUtility64.exe" -ArgumentList "`"/nspwdfile:`"", "/log" -Wait -PassThru
#Si le mot de passe est configuré, le code erreur 10 est retourné, on test différent mot de passe
if($process.ExitCode -eq 10)
{
Foreach($MDP in $MDPs)
{
$process = Start-Process -FilePath "$PSScriptRootBiosConfigUtility64.exe" -ArgumentList "`"/nspwdfile:`"", "`"/cpwdfile:$MDP`"", "/log" -wait -PassThru
if($process.ExitCode -ne 10)
{
break
}
}
}
}
End {
}