1
Hello, I am trying to display the date of creation and modification of a directory using the powershell, I am using the command:
Get-WmiObject Win32_Directory -filter 'Drive="C:" and Path="\\"' -ComputerName MyPC |
select FileName,LastModified -First 3
but the return I have is a string:
FileName LastModified
-------- ------------
$recycle.bin 20151022091602.219458-120
0f74e86e50f02a5493eece53fbe1da58 20141005215102.861881-180
384d408957a87176de 20141004215102.325431-180
How to display the date or to convert these string to date?
The command doesn’t work when I want to get the information from a remote machine. For that I would have to use invoke-comand, but I was able to format the output to the pattern I wanted.
– Junior Almeida