Powershell: URL Check , bei Output Serice Restart
Hallo zusammen
Ich stehe im Moment auf dem Schlauch.
Hat jemand evtl. gleiches schon mal umsetzen müssen mit Powershell:
1. URL: http://xxxx aufruf
2. Check URL Output, ober er folgendes enthält: "Services are running)
3. Bedingung: Wenn String enthalten soll er nichts machen, wenn String nicht vorhanden, soll der Service X gestartet werden
Danke und Gruss
adminst
Ich stehe im Moment auf dem Schlauch.
Hat jemand evtl. gleiches schon mal umsetzen müssen mit Powershell:
1. URL: http://xxxx aufruf
2. Check URL Output, ober er folgendes enthält: "Services are running)
3. Bedingung: Wenn String enthalten soll er nichts machen, wenn String nicht vorhanden, soll der Service X gestartet werden
Danke und Gruss
adminst
Please also mark the comments that contributed to the solution of the article
Content-Key: 374680
Url: https://administrator.de/contentid/374680
Printed on: May 10, 2024 at 08:05 o'clock
3 Comments
Latest comment
If ((iwr -Uri 'http://url' -EA Stop).Content -notmatch "Services are running"){start-service 'XYZ'}