私はトースト通知のために.NET
という参照を付けたPowerShell
コードを持っています。ウィンドウを得たときに10秋のクリエーター、それがなくなって(FCU)更新、しかし、同じコードが動作していない:
コメントで述べたように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についてのメモとAppIDに関する変更があります。ここには[GitHubコミット](https:// github。com/Windos/BurntToast/commit/674b80c9fbbd689a729c1fd2c3dedd386843a5a4)を変更して、うまくいけばそれが役に立ちます。 – BenH
私は自分のコードを使用しています、彼は彼にコードを話しました – Aso