{"id":10948,"date":"2018-10-03T15:00:18","date_gmt":"2018-10-03T06:00:18","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=10948"},"modified":"2018-10-03T16:46:23","modified_gmt":"2018-10-03T07:46:23","slug":"%e3%82%b9%e3%83%88%e3%82%a2%e3%82%a2%e3%83%97%e3%83%aa%e3%82%92%e8%b5%b7%e5%8b%95%e3%81%99%e3%82%8bpowershell%e3%82%b3%e3%83%bc%e3%83%89","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=10948","title":{"rendered":"\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3059\u308bPowerShell\u30b3\u30fc\u30c9"},"content":{"rendered":"<p>\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea(UWP\u30a2\u30d7\u30ea)\u306f\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u7b49\u3057\u3066\u76f4\u63a5\u5b9f\u884c\u3057\u3066\u3082\u3001\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001Microsoft Edge\u306e\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306f\u4e0b\u8a18\u5834\u6240\u306b\u3042\u308a\u307e\u3059\u304c(\u300c<a href=\"https:\/\/www.ka-net.org\/blog\/?p=8415\" title=\"Microsoft Edge\u306e\u5834\u6240 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">Microsoft Edge\u306e\u5834\u6240<\/a>\u300d\u53c2\u7167)\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u3082Edge\u306f\u8d77\u52d5\u3057\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">C:\\Windows\\SystemApps\\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\\MicrosoftEdge.exe<\/pre>\n<p>\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3059\u308b\u306b\u306f\u3001<a href=\"https:\/\/www.ka-net.org\/blog\/?p=6155\" title=\"\u300cmicrosoft-edge:\u300d\u3063\u3066\u4f55\uff1f | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">URI\u30b9\u30ad\u30fc\u30e0<\/a>\u3084<a href=\"https:\/\/www.ka-net.org\/blog\/?p=6161\" title=\"Microsoft Edge\u3092\u8d77\u52d5\u3059\u308bC#\u30b3\u30fc\u30c9 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">IApplicationActivationManager::ActivateApplication<\/a>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001PowerShell\u304b\u3089<a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/hh706903.aspx\" title=\"IApplicationActivationManager::ActivateApplication | Microsoft Docs\" target=\"_blank\">IApplicationActivationManager::ActivateApplication<\/a>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3059\u308b\u30b3\u30fc\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">AppUserModelId(AUMID)\u306e\u53d6\u5f97<\/h4>\n<p>\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u3001\u30a2\u30d7\u30ea\u3092\u8b58\u5225\u3059\u308b\u305f\u3081\u306eID\u300c<a href=\"https:\/\/www.ka-net.org\/blog\/?p=6250\" title=\"AppUserModelId(AUMID)\u3092\u5217\u6319\u3059\u308bVBScript | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">AppUserModelId(AUMID)<\/a>\u300d\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">foreach ($app in Get-AppxPackage | Sort-Object -Property Name) {\r\n  foreach ($id in (Get-AppxPackageManifest $app).Package.Applications.Application.Id) {\r\n    &quot;Name:&quot; + $app.Name + &quot;, AUMID:&quot; + $app.PackageFamilyName + &quot;!&quot; + $id\r\n  }\r\n}<\/pre>\n<p>PowerShell\u3067\u4e0a\u8a18\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3001\u304a\u76ee\u5f53\u3066\u306e\u30a2\u30d7\u30ea\u306eAUMID\u3092\u63a2\u3057\u307e\u3059\u3002<br \/>\n\u305f\u3068\u3048\u3070\u3001\u96fb\u5353\u306e\u5834\u5408\u306f\u300cMicrosoft.WindowsCalculator_8wekyb3d8bbwe!App\u300d\u3001\u30d5\u30a9\u30c8\u306e\u5834\u5408\u306f\u300cMicrosoft.Windows.Photos_8wekyb3d8bbwe!App\u300d\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">IApplicationActivationManager::ActivateApplication\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308b\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u306e\u8d77\u52d5<\/h4>\n<p>AUMID\u304c\u53d6\u5f97\u3067\u304d\u305f\u3089\u3001\u6b21\u306f\u3044\u3088\u3044\u3088\u30a2\u30d7\u30ea\u306e\u8d77\u52d5\u3067\u3059\u3002<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">$code = @&quot;\r\nusing System;\r\nusing System.Runtime.InteropServices;\r\nusing System.Runtime.CompilerServices;\r\n\r\nnamespace ExecStoreApp\r\n{\r\n  &#x5B;ComImport, Guid(&quot;2e941141-7f97-4756-ba1d-9decde894a3d&quot;), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]\r\n  interface IApplicationActivationManager\r\n  {\r\n    IntPtr ActivateApplication(&#x5B;In] String appUserModelId, &#x5B;In] String arguments, &#x5B;In] UInt32 options, &#x5B;Out] out UInt32 processId);\r\n  }\r\n  \r\n  &#x5B;ComImport, Guid(&quot;45BA127D-10A8-46EA-8AB7-56EA9078943C&quot;)]\r\n  public class ApplicationActivationManager : IApplicationActivationManager\r\n  {\r\n    &#x5B;MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)\/*, PreserveSig*\/]\r\n    public extern IntPtr ActivateApplication(&#x5B;In] String appUserModelId, &#x5B;In] String arguments, &#x5B;In] UInt32 options, &#x5B;Out] out UInt32 processId);\r\n  }\r\n}\r\n&quot;@\r\nAdd-Type $code\r\n$aumId = &quot;Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge&quot; #\u30a2\u30d7\u30ea\u306eAppUserModelId(AUMID)\r\n$processId = 0\r\n$aam = New-Object ExecStoreApp.ApplicationActivationManager\r\n$aam.ActivateApplication($aumId, $null, 0, &#x5B;ref]$processId)\r\n&quot;\u30d7\u30ed\u30bb\u30b9ID\uff1a$processId&quot;<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5909\u6570<span style=\"color: #ff0000; font-weight: bold;\">$aumId<\/span>\u3067\u6307\u5b9a\u3057\u3066\u3044\u308bEdge\u304c\u7acb\u3061\u4e0a\u304c\u308a\u307e\u3059\u3002<\/p>\n<p>\u5143\u3005\u306f\u4e0b\u8a18\u8a18\u4e8b\u3067\u66f8\u3044\u305fC#\u306e\u30b3\u30fc\u30c9\u3092PowerShell\u5411\u3051\u306b\u66f8\u304d\u76f4\u3057\u305f\u3082\u306e\u3067\u3059\u304c\u3001\u3053\u3061\u3089\u306e\u65b9\u304c\u4f7f\u3044\u52dd\u624b\u304c\u826f\u3044\u3067\u3059\u306d\uff01<\/p>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6161\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-MicrosoftEdge-120x120.png' alt='Microsoft Edge\u3092\u8d77\u52d5\u3059\u308bC#\u30b3\u30fc\u30c9' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2015.08.28<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6161\">Microsoft Edge\u3092\u8d77\u52d5\u3059\u308bC#\u30b3\u30fc\u30c9 <\/a><\/div><div class=\"cardlink_excerpt\">\u4ee5\u524d\u66f8\u3044\u305f\u8a18\u4e8b\u300c\u300c\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u300d\u304b\u3089Microsoft Edge\u3092\u8d77\u52d5\u3059\u308b\u300d\u3092\u898b\u308b\u3068\u5206\u304b\u308b\u901a\u308a\u3001Microsoft Edge\u306f\u5b9f\u4f53\u3068\u306a\u308bexe\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3059\u308b\u3001\u901a\u5e38\u306e\u65b9\u6cd5\u3067\u306f\u8d77\u52d5\u3067\u304d\u307e\u305b\u3093\u3002\r\n\r\n\r\nEdge\u306e\u3088\u3046\u306a\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb Windows...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<p>\u3061\u306a\u307f\u306b\u79c1\u306f\u3001\u300c<a href=\"http:\/\/www.atmarkit.co.jp\/ait\/articles\/1610\/12\/news017.html\" title=\"Windows 10\u306e\u8b0e\u6a5f\u80fd\u3001\u300cTake a Test\uff08\u30c6\u30b9\u30c8\u53d7\u9a13\uff09\u300d\u306e\u6b63\u4f53\u3092\u66b4\u3051 (1\/2)\uff1a\u305d\u306e\u77e5\u8b58\u3001\u30db\u30f3\u30c8\u306b\u6b63\u3057\u3044\uff1f Windows\u306b\u307e\u3064\u308f\u308b\u90fd\u5e02\u4f1d\u8aac\uff0868\uff09 - \uff20IT\" target=\"_blank\">\u30c6\u30b9\u30c8\u30a2\u30d7\u30ea<\/a>\u300d(Microsoft.Windows.SecureAssessmentBrowser_cw5n1h2txyewy!App)\u7b49\u3001\u8868\u306b\u51fa\u3066\u3053\u306a\u3044\u30a2\u30d7\u30ea\u3092\u78ba\u8a8d\u3059\u308b\u969b\u306b\u4e0a\u8a18\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea(UWP\u30a2\u30d7\u30ea)\u306f\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u7b49\u3057\u3066\u76f4\u63a5\u5b9f\u884c\u3057\u3066\u3082\u3001\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 \u305f\u3068\u3048\u3070\u3001Microsoft Edge\u306e\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306f\u4e0b\u8a18\u5834\u6240\u306b\u3042\u308a\u307e\u3059\u304c(\u300cMicrosoft Edge\u306e [&hellip;]","protected":false},"author":1,"featured_media":7127,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3059\u308bPowerShell\u30b3\u30fc\u30c9]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[132,25,94],"tags":[],"class_list":["post-10948","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows10","category-windows","category-powershell"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-PowerShell.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-2QA","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10948"}],"version-history":[{"count":2,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10948\/revisions"}],"predecessor-version":[{"id":10950,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10948\/revisions\/10950"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7127"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}