Add Lock screen message
  • 27 Sep 2023
  • 1 読む分
  • PDF

Add Lock screen message

  • PDF

The content is currently unavailable in Ja - 日本語. You are viewing the default English version.
記事の要約

The following PowerShell script helps the IT Admins to add a message on the Lock screen on Windows 10 & above devices.

  • Create a file on your desktop, for example, configure_lock_screen_message.ps1 and open it in a text editor like notepad++
  • Copy the contents below to the file or click here to download the file.
    Shell
    $RegKey = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System'
    
    $RegNameLockScreenTitle = 'legalnoticecaption'
    $RegValueLockScreenTitle = 'lock_screen_title!'
    
    $RegNameLockScreenMessage = 'legalnoticetext'
    $RegValueLockScreenMessage = 'lock_screen_message.'
    
    $exists = Test-Path $RegKey
    if ($exists) {
        Set-ItemProperty -Path $RegKey -Name $RegNameLockScreenTitle -Value $RegValueLockScreenTitle -Force | Out-Null
    	
    	Set-ItemProperty -Path $RegKey -Name $RegNameLockScreenMessage -Value $RegValueLockScreenMessage -Force | Out-Null
    	
    	#Uncomment below line (i.e. remove #) as machine needs reboot for above changes to take into effect
    	#Restart-Computer -Force
    }

  • Replace the content in front of the placeholder $RegValueLockScreenTitle = 'lock_screen_title!' with the title of the message that would like to have. For example:
    Shell
    $RegValueLockScreenTitle = 'Attention!'

  • Replace the content in front of the placeholder $RegValueLockScreenMessage = 'lock_screen_message.' with the message that you would like to show on the lock screen.
    Shell
    $RegValueLockScreenMessage = 'This is a private System. Only Authorized users are allowed to login.'

  • Once done, save the file and proceed to upload the script on the dashboard.
  • Follow our guide to upload & publish the PowerShell script using Scalefusion Dashboard.
  • Once the script is successfully executed, you will be able to see the status of the same in the View Statusreport on the Scalefusion dashboard.
    • Click on the PowerShell script and click on the View Status report.
    • Executed means that the script has run successfully on the device.
    • Here is how the Lock screen message will look on the device.
Please ask the user to reboot the device once in case changes do not reflect on the device(s).

Please note that to use the PowerShell scripts, the Scalefusion MDM Agent Application must be installed on the device(s). Please follow our guide to publish and install the Scalefusion MDM Agent Application.

Notes:
  1. The scripts and their contents are sourced from various albeit authenticated Microsoft sources and forums.
  2. Please validate the scripts on a test machine before deploying them on all your managed devices.
  3. Scalefusion has tested these scripts, however, Scalefusion will not be responsible for any loss of data or system malfunction that may arise due to the incorrect usage of these scripts.



この記事は役に立ちましたか?