# New-RASLogonHours.md

## NAME

New-RASLogonHours

## SYNOPSIS

Creates a new logon hours rule.

## SYNTAX

**New-RASLogonHours** \[[Name](#name-string)] *(string)* \[\[-[SiteId](#siteid-string)] *(uint)*] \[[Description](#description-string) *(string)*] \[[Enabled](#enabled-string) *(bool)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

## DESCRIPTION

Creates a new logon hours rule.

## PARAMETERS

## Name (string)

The name of the target logon hours rule.

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

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

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

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

```
        Required?                    false

        Position?                    1

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Enabled (bool)

Enable or disable the logon hours rule upon creation.

If the parameter is omitted, the logon hours rule is initialised as disabled.

```
        Required?                    false

        Position?                    named

        Default value                True

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Description (string)

A user-defined logon hours rule description.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

(CommonParameters)

```
        This cmdlet supports the common parameters: Verbose, Debug,

        ErrorAction, ErrorVariable, WarningAction, WarningVariable,

        OutBuffer, PipelineVariable, and OutVariable. For more information, see 

        about_CommonParameters documentation. 
```

## INPUTS

-none-

## OUTPUTS

[LogonHours](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/logonhours.md)

## EXAMPLES

\*\*---------- EXAMPLE 1 ----------

New-RASLogonHours "My Logon Hours"

Creates a new logon hours rule with the specified name.

## RELATED LINKS

* [Get-RASLogonHours](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-raslogonhours.md)
* [Set-RASLogonHours](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raslogonhours.md)
* [Remove-RASLogonHours](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/remove-raslogonhours.md)
* [Set-RASLogonHoursOrder](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raslogonhoursorder.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-raslogonhours.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
