Solved

Powershell and IIS6

Posted on 2013-05-14
2
494 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 70

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 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