To send message to Windows user via Powershell first we have to login to remote computer using PowerShell remoting (how to: https://obsluga-it.pl/powershell-remoting/) and put command:
msg console /server:localhost "Prosimy zapisać otwarte dokumenty i zrestartować komputer. Dziękujemy. Dział Informatyki."