{"id":2160,"date":"2017-12-26T20:43:43","date_gmt":"2017-12-26T11:43:43","guid":{"rendered":"http:\/\/okamurax.com\/?p=2160"},"modified":"2017-12-26T21:38:27","modified_gmt":"2017-12-26T12:38:27","slug":"powershell%e3%83%aa%e3%83%a2%e3%83%bc%e3%83%88%e6%8e%a5%e7%b6%9a%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=2160","title":{"rendered":"PowerShell \u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u8a2d\u5b9a"},"content":{"rendered":"<h2>\u30db\u30b9\u30c8\u5074\u306ePC<\/h2>\n<p><span style=\"color: #0000ff;\">enable-psremoting<\/span><br \/>\n\u3092\u5b9f\u884c\u3002<\/p>\n<p>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304cPublic\u3060\u3068\u63a5\u7d9a\u3067\u304d\u306a\u3044\u3002<br \/>\n<span style=\"color: #0000ff;\">Win10\u306e\u8a2d\u5b9a\uff1e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\uff1e\u63a5\u7d9a\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u5909\u66f4\uff1e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8<\/span><\/p>\n<p>\u63a5\u7d9a\u3067\u304d\u308b\u30e6\u30fc\u30b6\u3092\u8ffd\u52a0\u3002<br \/>\n<span style=\"color: #0000ff;\">Set-PSSessionConfiguration -Name Microsoft.PowerShell -showSecurityDescriptorUI<\/span><br \/>\n\u8ffd\u52a0\u3059\u308b\u3068\u304d\u3001\u3082\u3057Microsoft\u30a2\u30ab\u30a6\u30f3\u30c8\u306a\u3089\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u691c\u7d22\u3057\u3066\u8ffd\u52a0\u3002<\/p>\n<h2>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306ePC<\/h2>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u304b\u3089\u4fe1\u983c\u3067\u304d\u308b\u30db\u30b9\u30c8\u3092\u8ffd\u52a0\u3002<br \/>\n<span style=\"color: #0000ff;\">Set-Item WSMan:\\localhost\\Client\\TrustedHosts -Value PC_name<\/span><\/p>\n<p>\u63a5\u7d9a\u306f\u3001<br \/>\n<span style=\"color: #0000ff;\">Enter-PSSession -ComputerName PC_name -Credential mail@xxx.com<\/span><br \/>\n\u3092\u5b9f\u884c\u3002<\/p>\n<p>\u5207\u65ad\u306f\u3001<br \/>\n<span style=\"color: #0000ff;\">Exit-PSSession<\/span><\/p>\n<h2>\u30a8\u30a4\u30ea\u30a2\u30b9\u8ffd\u52a0<\/h2>\n<p>\u5fc5\u8981\u306a\u3089<br \/>\n<span style=\"color: #0000ff;\">Set-ExecutionPolicy Unrestricted<\/span><\/p>\n<p><span style=\"color: #0000ff;\">$profile<\/span><br \/>\n\u3092\u5b9f\u884c\u3059\u308b\u3068\u8aad\u307f\u8fbc\u307e\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u5206\u304b\u308b\u3002<\/p>\n<p>\u65e2\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308c\u3070\u3001<br \/>\n<span style=\"color: #0000ff;\">notepad $profile<\/span><br \/>\n\u5b58\u5728\u3057\u306a\u3051\u308c\u3070\u3001<br \/>\n<span style=\"color: #0000ff;\">New-item -type file -force $profile<\/span><br \/>\n<span style=\"color: #0000ff;\">notepad $profile<\/span><br \/>\n\u3092\u5b9f\u884c\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3002<\/p>\n<p><span style=\"color: #0000ff;\">Set-Alias -name c -value cd<\/span><br \/>\n<span style=\"color: #0000ff;\">Set-Alias -name l -value ls<\/span><br \/>\n<span style=\"color: #0000ff;\">Set-Alias -name pss -value f<br \/>\n<\/span><span style=\"color: #0000ff;\">function f()<\/span><br \/>\n<span style=\"color: #0000ff;\">{<\/span><br \/>\n<span style=\"color: #0000ff;\"> Enter-PSSession -ComputerName PC_name -Credential mail@xxx.com<\/span><br \/>\n<span style=\"color: #0000ff;\">}<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30db\u30b9\u30c8\u5074\u306ePC enable-psremoting \u3092\u5b9f\u884c\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304cPublic\u3060\u3068\u63a5\u7d9a\u3067\u304d\u306a\u3044\u3002 Win10\u306e\u8a2d\u5b9a\uff1e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\uff1e\u63a5\u7d9a\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u5909\u66f4\uff1e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u63a5\u7d9a\u3067\u304d\u308b\u30e6\u30fc\u30b6\u3092\u8ffd\u52a0\u3002 S &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=2160\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;PowerShell \u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u8a2d\u5b9a&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[157],"class_list":["post-2160","post","type-post","status-publish","format-standard","hentry","category-1","tag-powershell"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2160"}],"version-history":[{"count":6,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2160\/revisions"}],"predecessor-version":[{"id":5480,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2160\/revisions\/5480"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}