Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Powershell and IIS6

Posted on 2013-05-14
2
Medium Priority
?
502 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

636 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