Files
Infra-LAB/projects/MDT/Scripts/BIOSConfig/HP/Key_Config_S5_Wol.ps1
T

37 lines
961 B
PowerShell

<#
.SYNOPSIS
Déactivation du démarrage rapide
.DESCRIPTION
0 pour désactiver
1 pour activer
.PARAMETER
.EXAMPLE
.NOTES
Auteurs :
Aurélien Hamez - Service Exploitation - Secteur Roubaix-Tourcoing
Région Hauts de France
#>
$PathKey = "HKLM:\SYSTEM\CurrentControlSet\Services\NDIS\Parameters\"
$Key = "AllowWakeFromS5"
$Value = Get-ItemProperty $PathKey -Name $Key -ErrorAction SilentlyContinue
if ($Value){
$ValueKey = Get-ItemPropertyValue -Path $PathKey -Name $Key
If ($ValueKey -ne 1)
{
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NDIS\Parameters" -Name AllowWakeFromS5 -Type DWORD -Value 00000001
}
}
else{
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NDIS\Parameters\" -Name AllowWakeFromS5 -Type DWORD -Value 00000001
}