向操作中心添加通知的脚本化方式? [英] Scriptable way to add notification to Action Center?

查看:27
本文介绍了向操作中心添加通知的脚本化方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mac有一种方法可以从命令行发布通知.

是否有一个 Windows 10 相当于将一个简单的通知放入操作中心?

Is there a Windows 10 equivalent to putting a simple notification into the Action Center?

推荐答案

这是您可以使用的东西吗?https://technet.microsoft.com/en-us/library/ff730952.aspx

Is this something you could use? https://technet.microsoft.com/en-us/library/ff730952.aspx

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon 

$objNotifyIcon.Icon = "C:\Scripts\Forms\Folder.ico"
$objNotifyIcon.BalloonTipIcon = "Error" 
$objNotifyIcon.BalloonTipText = "A file needed to complete the operation could not be found." 
$objNotifyIcon.BalloonTipTitle = "File Not Found"

$objNotifyIcon.Visible = $True 
$objNotifyIcon.ShowBalloonTip(10000)

这篇关于向操作中心添加通知的脚本化方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆