external help file | Module Name | online version | schema |
---|---|---|---|
WindowsUpdateSetting-help.xml |
WindowsUpdateSetting |
2.0.0 |
Configure Windows active hours.
Set-WindowsActiveHours [-StartTime] <DateTime> [-EndTime] <DateTime> [-Passthru] [-WhatIf] [-Confirm] [<CommonParameters>]
Use this command to configure your active hours. During this time span, Windows should not restart your computer. The time span between start and end times cannot exceed 18 hours.
PS C:\> Set-WindowsActiveHours -starttime "7:00AM" -endtime "6:00PM"
PS C:\> Set-WindowsActiveHours -StartTime 8:00 -EndTime 20:00 -Passthru
Computername Start End
------------ ----- ---
PROSPERO 08:00 AM 08:00 PM
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Enter a ending time like 7:00PM or 19:00
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Display active hours
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Enter a starting time like 7:00AM or 7:00
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Learn more about PowerShell: https://buttondown.com/behind-the-powershell-pipeline