The Add-CVBlackoutWindow cmdlet adds a blackout window rule in the CommCell environment. When you add a blackout window to an entity, by default, the blackout window rules apply to all lower level entities.
Before you can use this cmdlet, you must log on to your CommCell environment using the Connect-CVServer cmdlet. For more information, see Connecting to a CommCell Environment with PowerShell.
Syntax
Add-CVBlackoutWindow [-Properties] Object [-Force] [-WhatIf] [-Confirm] [CommonParameters]Required Parameters
|
Parameter |
Description |
Data type |
Values |
Accepts pipeline input? |
Accepts wildcard characters? |
Type of parameter |
|---|---|---|---|---|---|---|
|
|
The properties of the blackout window rule. |
Object |
Yes, by:
|
No |
Positional: 1 |
For more information about parameters that are required to add a blackout window, see Creating an Operation Rule (REST API: POST)
Optional Parameters
Microsoft PowerShell Parameters
You can use the following Microsoft PowerShell parameters:
-
Debug
-
ErrorAction
-
ErrorVariable
-
OutBuffer
-
OutVariable
-
PipelineVariable
-
Verbose
-
WarningAction
-
WarningVariable
-
Force
-
Confirm
-
WhatIf
Note
Only a few cmdlets support Force, Confirm, and WhatIf parameters.
For more information, see "About Common Parameters" in the Microsoft PowerShell documentation.
Input
This cmdlet accepts parameters as piped input or command line.
You must specify Epoch timestamp value at 12 AM for startDate and endDate parameters. In startTime and endTime, specify the number of seconds from 12 AM of the start date and end date respectively.
Output
A PSCustomObject that contains the job submission results.
Example
This example adds a blackout window rule in the CommCell environment.
PS C:\>$props = @"
{
"operationWindow": {
"endDate": 1521691200,
"name": "Holiday_1",
"startDate": 1520485200,
"operations": [
1,
2
],
"dayTime": [
{
"startTime": 46800,
"endTime": 50400,
"dayOfWeek": [
1,
2
]
}
]
},
"entity": {
"clientGroupId": 0,
"clientId": 2
}
}"@
PS C:\>$propobj = $prop | ConvertFrom-Json
PS C:\>$propobj | Add-CVBlackoutWindow -Force