Powershell 如何在命令Get ItemProperty中添加lastaccess时间
如何在此命令中添加lastaccess时间:Powershell 如何在命令Get ItemProperty中添加lastaccess时间,powershell,scripting,Powershell,Scripting,如何在此命令中添加lastaccess时间: Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -AutoSize 恐怕你不能。要查看可从中选择的所有属性,请运行以下命令: Get-ItemProper
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -AutoSize
恐怕你不能。要查看可从中选择的所有属性,请运行以下命令:
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | gm
它将显示您可以从中获取信息的所有字段
TypeName: System.Management.Automation.PSCustomObject
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
DisplayIcon NoteProperty string DisplayIcon=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Commo...
DisplayName NoteProperty string DisplayName=Visual Studio Enterprise 2019
DisplayVersion NoteProperty string DisplayVersion=16.2.29209.62
InstallDate NoteProperty string InstallDate=20190715
InstallLocation NoteProperty string InstallLocation=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
ModifyPath NoteProperty string ModifyPath="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installe...
PSChildName NoteProperty string PSChildName=18bd80bd
PSDrive NoteProperty PSDriveInfo PSDrive=HKLM
PSParentPath NoteProperty string PSParentPath=Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Wow...
PSPath NoteProperty string PSPath=Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Wow6432No...
PSProvider NoteProperty ProviderInfo PSProvider=Microsoft.PowerShell.Core\Registry
Publisher NoteProperty string Publisher=Microsoft Corporation
RepairPath NoteProperty string RepairPath="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installe...
UninstallString NoteProperty string UninstallString="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_ins...
LastAccessTime不是注册表项的属性
也许您可以使用安装路径并在其中获取可执行文件的ItemProperties,以确定上次使用软件的时间。我在注册表中没有看到使用
get ItemProperty
或get ChildItem
的名为LastAccessTime
的属性。显然,这里有一个LastWriteTime
属性,但检索它并不是件小事,这里有更多的阅读:你能编辑这个命令以便我也能在其中获取上一次写入时间吗get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall*|选择对象DisplayName,DisplayVersion,Publisher,InstallDate | Format Table-AutoSize@codaamokcan您可以给我那个脚本,它将显示我对这些给定内容的最后访问权限,我无法。信息根本就不存在。以上属性是您可以从注册表项中检索到的所有属性。您能告诉我任何可以同时告诉我上次访问时间和安装日期的命令吗