# 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](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/logonhours)

## EXAMPLES

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

New-RASLogonHours "My Logon Hours"

Creates a new logon hours rule with the specified name.

## RELATED LINKS

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