{"id":8020,"date":"2024-02-02T16:13:30","date_gmt":"2024-02-02T07:13:30","guid":{"rendered":"\/blog\/?p=8020"},"modified":"2024-02-02T16:29:19","modified_gmt":"2024-02-02T07:29:19","slug":"powershell-%ec%8b%a4%ed%96%89-%eb%b0%a9%eb%b2%95","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=8020","title":{"rendered":"PowerShell \uc2e4\ud589 \ubc29\ubc95"},"content":{"rendered":"\n<span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4;\">PowerShell \uc2a4\ud06c\ub9bd\ud2b8 \uc0c1\ub2e8\uc5d0 \uc544\ub798 \ub0b4\uc6a9 \ucd94\uac00<\/span><br \/><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4;\"># \uc2e4\ud589 \uc815\ucc45\uc744 \"\uc81c\ud55c \uc5c6\uc74c\"\uc73c\ub85c \ubcc0\uacbd<\/span><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4;\">Set-ExecutionPolicy Unrestricted -Force<\/span><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4;\">...<\/span><br \/><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4;\">\uc708\ub3c4\uc6b0 \ubc30\uce58\ud30c\uc77c \ud615\ud0dc\ub85c \uc2e4\ud589\ud558\uae30 \uc704\ud574\uc11c\ub294 \ubc30\uce58\ud30c\uc77c \ub0b4\uc5d0 \uc544\ub798\uc640 \uac19\uc774 \uae30\uc220\ud55c\ub2e4.<\/span><br \/><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4;\">REM PowerShell \uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c '|' \ubb38\uc790\ub294 '^|' \ub85c \ubcc0\uacbd\ud55c\ub2e4.<\/span><br \/><strong><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4; color: #ba372a;\"><br \/>SET \"PS1_FILE=%TEMP%\\__tmp__.ps1\"<\/span><\/strong><br \/><strong><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4; color: #e03e2d;\"><br \/>ECHO Set-ExecutionPolicy Unrestricted -Force &gt;%PS1_FILE%<\/span><\/strong><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4; color: #169179;\">ECHO Stop-Process -Name \"StartMenuExperienceHost\" -Force &gt;&gt;%PS1_FILE%<\/span><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4; color: #236fa1;\">ECHO Get-AppxPackage Microsoft.Windows.ShellExperienceHost ^| Foreach {Add-AppxPackage -ForceApplicationShutdown -DisableDevelopmentMode -Register \"$($_.InstallLocation)\\AppXManifest.xml\"} &gt;&gt;%PS1_FILE%<\/span><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4; color: #843fa1;\">ECHO Get-AppxPackage -AllUsers Microsoft.Windows.ShellExperienceHost ^| Foreach {Add-AppxPackage -ForceApplicationShutdown -DisableDevelopmentMode -Register \"$($_.InstallLocation)\\AppXManifest.xml\"} &gt;&gt;%PS1_FILE%<\/span><br \/><strong><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4; color: #e03e2d;\"><br \/>PowerShell -Command %PS1_FILE%<\/span><\/strong><br \/><span style=\"font-family: \ub098\ub214\uace0\ub515\ucf54\ub529, \ub3cb\uc6c0\uccb4, \uad74\ub9bc\uccb4, \uad81\uc11c\uccb4;\">DEL \/F \/Q %PS1_FILE%<\/span>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell \uc2a4\ud06c\ub9bd\ud2b8 \uc0c1\ub2e8\uc5d0 \uc544\ub798 \ub0b4\uc6a9 \ucd94\uac00 # \uc2e4\ud589 \uc815\ucc45\uc744 &#8220;\uc81c\ud55c \uc5c6\uc74c&#8221;\uc73c\ub85c \ubcc0\uacbdSet-ExecutionPolicy Unrestricted -Force&#8230; \uc708\ub3c4\uc6b0 \ubc30\uce58\ud30c\uc77c \ud615\ud0dc\ub85c \uc2e4\ud589\ud558\uae30 \uc704\ud574\uc11c\ub294 \ubc30\uce58\ud30c\uc77c \ub0b4\uc5d0 \uc544\ub798\uc640 \uac19\uc774 \uae30\uc220\ud55c\ub2e4. REM PowerShell \uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c &#8216;|&#8217; \ubb38\uc790\ub294 &#8216;^|&#8217; \ub85c \ubcc0\uacbd\ud55c\ub2e4.SET &#8220;PS1_FILE=%TEMP%\\__tmp__.ps1&#8243;ECHO Set-ExecutionPolicy Unrestricted -Force &gt;%PS1_FILE%ECHO Stop-Process -Name &#8220;StartMenuExperienceHost&#8221; -Force &gt;&gt;%PS1_FILE%ECHO Get-AppxPackage Microsoft.Windows.ShellExperienceHost ^| Foreach {Add-AppxPackage -ForceApplicationShutdown -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;} &gt;&gt;%PS1_FILE%ECHO Get-AppxPackage -AllUsers Microsoft.Windows.ShellExperienceHost [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[40],"tags":[],"class_list":["post-8020","post","type-post","status-publish","format-standard","hentry","category-os_win"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8020"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8020\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}