Try the following:
https://www.youtube.com/watch?v=aO28chpIf6Q
or
https://learn.microsoft.com/en-us/answers/questions/1088698/using-logon-scrips-to-show-message
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin