1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$username = "admin" $secure_string_pwd = convertto-securestring "admin" -asplaintext -force $credentials = New-Object System.Management.Automation.PSCredential -ArgumentList @($username,$secure_string_pwd) try { $web = Invoke-WebRequest -Uri "https://lemiro.ru" -Method GET -Credential $credentials $web.content } catch { $_.Exception.Message } |