Solved

Powershell and IIS6

Posted on 2013-05-14
2
497 Views
Last Modified: 2013-05-16
I have a script that Creates and application pool, Creates the virtual application, this works fine. I am struggling to do the following:

Set the ASP.net version to ASP.NET v4.0.30319

Set the application pool for the virtual app

Recycle the Application Pool
0
Comment
Question by:ndr-itsolutions
2 Comments
 
LVL 71

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 39167356
Recycling the application pool:

http://msdn.microsoft.com/en-us/library/ms525262%28v=vs.90%29.aspx

For example:
# Just an example name
$AppPool = "v4.0 Classic"

Get-WmiObject IIsApplicationPool -Namespace root/MicrosoftIISv2 -Filter "Name LIKE '%AppPool%'" | ForEach-Object { $_.Recycle() }

Open in new window

There's no return code, so you'll have to check the event log to ensure it's recycled if you don't trust it.

As for setting up the app pool, you should be able to edit that through both ADSI or WMI (AppPoolID property). Which are you using to create everything so far?

Setting the .NET version involves modifying the scriptMaps property in the metabase. The approach there is likely to depend on the answer to the question above.

Cheers,

Chris
0
 

Author Closing Comment

by:ndr-itsolutions
ID: 39173002
Thanks, I managed to work out the rest with the aid of script maps etc.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A brief introduction to what I consider to be the best editor for PowerShell.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question