Poznámka
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
[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') |
Comments
- Anonymous
October 12, 2011
Very interesting information, thank you. I just found your blog and will be sharing it more. Wes - WB Consulting www.wesbeckwith.com/wed-design-solution-allen-tx