大家好,又见面了,我是全栈君。
# Windows Password Rest
$extension = “VMAccessAgent”
$publisher = “Microsoft.Compute”
$ver = “2.*”
$publicConf = ‘{“UserName”:”DemoUser”}’
$privateConf = ‘{“Password”:”Passw0rd!”}’
$vm = Get-AzureVM -ServiceName DemoCloudService -Name DemoVM
Set-AzureVMExtension -VM $vm -ExtensionName $extension -Publisher $publisher -Version $ver -PublicConfiguration $publicConf -PrivateConfiguration $privateConf | Update-AzureVM
$ Linux Password Rest
$extension = “VMAccessForLinux”
$publisher = “Microsoft.OSTCExtensions”
$ver = “1.*”
$privateConf = ‘{“username”:”DemoUser”, “password”:”Passw0rd!”}’
$vm = Get-AzureVM -ServiceName DemoCloudService -Name DemoLinuxVM
Set-AzureVMExtension -VM $vm -ExtensionName $extension -Publisher $publisher -Version $ver -PrivateConfiguration $privateConf | Update-AzureVM
转载于:https://www.cnblogs.com/wuzhenzhou/p/6909677.html
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/108472.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...