Export (0) Print
Expand All
Expand Minimize

Set-SCServicingWindow

Updated: September 27, 2012

Applies To: System Center 2012 - Virtual Machine Manager

Set-SCServicingWindow

Modifies the properties of a servicing window.

Syntax

Parameter Set: NoFrequencyUpdate
Set-SCServicingWindow [-ServicingWindow] <ServicingWindow> [-Category <String> ] [-Description <String> ] [-JobVariable <String> ] [-MinutesDuration <Int32> ] [-Name <String> ] [-Owner <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-StartDate <DateTime> ] [-StartTimeOfDay <DateTime> ] [-TimeZone <Int32> ] [ <CommonParameters>]

Parameter Set: DailyFrequency
Set-SCServicingWindow [-ServicingWindow] <ServicingWindow> -DaysToRecur <Int32> [-Category <String> ] [-Description <String> ] [-JobVariable <String> ] [-MinutesDuration <Int32> ] [-Name <String> ] [-Owner <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-StartDate <DateTime> ] [-StartTimeOfDay <DateTime> ] [-TimeZone <Int32> ] [ <CommonParameters>]

Parameter Set: MonthlyFrequency
Set-SCServicingWindow [-ServicingWindow] <ServicingWindow> -DayOfMonth <DayOfMonthType> [-Category <String> ] [-Description <String> ] [-JobVariable <String> ] [-MinutesDuration <Int32> ] [-MonthsToRecur <Int32> ] [-Name <String> ] [-Owner <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-StartDate <DateTime> ] [-StartTimeOfDay <DateTime> ] [-TimeZone <Int32> ] [ <CommonParameters>]

Parameter Set: MonthlyRelativeFrequency
Set-SCServicingWindow [-ServicingWindow] <ServicingWindow> -MonthlyScheduleDayOfWeek <DayOfWeek> -WeekOfMonth <WeekOfMonthType> [-Category <String> ] [-Description <String> ] [-JobVariable <String> ] [-MinutesDuration <Int32> ] [-MonthsToRecur <Int32> ] [-Name <String> ] [-Owner <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-StartDate <DateTime> ] [-StartTimeOfDay <DateTime> ] [-TimeZone <Int32> ] [ <CommonParameters>]

Parameter Set: WeeklyFrequency
Set-SCServicingWindow [-ServicingWindow] <ServicingWindow> -WeeklyScheduleDayOfWeek <String> [-Category <String> ] [-Description <String> ] [-JobVariable <String> ] [-MinutesDuration <Int32> ] [-Name <String> ] [-Owner <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-StartDate <DateTime> ] [-StartTimeOfDay <DateTime> ] [-TimeZone <Int32> ] [-WeeksToRecur <Int32> ] [ <CommonParameters>]




Detailed Description

The Set-SCServicingWindow cmdlet modifies the properties of a servicing window, including the schedule for the servicing window.

For more information about Set-SCServicingWindow, type: "Get-Help Set-SCServicingWindow -online".

Parameters

-Category<String>

Specifies a category for a servicing window.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DayOfMonth<DayOfMonthType>

Specifies the ordinal day of the month on which the schedule starts. For example, 4 indicates the fourth day of the month. "Last" indicates the last day of the month.

The default value is the integer that corresponds to the same day as specified in the StartDate parameter.

Valid integer values: 1 through 31.

Valid string values: "First", "Last"


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DaysToRecur<Int32>

Specifies, in days, the amount of time between scheduled jobs.

Minimum value: 1

Maximum value: 999

Default value: 1

Example format (to schedule a job to recur every third day): -DaysToRecur 3


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MinutesDuration<Int32>

Specifies, in minutes, a period of time. For example, when used with New-SCServicingWindow or Set-SCServicingWindow, use this parameter to specify the amount of time for which to put a server or service into maintenance mode.

Example format: -DurationMinutes 120


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MonthlyScheduleDayOfWeek<DayOfWeek>

Specifies the day of the week to run a job that occurs on a monthly schedule. You can specify only one day of the week. The default value is the current day (if today is Tuesday, Tuesday is the default). Valid values to specify a specific day are: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

Requirement: Use with the parameter WeekOfMonth.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MonthsToRecur<Int32>

Specifies, in months, the amount of time between scheduled service windows

Minimum value: 1

Maximum value: None

Default value: 1

Example format (to schedule a service window to recur every other month): -MonthsToRecur 2


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Owner<String>

Specifies the owner of a VMM object in the form of a valid domain user account.

Example format: -Owner "Contoso\ReneeLo"

Example format: -Owner "ReneeLo@Contoso"


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServicingWindow<ServicingWindow>

Specifies a servicing window object.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-StartDate<DateTime>

Specifies the date to start a service window. The default value is the current date. You can type a new date in the short date format for your locale. Or, you can pass a Date-Time object from Get-Date.

Example format that specifies a DateTime object:

$StartDate = Get-Date -Year 2012 -Day 5 -Month 4

-StartDate $StartDate

Example formats that specifies a string:

-StartDate "August 19, 2011"

-StartDate "8/19/2011"


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StartTimeOfDay<DateTime>

Specifies the time of day, or a time-span during a 24-hour period, to start a job or other operation. The default value is the current time.

Example format: -StartTimeOfDay "08:00"

Example format for 2 hrs from 6:00pm: -StartTimeOfDay "18:00-20:00"


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TimeZone<Int32>

Specifies a number (an index) that identifies a geographical region that shares the same standard time. For a list of time zone indexes, see "Microsoft Time Zone Index Values" at: http://go.microsoft.com/fwlink/?LinkId=120935. If no time zone is specified, the default time zone used for a virtual machine is the same time zone setting that is on the virtual machine host.

Example format to specify the GMT Standard Time zone: -TimeZone 085


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WeeklyScheduleDayOfWeek<String>

Specifies one or more days of the week to run a job. The default value is the current day of the week. Valid values to specify an individual day by using a string: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. Valid values to specify a set of days in a week: Any set of two or more days separated by commas. Valid values to specify an individual day by using an integer: 1, 2, 3, 4, 5, 6, 7

Example format: -WeeklyScheduleDayOfWeek "Monday"

Example format: -WeeklyScheduleDayOfWeek "Monday, Wednesday, Friday"

Example format: -WeeklyScheduleDayOfWeek 5 (to specify a Friday)

Requirement: Use with StartTimeOfDay.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WeekOfMonth<WeekOfMonthType>

Specifies a week relative to the first day of the month, such as first, second, third, fourth, or last.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WeeksToRecur<Int32>

Specifies, in weeks, the amount of time between scheduled jobs.

Minimum value: 1

Maximum value: None

Default value: 1

Example format (to schedule a job to recur every other week): -WeeksToRecur 2


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • ServicingWindow

Examples

1: Change the start time of a servicing window.

The first command gets the servicing window object named Backup Staging A and stores the object in the $SvcWindow variable.

The second command changes the start time of the servicing window stored in $SvcWindow (Backup Staging A) to 1:00 PM in the GMT Standard time zone.


PS C:\> $SvcWindow = Get-SCServicingWindow -Name "Backup Staging A"PS C:\> Set-SCServicingWindow -ServicingWindow $SvcWindow -StartTimeOfDay "13:00" -TimeZone 085

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft