Ajout dela structure MDT dans Infra-LAB
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<#
|
||||
.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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user