After spending hours on google and trying a hell lot of stuff. I found that the problem was with the Power shell script.
The below PS script works. If you can tell Why this one works but not the above one it will be great.
$null = [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime]
$null = [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime]
$App = "af954980-b64d-4c13-858f-614bcbeb295e_304r6e67w7w2y!App"
[xml]$Toast = @"
<toast duration="short">
<visual>
<binding template="ToastGeneric">
<image placement="appLogoOverride" src="C:UsersdksilOneDriveDesktopGos.jpg" />
<text>Hello</text>
<text>Deepak Dash</text>
</binding>
</visual>
<audio src="ms-winsoundevent:Notification.Default" loop="false" />
<actions>
<action activationType="Protocol" content="I'm a button" arguments="C:UsersdksilOneDriveDesktopGo" />
</actions>
</toast>
"@
# Load the notification into the required format
$ToastXml = New-Object -TypeName Windows.Data.Xml.Dom.XmlDocument
$ToastXml.LoadXml($Toast.OuterXml)
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($App).Show($ToastXml)
Note - I have also tried by setting $App as "af954980-b64d-4c13-858f-614bcbeb295e_304r6e67w7w2y!App". This also did not work for the previous PS script.
Thanks,
Deepak Dash
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…