2010. 10. 26. 18:11


IIS 7.0 PowerShell Snap-in

IIS 7.0은 아래 링크를 통해서 설치가 필요합니다.(Windows 2008,Windows Vista)
http://www.iis.net/download/PowerShell

IIS 7.5의 경우 해당 모듈이 운영체제에 포함되어 있으며 서버 역활(Role)을 통해서 설치가 가능합니다.(Windows 2008 R2,Windows 7)
설치가 필요한 역활 서비스는 "IIS 관리 스크립트 및 도구"입니다.

웹 서버(IIS) -> 관리 도구 -> IIS 관리 스크립트 및 도구


역활 설치 후 파워쉘을 실행하여  사용 가능한 모듈을 확인합니다.


PS C:\> Get-Module -ListAvailable

ModuleType Name                      ExportedCommands
---------- ----                      ----------------
Manifest   ADRMS                     {}
Manifest   AppLocker                 {}
Manifest   BestPractices             {}
Manifest   BitsTransfer              {}
Manifest   PSDiagnostics             {}
Manifest   ServerManager             {}
Manifest   TroubleshootingPack       {}
Manifest   WebAdministration         {}


관리 모듈명은 WebAdministration입니다.
사용할 모듈을 Import합니다.

import-module WebAdministration


최초 실행시 Excution Policies로 인해서 실행이 되지 않습니다.

PS C:\> Set-ExecutionPolicy RemoteSigned

Excution Policies 관련 자세한 정보는 아래 명령을 통해 확인할 수 있습니다.
help about_signing

IIS:라는 네임스페이스를 사용합니다.

IIS:

PS IIS:\> ls

Name
----
AppPools
Sites
SslBindings

AppPools는 응용프로그램 풀입니다.
Sites는 웹 사이트들입니다.
SslBindings SSL 바인딩이 되어 있는 NameSpace입니다.


PS IIS:\sites> Get-Item '.\Default Web Site'| Select-Object *


PSPath                     : WebAdministration::\\SPF2010\Sites\Default Web Site
PSParentPath               : WebAdministration::\\SPF2010\Sites
PSChildName                : Default Web Site
PSDrive                    : IIS
PSProvider                 : WebAdministration
PSIsContainer              : True
name                       : Default Web Site
id                         : 1
serverAutoStart            : True
state                      : Started
bindings                   : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
limits                     : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
logFile                    : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
traceFailedRequestsLogging : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
applicationDefaults        : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
virtualDirectoryDefaults   : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
ftpServer                  : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
Collection                 : {Microsoft.IIs.PowerShell.Framework.ConfigurationElement}
applicationPool            : DefaultAppPool
enabledProtocols           : http
physicalPath               : %SystemDrive%\inetpub\wwwroot
userName                   :
password                   :
ItemXPath                  : /system.applicationHost/sites/site[@name='Default Web Site' and @id='1']
Attributes                 : {name, id, serverAutoStart, state}
ChildElements              : {bindings, limits, logFile, traceFailedRequestsLogging...}
ElementTagName             : site
Methods                    : {Start, Stop}
Schema                     : Microsoft.IIs.PowerShell.Framework.ConfigurationElementSchema



앞으로 IIS 관련 파워쉘을 정리하도록 하겠습니다.



http://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-70-powershell-snap-in/

Posted by 알 수 없는 사용자
:
BLOG main image
Windows Server를 공부 하는 사람들의 팀블로그 by 마성민

카테고리

분류 전체보기 (76)
Windows (2)
Powershell (56)
AD (0)
Exchange (6)
System Center (9)
IIS (0)
SQL (3)
Sharepoint (0)

태그목록

Tistory Cumulus Flash tag cloud by BLUEnLIVE requires Flash Player 9 or better.

Total :
Today : Yesterday :