Загрузка данных


$Notification = @'
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlString, ContentType = WindowsRuntime] | Out-Null
'@

# Текст самого уведомления
$Title = "⚠️ ВНИМАНИЕ! РАБОЧИЙ СТОЛ ОЧИЩАЕТСЯ"
$Text  = "Файлы после перезагрузки удаляются. Сохраняйте работы на СЕТЕВОЙ ДИСК!"

# Собираем структуру всплывающего окна
$Template = "<toast><visual><binding template='ToastGeneric'><text>$Title</text><text>$Text</text></binding></visual></toast>"
$Xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$Xml.LoadXml($Template)

# Выводим на экран над часами
$Toast = New-Object Windows.UI.Notifications.ToastNotification $Xml
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("Windows").Show($Toast)