Facebook
From ded, 2 Weeks ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 101
  1. # Chemins des répertoires à lire dans la base de registre
  2. $cheminRunOnce = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"
  3. $cheminRun = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
  4.  
  5. # Lecture du contenu pour l'utilisateur courant (CURRENT-USER)
  6. Write-Host "Contenu de la clé RunOnce pour l'utilisateur courant (CURRENT-USER) :"
  7. Get-ItemProperty -Path "HKCU:\$cheminRunOnce" | Select-Object -ExpandProperty *
  8.  
  9. Write-Host "`nContenu de la clé Run pour l'utilisateur courant (CURRENT-USER) :"
  10. Get-ItemProperty -Path "HKCU:\$cheminRun" | Select-Object -ExpandProperty *
  11.  
  12. # Lecture du contenu pour toute la machine (LOCAL-MACHINE)
  13. Write-Host "`nContenu de la clé RunOnce pour toute la machine (LOCAL-MACHINE) :"
  14. Get-ItemProperty -Path "HKLM:\$cheminRunOnce" | Select-Object -ExpandProperty *
  15.  
  16. Write-Host "`nContenu de la clé Run pour toute la machine (LOCAL-MACHINE) :"
  17. Get-ItemProperty -Path "HKLM:\$cheminRun" | Select-Object -ExpandProperty *
  18.