Welcome to MSDN Blogs Sign in | Join | Help

.net ready !!!

        Maxime Lamure
          MCS France
How to Enable Web Service Extension and Set Web Site AppPool with PowerShell / Comment activer une extension de site web ou modifier l’Application Pool d’un site web en PowerShell

[English]

PowerShell is very powerful and allows you to script and manage easily your IT. The following scripts show you how you can use WMI to manage IIS 6.

Set App Pool

$newVDir =[wmi] 'root\MicrosoftIISv2:IIsWebVirtualDirSetting.Name="W3SVC/1/ROOT/MaxVirtDir"'
$newVDir.AppPoolId = "MaxAppPool"
$newVDir.Put()

Enable Web Service Extension (WebDav for example)

$Sites=[wmi]'root/MicrosoftIISv2:IISWebService="W3SVC"'
$Sites.EnableWebServiceExtension('WEBDAV')


[Français]

PowerShell est très puissant et vous permets de scripter et gérer facilement votre infrastructure. Les scripts suivants illustre comment utiliser WMI pour configurer IIS 6

Modification de l’application pool

$newVDir =[wmi] 'root\MicrosoftIISv2:IIsWebVirtualDirSetting.Name="W3SVC/1/ROOT/MaxVirtDir"'
$newVDir.AppPoolId = "MaxAppPool"
$newVDir.Put()

Activer une extension de site web (WebDav par exemple)

$Sites=[wmi]'root/MicrosoftIISv2:IISWebService="W3SVC"'
$Sites.EnableWebServiceExtension('WEBDAV')
Posted: Monday, December 15, 2008 1:50 PM by Maxime LAMURE
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker