For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set-RASLogonHours

SYNOPSIS

Modifies a logon hours rule.

SYNTAX

Set-RASLogonHours [-Id] <uint> [-Description <string>] [-Enabled <bool>] [-NewName <string>]
 [<CommonParameters>]
Set-RASLogonHours [-InputObject] <LogonHours> [-Description <string>] [-Enabled <bool>]
 [-NewName <string>] [<CommonParameters>]
Set-RASLogonHours [-Name] <string> [[-SiteId] <uint>] [-Description <string>] [-Enabled <bool>]
 [-NewName <string>] [<CommonParameters>]

DESCRIPTION

Modifies a logon hours rule.

EXAMPLES

Example 1

Set-RASLogonHours "My LogonHours" -Enabled $False

Disables the logon hours rule specified by name.

Example 2

Disables the logon hours rule specified by ID.

Example 3

Disables the logon hours rule specified by the $LogonHours variable (an object of type LogonHours).

PARAMETERS

-Name

The name of the target logon hours rule.

This must be the actual logon hours rule name used in the RAS Farm.

-SiteId

Site ID in which to modify the specified logon hours rule.

If the parameter is omitted, the Site ID of the Licensing Server will be used.

-Id

The ID of the logon hours rule to modify.

To obtain the ID, use the Get-LogonHours cmdlet.

-InputObject

The logon hours rule to modify.

To obtain an object of type LogonHours representing a logon hours rule, use the Get-LogonHours cmdlet.

Type reference: LogonHours

-Enabled

Enable or disable the specified logon hours rule in a Site.

-NewName

The new name of the target logon hours rule.

-Description

A user-defined LogonHours description.

CommonParameters

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

INPUTS

LogonHours

OUTPUTS

None

Last updated