header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Object reference not set to an instance of an object.
Last Post 16 Jan 2008 01:34 PM by smurawski. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
tHyEstesUser is Offline
New Member
New Member
Posts:13
Avatar

--
16 Jan 2008 12:54 PM  

Hello all

I want to create an IIS6 application pool using powershell and the Microsoft.Sharepoint.Administration namespace. Everytime I want to set the password for the Application pool Identity I get an error: "Object reference not set to an instance of an object"

Does somebody know what I am doing wrong? I use the following lines of code to try to accomplish this:

$app = new-object Microsoft.SharePoint.Administration.SPApplicationPool
$app.currentIdentitytype = [Microsoft.SharePoint.Administration.IdentityType]::SpecificUser
$app.name = "test"
$app.username = "winadmin" $password = read-host "Enter a Password:" -assecurestring
$app.password = $password 
$app.provision()
 

Can somebody help me out or does somebody know another good powershell way of creating an IIS6 application pool?

Thanks a lot.

Regards,

Martijn

smurawskiUser is Offline
New Member
New Member
Posts:46

--
16 Jan 2008 01:34 PM  
Martijn,

I think this topic was double posted. I replied to the other one.
Steven Murawski
Co-Host - Mind of Root (www.mindofroot.com)
Host - PowerShell Basics (powershell-basics.com)
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer