Software Architect IT 개발 knowhow, tip & tech Current: Windows Powershell Tip & Howto Windows Powershell Tip & Howto 파워쉘 유용한 명령어 정리. 모두 파워쉘 프롬프트에서 실행 필요 Network drive 로그인 정보 확인https://stackoverflow.com/questions/9037503/determine-domain-and-username-used-to-map-a-network-drive gwmi -Query 'Select LocalName, RemoteName, UserName from Win32_NetworkConnection' 환경 변수 사용 환경 변수 출력echo 나 print 를 사용하지 않고 출력할 환경 변수 값(Ex: Path 일 경우 $env:Path) 을 적어줌. $env:Path ;C:\Python38\Scripts\;C:\Python38\;C:\Program Files (x86)... 모든 환경 변수 목록 출력 Get-ChildItem env: Name Value ---- ----- ALLUSERSPROFILE C:\ProgramData APPDATA C:\Users\lesstif\AppData\Roaming ChocolateyInstall C:\ProgramData\chocolatey HOME C:\Users\lesstif ... USERPROFILE C:\Users\lesstif windir C:\WINDOWS ... PATH 환경 변수 변경bash 의 PATH 에 새로운 경로를 추가하는 것과 비슷한 문법 export PATH=/add/some/path/:$PATH powershell 은 SET 으로 환경 변수를 설정하지 않고 $env: 밑에 설정할 변수명을 바로 지정.아래는 PHP 를 PATH 의 맨 앞에 추가. $env:Path="C:\devel\php\php-7.3.14-nts-Win32-VC15-x64\;" + $env:Path 맨 뒤에 추가할 경우 += 연산자로 string concatenation 처리 $env:Path += ";C:\devel\php\php-7.3.14-nts-Win32-VC15-x64" windows-cmd powershell Please enable JavaScript to view the comments powered by Disqus. blog comments powered by Disqus ×