我正在尝试设置一个 PowerShell 脚本以在我们的 Azure SQL Server 数据库上启用始终加密。我正在遵循本指南,其中提供了以下示例代码:
# Import the SqlServer module
Import-Module "SqlServer"
# Connect to your database
# Set the valid server name, database name and authentication keywords in the connection string
$serverName = "<Azure SQL server name>.database.windows.net"
$databaseName = "<database name>"
$connStr = "Server = " + $serverName + "; Database = " + $databaseName + "; Authentication = Active Directory Integrated"
$database = Get-SqlDatabase -ConnectionString $connStr
# List column master keys for the specified …Run Code Online (Sandbox Code Playgroud)