简体   繁体   中英

Powershell script monitor website that requires login?

I'm somewhat new to PowerShell, but can do some things. I have to monitor a website that's hosted on a 2008r2 server. I've found scripts online that might work for a regular site. In my case I need to monitor a website that requires user authentication from a domain user and I have an account I can use, although encrypting the creds would be great! The next trick which I haven't figure out how to do is after a user logs into the website they are on a landing page. Next they have to click a tab/link at the top of the page to get to the web page which is actually failing. It's a homegrown app that was just developed. It appears like it's an asp type error, but I need to monitor further to then gather data to troubleshoot. The web group "can't assist" with this it seems.... I'm enjoying learning anyway, can anyone help me?

You should be able to use curl.exe for Windows with Powershell ( http://curl.haxx.se/download.html )

I used curl a lot to monitor sites with a POST of credentials etc.

For example:

curl.exe http://username:password@api.somesite.com/test/blah?something=123

Please read through this: http://curl.haxx.se/docs/manpage.html to get an idea of all the possible options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM