I have basic authentatication working with REST API using curl:
curl -X POST -H \'Accept: application/json\' -u user:password http://localhost/test/
Your code looks good, I would try adding HTTP_AUTHORIZATION header for $webrequest like this:
$webRequest.Headers.Add("AUTHORIZATION", "Basic YTph");
Where YTph would be the base64encoded string for username : password.