Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

how to get registry key lastwritetime using batch/powershell

$
0
0

Hello,

I want to get a registry key's LastWriteTime using batch/powershell.  These are what i have tried..

1. Launch regedit and manually export the key using the UI, this gives me the lastwritetime, but I need a commandline version of this.  regedit /e only exports the key and value data.

2. dir HKLM:\software\mykey

nothing returned

3. Get-ChildItem HKLM:\software\mykey |  Select-Object *

nothing returned

4. Get-ItemProperty HKLM:\software\mykey | Select-Object *

LastWriteTime not returned; other values are returned

5. (Get-Item HKLM:\software\mykey).LastWriteTime

Nothing is returned

Is the only way to do this by using pinvoke with RegQueryInfoKey? 

Thanks in advance


ss883r




Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>