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