Einen Link Powershell ausführen
Hallo,
bisher hatte ich nichts mit Powerhell zu tun, hatte das eigentlich auch nicht vor.
Nun erwartet man aber von mir, dass ich einen bestimmten Link(lokal) mit Powershell aufrufe.
Mit Batch habe ich das hinbekommen, aber dann öffnet sich nur der IE, und das war es dann.
Ist das ähnlich zu realisieren wie mit Batch, oder muss ich hier erst eine Art Runtime installieren?
Und wie sieht die Syntax aus.
Das ganze soll dann per Scheduled Task ausgeführt werden.
System: Win Server 2008 R2 Standard.
Danke im voraus.
Grüße Keios
bisher hatte ich nichts mit Powerhell zu tun, hatte das eigentlich auch nicht vor.
Nun erwartet man aber von mir, dass ich einen bestimmten Link(lokal) mit Powershell aufrufe.
Mit Batch habe ich das hinbekommen, aber dann öffnet sich nur der IE, und das war es dann.
Ist das ähnlich zu realisieren wie mit Batch, oder muss ich hier erst eine Art Runtime installieren?
Und wie sieht die Syntax aus.
Das ganze soll dann per Scheduled Task ausgeführt werden.
System: Win Server 2008 R2 Standard.
Danke im voraus.
Grüße Keios
Please also mark the comments that contributed to the solution of the article
Content-Key: 312066
Url: https://administrator.de/contentid/312066
Printed on: April 24, 2024 at 11:04 o'clock
6 Comments
Latest comment
start-process "http://domain.com"
In eine *.ps1-Datei?
Tiberius
Das ganze in einer*.bat funktioniert nicht wirklich.
Das ist dann ja auch kein Powershell.Danke
BitteTiberius
You asked for Powershell not Batch my friend !
In the scheduled task enter powershell.exe as command path. Then under arguments enter:
So you don't need any batch for this. This can be totally saved inside the scheduled task.
Inside a Batch you can call a powershell command or script like this:
IMPORTANT: Be sure to start the scheduled task in the context of the user who is logged in otherwise no one will ever see the window of the website!!
Regards
In the scheduled task enter powershell.exe as command path. Then under arguments enter:
-Executionpolicy ByPass -windowstyle hidden -NoProfile -Command "start-process 'http://localhost/AP3/AP3cron.php'"
Inside a Batch you can call a powershell command or script like this:
powershell -Executionpolicy ByPass -windowstyle hidden -NoProfile -Command "start-process 'http://localhost/AP3/AP3cron.php'"
IMPORTANT: Be sure to start the scheduled task in the context of the user who is logged in otherwise no one will ever see the window of the website!!
Regards