我有一个PowerShell
代码,我把它叫做做的吐司通知.NET
参考,它的作品擅长以前的更新。但得到的窗口时10秋季创(FCU)更新,它走了,同样的代码不是现在的工作:
Toast通知不工作在Windows秋天创更新
$app = "HTML Report"
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime]
$Template = [Windows.UI.Notifications.ToastTemplateType]::ToastImageAndText01
#Gets the Template XML so we can manipulate the values
[xml]$ToastTemplate = ([Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent($Template).GetXml())
[xml]$ToastTemplate = @"
<toast launch="app-defined-string">
<visual>
<binding template="ToastGeneric">
<text>DNS Alert...</text>
<text>We noticed that you are near Wasaki. Thomas left a 5 star rating after his last visit, do you want to try it?</text>
</binding>
</visual>
<actions>
<action activationType="background" content="Remind me later" arguments="later"/>
</actions>
</toast>
"@
$ToastXml = New-Object -TypeName Windows.Data.Xml.Dom.XmlDocument
$ToastXml.LoadXml($ToastTemplate.OuterXml)
$notify = [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($app)
$notify.Show($ToastXml)
的[burnttoast模块(https://github.com/Windos/BurntToast)具有约1709的一些说明和变化对于AppIDs。这是[GitHub提交](https:// github。com/Windos/BurntToast/commit/674b80c9fbbd689a729c1fd2c3dedd386843a5a4)与他们所做的更改,希望有助于。 – BenH
我使用自己的代码,他说他的代码 – Aso