Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Powershell and IIS6

Posted on 2013-05-14
2
Medium Priority
?
504 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 2000 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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
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 anti-spam), the admin…
Screencast - Getting to Know the Pipeline

810 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