Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Getting correct date format when using "Win32Reg_AddRemovePrograms64"

$
0
0

Hello fellow PowerShell users,

I have the SCCM client installed on servers and as a result I'm looking to see what 64bit software is installed on each of them. 

So for that I using the following command

get-wmiobject -Class Win32Reg_AddRemovePrograms64 -ComputerName server |
where {$_.DisplayName -notlike "*hotfix*" -and $_.DisplayName -notlike "*Security Update*" -and  $_.DisplayName -notlike "*Update for Windows *"} |
select DisplayName,Version,Publisher,InstallDate

What I'd like to do is get the "InstallDate" to show by Day.Month.Year. so tried to see what this would get

@{label="Date Installed"; expression={$_.ConverttoDateTime($_.InstallDate)}}
but this returns with not dates showing....Any ideas?
 

Viewing all articles
Browse latest Browse all 21975

Trending Articles



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