파워쉘에서 웹서비스를 만져보자


웹사이트 끄고 켜기

Start-WebSite $appName

Stop-WebSite $appName


웹사이트 풀 끄고 켜기

Start-WebAppPool $appName

Stop-WebAppPool $appName


웹사이트 상태

$webSite = Get-Website $appName

Write-Host $webSite.State, $webSite.PSComputerName


웹사이트 포트를 알아내서 접속

$WebBinding = Get-WebBinding -Name $appName

$port = $WebBinding.bindingInformation.Split(":")[1]

$url = "http://localhost:" + $port

& 'C:\Program Files\Internet Explorer\iexplore.exe' $url



경험상 웹사이트를 껐다 켠다고 새로 패치한 dll(asp.net)이 먹히지 않더라.

웹사이트 풀을 끄고 켜는걸 권장함

 

'Develop' 카테고리의 다른 글

Bootstrap less 404  (0) 2016.06.28
Mysql AES_Encrypt  (0) 2016.06.27
powershell 폴더구조 복사  (0) 2016.06.02
powershell 'c:\program files'  (0) 2016.06.02
android gcm push  (0) 2016.05.25

+ Recent posts