Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 要在正确的组Powershell中启动的Pin_C#_Windows_Powershell - Fatal编程技术网

C# 要在正确的组Powershell中启动的Pin

C# 要在正确的组Powershell中启动的Pin,c#,windows,powershell,C#,Windows,Powershell,给出如下所示的组信息。如何使用powershell固定到特定组(行和列) <start:Group Name="Create"> <start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="microsoft.windowscommunicationsapps_8wekyb3d8bbwe!Microsoft.WindowsLive.Calendar" /> 你不能 与其问那么多关于你问题的糟糕

给出如下所示的组信息。如何使用powershell固定到特定组(行和列)

 <start:Group Name="Create">
          <start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="microsoft.windowscommunicationsapps_8wekyb3d8bbwe!Microsoft.WindowsLive.Calendar" />
你不能

与其问那么多关于你问题的糟糕解决方案的问题,为什么不问你真正的问题呢

如果你想知道“开始”菜单上有哪些应用程序,你可以 继续并导出“开始”菜单布局xml。在这里你会看到一个 问题中显示的条目,给出固定项目的AUMIDI 要将锁定的快捷方式从一台计算机固定到另一台计算机

就是这样

与其问至少四个关于你解决这个问题的奇怪方法的问题,不如问你真正的问题并得到真正的答案:

就像使用
Export startayout
从一台计算机获取布局XML一样,使用
Import startayout
从另一台计算机上的XML设置开始布局



1(1)(2)(3)(这一个)和(4)

我想从我的计算机上获取所有快捷方式,并将它们放在另一台计算机上。我有来自第一台计算机的布局xml。我希望他们在同一组结构。还有更多。我无法使用简单的powershell命令简单地导入到新计算机。考虑到我的场景,这不起作用。必须这样做manually@nlstack01当前位置你说还有很多,但不要说还有什么。你说你有一个神秘的场景,这是合法的,但你没有告诉我们它是什么。我说没什么了,这只是浪费时间。使用
Import startalayout
,停止浪费每个人(包括你自己)的时间。
function Pin-App {    param(
        [string]$appname,
        [switch]$unpin
    )
    try{
        if ($unpin.IsPresent){
            ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Unpin from Start'} | %{$_.DoIt()}
            return "App '$appname' unpinned from Start"
        }else{
            ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Pin to Start'} | %{$_.DoIt()}
            return "App '$appname' pinned to Start"
        }
    }catch{
        Write-Error "Error Pinning/Unpinning App! (App-Name correct?)"
    }
}