更改 Azure 虚拟机规模集的 windows 注册表

Change windows registry of Azure Virtual Machine Scale Set

我想使用 Microsoft 提供的映像并更改注册表以禁用弱密码和 TLS。 在预配过程中更改 Azure 虚拟机规模集注册表的最佳方法是什么

这种情况下,最好的办法就是execute scripts on Azure VMs with Custom Script Extension。脚本可以从 Azure 存储或 GitHub 下载,或在扩展 运行 时提供给 Azure 门户。有关如何使用自定义脚本扩展安装应用的更多信息,请参阅以下教程:

此外,您可以使用 Set-ItemProperty or reg add 创建注册表项和值。 例如,

Set-ItemProperty -Path "HKLM:\Software\ContosoCompany" -Name "NoOfEmployees" -Value 823
Get-ItemProperty -Path "HKLM:\Software\ContosoCompany"

PSPath        : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software\contosocompany
PSParentPath  : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software
PSChildName   : contosocompany
PSDrive       : HKLM
PSProvider    : Microsoft.PowerShell.Core\Registry
NoOfLocations : 2
NoOfEmployees : 823