Tuesday, February 3, 2015

Retrive folder created date in powershell


[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null

$dir = "D:\Script_Out"
$creation_time = $dir | Select CreationTime
"$creation_time" | Out-File 'D:\creationtime.txt'

I tried executing the above.... The file has been created but the file has @{CreationTime=} value....


No comments:

Post a Comment