Hello All,
I have updated the program with complete path of powershell.exe as below:
"%Windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -File Toast_PWD_Expiry.ps1
This solved the issue.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello All,
I am exploring to deploy Windows 10 Toast Notification from MECM (Configuration Manager)
Below is my sample toast PowerShell Script; which is working fine if I run it manually on system. However not running from MECM as Package Deployment.
$LauncherID = "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe"
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
[xml]$ToastTemplate = @"
<toast>
<visual>
<binding template="ToastImageAndText03">
<text id="1">My First Notification</text>
<text id="2">I am so excited I sent you this Kedar</text>
</binding>
</visual>
</toast>
"@
$ToastXml = [Windows.Data.Xml.Dom.XmlDocument]::New()
$ToastXml.LoadXml($ToastTemplate.OuterXml)
$ToastMessage = [Windows.UI.Notifications.ToastNotification]::New($ToastXML)
I have created package and program to deploy it as suggested in the below article:
https://byteben.com/bb/deploy-service-announcement-toast-notifications-in-windows-10-with-memcm/
However its failing with Program exit code -196608
Program Command is as: powershell.exe -ExecutionPolicy Bypass -File “Sample_Text_Toast.ps1
Please suggest where I am missing...Thanks in advance!
Regards,
Kedar
Hello All,
I have updated the program with complete path of powershell.exe as below:
"%Windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -File Toast_PWD_Expiry.ps1
This solved the issue.
Hi @Kedar Tamboli ,
We could try to put these scripts in script in SCCM to check if it runs normal and put these files to shared path.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hello kedar,
Consider using the Scripts feature in the Configuration Manager console. Scripts may be a better solution for some of the preceding scenarios instead of using packages and programs.
Try troubleshooting by considering the below steps
When you migrate packages from an earlier version of Configuration Manager, you can deploy them in your Configuration Manager hierarchy. After the migration is complete, the packages appear in the Packages node in the Software Library workspace.
You can modify and deploy these packages in the same way you did by using software distribution. The Import-Package from Definition Wizard remains in Configuration Manager to import legacy packages. Advertisements are converted to deployments when you migrate from Configuration Manager 2007 to a Configuration Manager hierarchy.
For Better understanding do click the below link regarding MECM (Configuration Manager)
https://video2.skills-academy.com/en-us/mem/configmgr/apps/deploy-use/packages-and-programs
If you use maintenance windows on the same collection to which you deploy this program, a conflict could occur if the Maximum allowed run time is longer than the scheduled maintenance window. If you set the maximum run time to Unknown, the program starts to run during the maintenance window. It then continues to run as needed after the maintenance window is closed. If you set the maximum run time to a specific period that's greater than the length of any available maintenance window, then the client doesn't run the program.
Hope this answers all your queries, if not please do repost back.
If an Answer is helpful, please click "Accept Answer" and upvote it : )
Regards,
Jainth