문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
windows:powershell [2019/11/27 10:00] kwon37xi |
windows:powershell [2024/12/13 11:26] (현재) kwon37xi [Powershell script from remote / 원격 스크립트 실행] |
||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== Windows Powershell ====== | ====== Windows Powershell ====== | ||
| * https:// | * https:// | ||
| + | * [[: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| ===== 기본 개인 profile 파일 ===== | ===== 기본 개인 profile 파일 ===== | ||
| * [[https:// | * [[https:// | ||
| + | * Linux 의 '' | ||
| * '' | * '' | ||
| New-Item $profile -force -itemtype file | New-Item $profile -force -itemtype file | ||
| </ | </ | ||
| - | * '' | + | * '' |
| ===== Powershell Core ===== | ===== Powershell Core ===== | ||
| * [[https:// | * [[https:// | ||
| 줄 97: | 줄 100: | ||
| </ | </ | ||
| + | ===== Powershell script from remote / 원격 스크립트 실행 ===== | ||
| + | * [[https:// | ||
| + | |||
| + | <code sh> | ||
| + | # 한방에 실행 | ||
| + | Invoke-Expression (Invoke-WebRequest -Uri " | ||
| + | |||
| + | # Invoke-Expression -> iex, Invoke-WebRequest -> iwr | ||
| + | iex (iwr -Uri " | ||
| + | |||
| + | # 스크립트 다운로드 후 실행 | ||
| + | # 스크립트를 로컬에 다운로드 | ||
| + | Invoke-WebRequest -Uri " | ||
| + | |||
| + | # 다운로드한 스크립트 실행 | ||
| + | PowerShell -File " | ||
| + | </ | ||
| + | |||
| + | * 실행 정책 문제(Execution Policy) : 기본적으로 PowerShell 이 외부 스크립트 실행을 제한할 수도 있다. | ||
| + | <code sh> | ||
| + | # 실행시점에 정책 무시 | ||
| + | powershell.exe -ExecutionPolicy Bypass -Command "iex (iwr -Uri ' | ||
| + | |||
| + | # 현재 세션의 실행정책 임시 변경 | ||
| + | Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass | ||
| + | </ | ||
| ===== tail ===== | ===== tail ===== | ||
| 마지막 1000 줄 보여주면서 계속 출력하기 | 마지막 1000 줄 보여주면서 계속 출력하기 | ||
| 줄 118: | 줄 147: | ||
| =====언어 변경 ===== | =====언어 변경 ===== | ||
| + | * 언어팩은 설정을 통해서만 다운로드 가능하다. 명령행으로 현재까지는 불가함. | ||
| + | * [[https:// | ||
| + | < | ||
| + | # 가능할수도? | ||
| + | Get-WindowsCapability -Online | ? Name -like ' | ||
| + | |||
| + | Add-WindowsCapability -Online -Name ' | ||
| + | Add-WindowsCapability -Online -Name ' | ||
| + | </ | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| < | < | ||
| Set-WinUILanguageOverride -Language ko-KR | Set-WinUILanguageOverride -Language ko-KR | ||
| - | Set-WinSystemLocale -SystemLocale ko-KR | + | Set-WinSystemLocale -SystemLocale ko-KR # 재부팅 후 적용 |
| </ | </ | ||
| 줄 134: | 줄 174: | ||
| Set-WinHomeLocation -GeoId 0x86 | Set-WinHomeLocation -GeoId 0x86 | ||
| </ | </ | ||
| + | |||
| + | ===== Reboot ===== | ||
| + | * https:// | ||
| + | |||
| + | <code sh> | ||
| + | Restart-Computer | ||
| + | </ | ||
| + | |||
| + | ===== Linux PowerShell ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| ===== 참조 ===== | ===== 참조 ===== | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||