I am trying to create a msgbox that will list the file name and last modified date of the files in the folder. This is my code so far:
$Results = Get-ChildItem "C:\Temp" -recurse
Foreach ($Result in $Results)
{
$Result2 = $Result.name
$Result3 = $Result.lastwritetime
[Windows.Forms.MessageBox]::Show($Result2+" - "+$Result3, “Files Updated”, [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
}
This works except if lists each file separately. I am looking for one msg box that lists ALL files like:
File1.txt 10/1/2013 10:00 AM
File2.txt 10/1/2013 10:02 AM