Hello, I'm trying to execute a little script in order to know if a file has been correctly updated.
The script is the following
(get-item c:\test.txt).lastwritetime.date.CompareTo([DateTime]::Today)
and is at the root of the hdd: C:\validateBackup.ps1
At least, the script runs correctly on the server, and return -1 or 0 if it's ok.
My problem is now to run it from another server with the dude, I saw this topic but it is using VBS, so I tried this :
array_element(execute("powershell.exe","C:\\validateBackup.ps1","C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\"),1)
and others like this one but nothing is returned.
Could someone help me please ?