winlogon

Manage the Windows Logon Message

Matthew Stone

souldo

9,150 downloads

9,150 latest version

3.8 quality score

Version information

  • 1.0.0 (latest)
released Oct 23rd 2014

Start using this module

Documentation

souldo/winlogon — version 1.0.0 Oct 23rd 2014

winlogon

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.

Overview

winlogon is a defined type that manages the logon message that pops up before the username and password prompt on a Windows server.

Module Description

The winlogon defined type edits two values in the registry:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeCaption
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeText

Any value will cause the logon screen to appear. A null entry will remove the screen.

Usage

Parameters

ensure  => present | absent  # set the ensure status
caption => 'your caption message here' # the caption, defaults to $title
message => 'your message here' # the message, defaults to $title

If you need multiple paragraphs, you can use an array for the message, or use double quotes and the \n escape character in the message string.

Examples:

Set caption and message to "AUTHORIZED USERS ONLY":

winlogon { 'AUTHORIZED USERS ONLY' : }

Set caption and a separate message:

winlogon { 'AUTHORIZED USERS ONLY' :
  message => 'This system is for authorized users only.  All logins will be reported',
}

Set caption and a really long message :

winlogon { 'AUTHORIZED USERS ONLY' :
  message => ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.',
    'Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.',
    'Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue.'],
}

Reference

Defined Type: winlogon

Limitations

Tested on Windows 2008 R2 and Windows 2012 R2 with Windows Management Framework 3.0 and greater.