I changed the command to:
PS SQLSERVER:\SQL\127.0.0.1\DEFAULT\Databases>Backup-SqlDatabase -Database "DatabaseName" -BackupContainer "https://StorageAccountName.blob.core.windows.net/ContainerName/" -CopyOnly
or
PS SQLSERVER:\SQL\127.0.0.1\DEFAULT\Databases>Backup-SqlDatabase -Database "DatabaseName" -BackupContainer "https://StorageAccountName.blob.core.windows.net/ContainerName/DatabaseName-FullCopyOnly-20221107.bak" -CopyOnly
, and the error became:
Backup-SqlDatabase : System.Data.SqlClient.SqlError: Cannot open backup device 'https://StorageAccountName.blob.core.windows.net/ContainerName/ComputerName-MSSQL15.MSSQLSERVER-DatabaseName-133122599838620925.bak'. Operating system error 50(The request is not supported.).
At line:1 char:1
- Backup-SqlDatabase -Database "DatabaseName" -BackupContainer "https://Stor ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [Backup-SqlDatabase], SmoException
- FullyQualifiedErrorId : ExecutionFailed,Microsoft.SqlServer.Management.PowerShell.BackupSqlDatabaseCommand
This similar error as above also occurred when I ran following T-SQL in SSMS:
BACKUP DATABASE [DatabaseName] TO URL = N'https://StorageAccountName.blob.core.windows.net/ContainerName/DBName_20221107.bak' WITH COPY_ONLY, NOREWIND
GO
Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'https://StorageAccountName.blob.core.windows.net/ContainerName/DBName_20221107.bak'. Operating system error 50(The request is not supported.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
The Account kind of storage account is "Storage (general purpose v1)".