SynopsisSets a logon message on a local or remote computer.
- Set-LogonNotice [-Title] [-Message] [-ComputerName] [-Credential]
DescriptionThe Set-LogonNotice cmdlet is used to set a logon message, displayed before the user is presented with the logon box, on a local or remote computer.
- Title The title of the window displaying the logon message. Cannot be used when the Clear parameter has been specified.
- Message The message to be displayed at logon. Cannot be used when the Clear parameter has been specified.
- 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.
InputsSet-LogonNotice accepts the output of the Get-LogonNotice cmdlet as an input object. In addition, the Title, Message and ComputerName parameters each accept pipeline input by property name.
OutputsSet-LogonNotice makes changes directly to the Windows registry and does not output any Powershell objects.
NotesThe Set-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 1This command will set a logon notice on the local computer with the given Title and Message:
Set-LogonNotice -Title "Important Notice" -Message "Only authorized users are permitted to logon to this server."
Example 2This command will get the logon notice from computer PC01 and recreate it on computer PC02:
Get-LogonNotice -Computer PC01 | Set-LogonNotice -Computer PC02