Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建创建快捷方式的 PowerShell 脚本,但我找不到定义快捷键的函数:用于创建的快捷方式。我的意思是,当打开快捷方式的属性时,有一个Shortcut key的输入字段,是否有任何函数可以在 PowerShell 中定义它?
我刚刚找到了解决方案:
https://blogs.technet.microsoft.com/heyscriptingguy/2008/11/03/hey-scripting-guy-how-can-i-add-a-windows-powershell-shortcut-to-the-quick-launch-工具栏/
功能是HotKey。像这样的东西:$shortcut.HotKey = "CTRL+1"
HotKey
$shortcut.HotKey = "CTRL+1"