New-AzureVMSqlServerAutoPatchingConfig
Creates a configuration object for virtual machine automatic patching.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
New-AzureVMSqlServerAutoPatchingConfig
[-Enable]
[-DayOfWeek <String>]
[-MaintenanceWindowStartingHour <Int32>]
[-MaintenanceWindowDuration <Int32>]
[-PatchCategory <String>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Description
The New-AzureVMSqlServerAutoPatchingConfig cmdlet creates a configuration object for virtual machine automatic patching.
Examples
Example 1: Create a configuration object to configure automatic patching
PS C:\> $APS = New-AzureVMSqlServerAutoPatchingConfig -Enable -DayOfWeek "Thursday" -MaintenanceWindowStartingHour 11 -MaintenanceWindowDuration 120 -PatchCategory "Important"
Enable : True
DayOfWeek : Thursday
MaintenanceWindowStartingHour : 11
MaintenanceWindowDuration : 120
PatchCategory : Important
This command creates configuration object that can be used to configure automatic patching using Set-AzureVMSqlServerExtension.
Parameters
-DayOfWeek
Specifies the day of the week when updates should be installed.
The acceptable values for this parameter are:
- Sunday
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Everyday
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Enable
Indicates that automated patching for the virtual machine is enabled. If you enable automated patching the cmdlet will put Windows Update into interactive mode. If you disable automated patching, Windows Update settings will not change.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationAction
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Type: | ActionPreference |
Aliases: | infa |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationVariable
Specifies an information variable.
Type: | String |
Aliases: | iv |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaintenanceWindowDuration
Specifies the duration of the maintenance window. Automated patching will avoid performing an action that can impact a virtual machine availability outside of that window. Only 30 minutes increments are allowed.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaintenanceWindowStartingHour
Specifies the hour of the day when maintenance window starts. This time defines when updates start installing and is rounded to the hour.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PatchCategory
Specifies whether important updates should be included.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
AutoPatchingSettings
This cmdlet returns object contains settings for automated patching.