Tuesday, February 26, 2013

Find when a file was copied to a folder

Often you will find a file in a folder showing the DateModified column.
This value represents when the last changes were made  to this file.
However, a file might have been created way back and copied to a folder recently.

If you want to know when a file was copied to a folder, you can do that by Adding a column DateCreated.

 


You can also find it by passing the argument /T:C to dir command

 


 

Friday, February 22, 2013

Running PowerShell using PsExec

PsExec is used to run commands remotely on a machine.
I was trying to execute a PowerShell file remote using PsExec but the command would just hang.
Below is the command:

PsExec.exe \\MachineName powershell -File "FileName.ps1"

The fix was to run the command in an interactive mode by passing -i agrument to PsExec.
Here it is:

PsExec.exe -i \\MachineName powershell -File "FileName.ps1"

Sweet, the command ran fine this time!

Wednesday, February 20, 2013

VS 2010 - No Test Settings Available

I ran into an issue where I openend an exisitng test project which had multiple testsettings file but when I when to Test->Select Active Test Settings, it showed the below:













It turned out that the testsettings file were under a folder which was under "Solution Items". I moved the testsettings file one level up so that they are directly under "Solution Items" folder and it fixed the problem.