Develop
powershell invoke-XXXX
작은이야기
2016. 2. 16. 13:35
1. 접속권한
Enable-PSRemoting -SkipNetworkProfileCheck -Force
-SkipNetworkProfileCheck : 동일 subnet check 안함
Set-NetFirewallRule –Name "WINRM-HTTP-In-TCP-PUBLIC" –RemoteAddress Any
-SkipNetworkProfileCheck 옵션을 사용후 ip 대역 설정
https://technet.microsoft.com/en-us/library/hh849694.aspx
2. 실행정책
Set-ExecutionPolicy -ExecutionPolicy ByPass
-ByPass : import-module 실행에도 관여함
https://technet.microsoft.com/ko-KR/library/hh847748.aspx
3. 접속 허용
Set-Item wsman:\localhost\Client\TrustedHosts -value *