From scheduled tasks (Windows Server 2012) I need to call an url like "http://www.example.com/file.aspx
" each night. The file ("file.aspx") does not return anything, it only contains code to send out remind emails and stuff like that.
As I understand I should use PowerShell, the only thing I don't understand is what arguments I should use if I only want to call / execute an url.
Is this the correct arguments for my needs:
powershell.exe -command "(new-object system.net.webclient).down
Or should I use "Invoke-WebRequest" like this:
PowerShell Invoke-WebRequest -Uri http://example.com/file.aspx
Or should I use Invoke-RestMethod since I don't want to look at the HTTP response?
Or should I do something else?