The first command creates a configuration object by using the New-AzVMSqlServerAutoPatchingConfig cmdlet.
The command stores the configuration in the $AutoPatchingConfig variable.
The second command gets the virtual machine named VirtualMachine11 in the Resource Group testrg by using the Get-AzVM cmdlet.
The command passes that object to the current cmdlet by using the pipeline operator.
The current cmdlet sets the automatic patching settings in $AutoPatchingConfig for the virtual machine.
The command passes the virtual machine to the Update-AzVM cmdlet.
Example 2: Set automatic backup settings on a virtual machine
The first command creates a configuration object by using the New-AzVMSqlServerAutoBackupConfig cmdlet.
The command stores the configuration in the $AutoBackupConfig variable.
The second command gets the virtual machine named VirtualMachine11 in the Resource Group testrg, and then passes it to the current cmdlet.
The current cmdlet sets the automatic backup settings in $AutoBackupConfig for the virtual machine.
The command passes the virtual machine to the Update-AzVM cmdlet.
Parameters
-AutoBackupSettings
Specifies the automatic SQL Server backup settings.
To create an AutoBackupSettings object , use the New-AzVMSqlServerAutoBackupConfig cmdlet.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.