
Windows Server 2008 R2 Standard, 64비트. 파워셸 버전 5.1.144049.
이것에서 명령을 사용하려고마이크로소프트 지원 페이지-> 예시 8: 특정 서비스 활성화
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes profile=private
다음으로 반품
그룹에서 지정한 규칙을 업데이트하는 데는 활성화 매개변수만 사용할 수 있습니다.
규칙 그룹의 프로필을 변경해야 합니다. 프로그래밍 방식으로 또는 한 줄로 이를 수행할 수 있는 방법이 있습니까?
답변1
생략 profile=private
하면 작동합니다.
netsh advfirewall 방화벽 설정 규칙 그룹="원격 데스크톱" 새 활성화=예
PowerShell 한 줄짜리:
Set-NetFirewallRule -DisplayGroup "원격 데스크톱" -Enabled True