I want to compare the present date with the one in a file
$fecha1=Get-Date -format "dd/MM/yyyy"
$fecha2=((Get-Item C:\HOSTSUPDATE\HOSTS).LastWriteTime).Tostring().substring(0,10)
if $fecha1 -eq $fecha2) {
}
Is there a better way of doing things?
I want to compare the present date with the one in a file
$fecha1=Get-Date -format "dd/MM/yyyy"
$fecha2=((Get-Item C:\HOSTSUPDATE\HOSTS).LastWriteTime).Tostring().substring(0,10)
if $fecha1 -eq $fecha2) {
}
Is there a better way of doing things?