This cmdlet is part of the Vexasoft Cmdlet Library. You can download it now or click here to find out more.

Get-LogonNotice

Synopsis

Gets the logon message on the local or a remote computer.

Syntax

  • Get-LogonNotice [-ComputerName] [-Credential]

Description

The Get-LogonNotice cmdlet retrieves the logon message, displayed before the user is presented with the logon box, on a local or remote computer.

Parameters

  • ComputerName The computer against which to run the cmdlet. By default this parameter will be populated with the name of the local computer.
  • Credential The credentials under which to run the cmdlet. By default this cmdlet will run as the current user. Using this parameter and the Get-PSCredential cmdlet you can specify an alternate set of credentials under which to execute this command.

Inputs

Get-LogonNotice accepts pipeline input only for the ComputerName parameter and requires that the input object contain a property named either Computer, CN or ComputerName.

Outputs

Get-LogonNotice returns a Vexasoft.LogonNotice object detailing the title and message of the logon notice. If the computer does not have a configured logon notice, no object is returned.

Notes

The Get-LogonNotice cmdlet requires that the RPC service is started on the computer it is trying to access and that DNS services are available to resolve target host names.

Example 1

This command will retrieve the logon box title and message for the local computer.

C:\PS>Get-LogonNotice

Example 2

Identical to the first example, but aimed at a remote machine, this command will retrieve the logon box title and message for the computer PC01:

C:\PS>Get-LogonNotice -ComputerName PC01