Registre powershell
De Linuxmemo.
(Différences entre les versions)
(Page créée avec « Catégorie:PowerShell #Lire une clé Get-Item HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ #Lire une valeur Get-ItemProperty HKCU:\SOFTWARE\Micro... ») |
|||
Ligne 18 : | Ligne 18 : | ||
Remove-Item -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent\test | Remove-Item -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent\test | ||
- | + | ==Gestion des propriétés== | |
+ | Les types supportés sont: String ExpandString Binary DWord Multistring QWord | ||
+ | |||
#Créer une nouvelle propriété | #Créer une nouvelle propriété | ||
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent -ItemType String -Name foo -Value bar | New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent -ItemType String -Name foo -Value bar | ||
Ligne 30 : | Ligne 32 : | ||
#Supprimer une propriété | #Supprimer une propriété | ||
Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent -Name foo | Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent -Name foo | ||
+ | ==Astuces== | ||
+ | Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ -name Hidden -Value 1 |
Version du 13 juin 2017 à 16:29
- Lire une clé
Get-Item HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\
- Lire une valeur
Get-ItemProperty HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ -name Hidden
- Créer une nouvelle clé
New-Item -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent\test
- Définir la valeur (par défaut) d’une clé
Set-Item -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent\test -Value foo
- Renommer une clé
Rename-Item -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent\test -NewName foo
- Supprimer une clé
Remove-Item -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent\test
Gestion des propriétés
Les types supportés sont: String ExpandString Binary DWord Multistring QWord
- Créer une nouvelle propriété
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent -ItemType String -Name foo -Value bar
- Définir la valeur d’une propriété
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent -Name foo -Value bar
- Renommer une propriété
Rename-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent -Name foo -NewName bar
- Supprimer une propriété
Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent -Name foo
Astuces
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ -name Hidden -Value 1