Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Username = "username"
- $Password = "password"
- # GET Stamps.com Login page
- $R = Invoke-WebRequest https://print.stamps.com/webpostage/signin/default.aspx -SessionVariable StampsCom
- $Form = $R.Forms[0]
- # Fill in login credentials
- $Form.Fields["UserNameTextBox"] = $Username
- $Form.Fields["PasswordTextBox"] = $Password
- # Login to Stamps.com
- $R = Invoke-WebRequest -Uri ("https://print.stamps.com/webpostage/ajax/AuthenticateUser.aspx?LoginSource=SigninPage" + $Form.Action) -WebSession $StampsCom -Method POST -Body $Form.Fields
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement