Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

IIS6 and PoweShell

Closed Thread
 
Thread Tools Display Modes
Old 10-08-2007   #1 (permalink)
dm3281
Guest


 

IIS6 and PoweShell

Does anyone have any scripts for IIS6 using PowerShell:

1) Assigning ASP.NET version to a virtual directory/application?

2) Creating an application pool

3) Assigning a virtual directory to an application pool

Old 10-08-2007   #2 (permalink)
Bob Landau
Guest


 

RE: IIS6 and PoweShell

Since no one has piped in I'll try to help point you in the right directory.

First I don't know any PowerShell scripts for IIS6. In order for a script to
access IIS it needs to go through IIS ADSI provider regardless of the
language. There are a _lot_ of scripts showing how to do this in VBScript and
information here on how to convert from VBScript to Poswershell

Check out the below URL for a start

http://www.microsoft.com/technet/scr....mspx?mfr=true


The first part of what you'll need to do is to instanicate an IISWebService.
Here is one way

$webService = Get-WMIObject -namespace root/MicrosoftIISv2 -class
IISWebService

To get a list of the methods properties use Get-Member


$webService | Get-Member

To get a list of all the classes within the ADSI provider for IIS namespace
use

Get-WMIObject -namespace root/MicrosoftIISv2 -list

All of the above assumes you will be creating this on the local machine. To
do this remotely I'd suggest using COM rather than Get-WMIObject. I've had
problems with WMI when creating the class via PS where credidential were
required.

Look at the SWbemLocator COM component. Again there are a lot of samples
showing how to do this in VBScript.

new-object -COM WbemScripting.SWbemLocator

will get you one of these.

"dm3281" wrote:
Quote:

> Does anyone have any scripts for IIS6 using PowerShell:
>
> 1) Assigning ASP.NET version to a virtual directory/application?
>
> 2) Creating an application pool
>
> 3) Assigning a virtual directory to an application pool
>
>
Old 10-08-2007   #3 (permalink)
Shay Levi
Guest


 

Re: IIS6 and PoweShell

Check this URL,
http://blog.crowe.co.nz/archive/2006/07/11/669.aspx

The sample scripts are in VBscript but I'm sure you can easly convert it
to PowerShell.

-Enumerating Application Pools
-Enumerating Applications in an Application Pool
-Enumerating Application Pool Properties
-Enumerating the Periodic Recycling of all Application Pools
-Creating an Application Pool
-Creating an Application Pool to run with a specific identity
-Starting an Application Pool

Shay
http://scriptolog.blogspot.com


Quote:

> Does anyone have any scripts for IIS6 using PowerShell:
>
> 1) Assigning ASP.NET version to a virtual directory/application?
>
> 2) Creating an application pool
>
> 3) Assigning a virtual directory to an application pool
>

Old 10-09-2007   #4 (permalink)
Marco Shaw [MVP]
Guest


 

Re: IIS6 and PoweShell

dm3281 wrote:
Quote:

> Does anyone have any scripts for IIS6 using PowerShell:
>
> 1) Assigning ASP.NET version to a virtual directory/application?
>
> 2) Creating an application pool
>
> 3) Assigning a virtual directory to an application pool
>
Let me know if you're figured things out based on Bob and Shay have
mentioned. If not, this could be an interesting series of blog posts.

Marco

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
Old 10-10-2007   #5 (permalink)
dm3281
Guest


 

Re: IIS6 and PoweShell

Thanks all --

I am reviewing content and if I have further questions, will respond.


"Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:ukh0q7pCIHA.4476@xxxxxx
Quote:

> dm3281 wrote:
Quote:

>> Does anyone have any scripts for IIS6 using PowerShell:
>>
>> 1) Assigning ASP.NET version to a virtual directory/application?
>>
>> 2) Creating an application pool
>>
>> 3) Assigning a virtual directory to an application pool
>>
>
> Let me know if you're figured things out based on Bob and Shay have
> mentioned. If not, this could be an interesting series of blog posts.
>
> Marco
>
> --
> Microsoft MVP - Windows PowerShell
> http://www.microsoft.com/mvp
>
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
>
> Blog:
> http://marcoshaw.blogspot.com
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
PowerShell 1.0 & IIS6 & Virtual directory philippe PowerShell 1 05-21-2008 04:27 AM
[BUG]webdav(iis6)-net use * is not working from vista rc1 =?Utf-8?B?QW5kcmV5IFNrdm9ydHNvdg==?= Vista networking & sharing 5 11-19-2006 08:28 AM
Load / run .ps1 script on poweshell commandline (like CALL) peterchen PowerShell 3 10-18-2006 02:38 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50