Activer l’enregistrement des modules : valeur de Registre EnableModuleLogging (ModuleNames)OrdinateurHKLM\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames
- ID de stratégie
- EnableModuleLogging
- Étendue
- Configuration ordinateur, configuration utilisateur
- Pris en charge sur
- Au moins Microsoft Windows 7 ou famille Windows Server 2008
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Catégorie
- Composants Windows › Windows PowerShell
Registre
EnableModuleLogging
REG_DWORDOrdinateurUtilisateur…\Software\Policies\Microsoft\Windows\PowerShell\ModuleLoggingHKLM\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging
HKCU\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging
HKCU\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging
- Valeur si activée
- 1
- Valeur si désactivée
- 0
Appliquer avec .reg · CMD · PowerShell
OrdinateurParamètre valable pour tout l’ordinateur
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging] ; Options (en utiliser une seule) ; Activé "EnableModuleLogging"=dword:00000001 ; Désactivé "EnableModuleLogging"=dword:00000000
CMD
:: Options (en utiliser une seule) :: Activé reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging" /v "EnableModuleLogging" /t REG_DWORD /d 1 /f :: Désactivé reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging" /v "EnableModuleLogging" /t REG_DWORD /d 0 /f
PowerShell
# Commun : créer la clé New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging' -Force | Out-Null # Options (en utiliser une seule) # Activé New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging' -Name 'EnableModuleLogging' -PropertyType DWord -Value 1 -Force | Out-Null # Désactivé New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging' -Name 'EnableModuleLogging' -PropertyType DWord -Value 0 -Force | Out-Null
UtilisateurParamètre par compte
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging] ; Options (en utiliser une seule) ; Activé "EnableModuleLogging"=dword:00000001 ; Désactivé "EnableModuleLogging"=dword:00000000
CMD
:: Options (en utiliser une seule) :: Activé reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging" /v "EnableModuleLogging" /t REG_DWORD /d 1 /f :: Désactivé reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging" /v "EnableModuleLogging" /t REG_DWORD /d 0 /f
PowerShell
# Commun : créer la clé New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging' -Force | Out-Null # Options (en utiliser une seule) # Activé New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging' -Name 'EnableModuleLogging' -PropertyType DWord -Value 1 -Force | Out-Null # Désactivé New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging' -Name 'EnableModuleLogging' -PropertyType DWord -Value 0 -Force | Out-Null
(valeurs de la liste)
REG_SZOrdinateurUtilisateur…\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNamesHKLM\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames Clé actuelle
HKCU\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames
HKCU\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames
- Valeur si activée
- Dépend de la valeur de l'option
- Élément
- Noms des modules
- Type de valeur
- REG_SZ
Appliquer avec .reg · CMD · PowerShell
OrdinateurParamètre valable pour tout l’ordinateur
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames] "<saisir la valeur>"="<saisir la valeur>"
CMD
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames" /v "<saisir la valeur>" /t REG_SZ /d "<saisir la valeur>" /f
PowerShell
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames' -Name '<saisir la valeur>' -PropertyType String -Value '<saisir la valeur>' -Force | Out-Null
UtilisateurParamètre par compte
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames] "<saisir la valeur>"="<saisir la valeur>"
CMD
reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames" /v "<saisir la valeur>" /t REG_SZ /d "<saisir la valeur>" /f
PowerShell
New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames' -Force | Out-Null New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames' -Name '<saisir la valeur>' -PropertyType String -Value '<saisir la valeur>' -Force | Out-Null