Скрипт PowerShell для проверки статуса URL

Похоже на этот вопрос здесь Я пытаюсь отслеживать, работает ли набор ссылок на веб-сайт или не отвечает. Я нашел тот же скрипт PowerShell через Интернет.

Однако вместо прямых ссылок на веб-сайты мне нужно проверить более конкретные ссылки, например:

http://mypage.global/Chemical/

http://maypage2:9080/portal/site/hotpot/

Когда я пытаюсь проверить статус этих ссылок, я получаю следующий вывод:

URL    StatusCode    StatusDescription    ResponseLength    TimeTaken
http://mypage.global/Chemical/    0
http://maypage2:9080/portal/site/hotpot/    0

Приведенные выше ссылки требуют, чтобы я был подключен к VPN, но я могу получить доступ к этим ссылкам из браузера.

Выход:Invoke-WebRequest -Uri https://stackoverflow.com/questions/20259251/powershell-script-to-check-the-status-of-a-url

PS C:\Users\682126> Invoke-WebRequest -Uri https://stackoverflow.com/questions/20259251/powershell-script-to-check-the-status-of-a-url

The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:18
+ Invoke-WebRequest <  -Uri https://stackoverflow.com/questions/20259251/powershell-script-to-check-the-status-of-a-url > tmp.txt
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Ответы на вопрос(5)

Ваш ответ на вопрос