The issue is not related to CouchDB, rather the allowed authentication methods with Invoke-WebRequest.
Though I cannot find any documentation that explicitly states URL credentials are not supported, I do find in the PowerShell documentation1 a list of authentication methods that are supported:
-Authentication
Specifies the explicit authentication type to use for the request. The default is None. Authentication cannot be used with
UseDefaultCredentials.
Available Authentication Options:
None: This is the default option when Authentication isn't supplied;
no explicit authentication is used.
Basic: Requires Credential. The credentials are sent in an RFC 7617 Basic Authentication header in the format of
base64(user:password).
Bearer: Requires Token. Sends an RFC
6750 Authorization: Bearer header with the supplied token. This is an
alias for OAuth
OAuth: Requires Token. Sends an RFC 6750
Authorization: Bearer header with the supplied token. This is an alias
for Bearer
I interpret the above to mean the authentication method you are using is not supported.
Here's one example using Basic authentication, one of surely hundreds of ways to perform your task.
# setup variables to form a HTTP Basic Authorization
$uid = "<username>"
$pwd = "<password>"
# Convert the Basic credentials to bytes
$atob = [System.Text.Encoding]::UTF8.GetBytes($uid +":" + $pwd)
# To Base64 encoding
$auth = "Basic " + [System.Convert]::ToBase64String($atob)
# Create the database
Invoke-WebRequest -Method PUT -Url http://127.0.0.1:5964/abc -Headers @{"Authorization"=$auth}
FWIW, cURL allows the ease of inline URL http authentication, but that may not be an option.
The above code borrows from this SO Q/A answer regarding Basic authentication.
1 PowerShell Documentation Version 7