New-​Azure​VM​Sql​Server​Auto​Patching​Config

Creates a configuration object for virtual machine automatic patching.

Syntax

New-AzureVMSqlServerAutoPatchingConfig
   [-DayOfWeek <String>]
   [-Enable]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-MaintenanceWindowDuration <Int32>]
   [-MaintenanceWindowStartingHour <Int32>]
   [-PatchCategory <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.

Optional 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
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
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
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
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
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
Accept pipeline input:False
Accept wildcard characters:False
-PatchCategory

Specifies whether important updates should be included.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

AutoPatchingSettings

This cmdlet returns object contains settings for automated patching.