Solved

Powershell and IIS6

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now