Codit Develop
[PowerShell] ps1 파일 실행 오류 : 이 시스템에서 스크립트를 실행할 수 없으므로 ~
PowerShell ps1 실행 시 Policy 오류 Policy 선언 후 실행 # Powershell.exe -noprofile -executionpolicy bypass -file "[PS1 FILE PATH]" Powershell.exe -noprofile -executionpolicy bypass -file "./install_all.ps1"
[PowerShell] ForEach문 활용
PowerShell Foreach Array 생성 $removeAppxPackage = @( 'Microsoft.MicrosoftOfficeHub', 'Microsoft.MicrosoftSolitaireCollection', 'MicrosoftTeams', 'Microsoft.WindowsCamera', 'Microsoft.Getstarted', 'SpotifyAB.SpotifyMusic', 'Microsoft.ZuneMusic', 'Microsoft.ZuneVideo', 'Microsoft.BingNews', 'Microsoft.People', 'Microsoft.BingWeather' ) Foreach 실행 # foreach ( $item in [Array] ) { RUN COMMAND } forea..
[PowerShell] 현재 경로 확인
PowerShell 현재 경로 확인 pwd $nowPath = (pwd).Path Write-Host $nowPath # or $nowPath = ${pwd} Write-Host $nowPath # or Write-Host ${pwd}