New-SPWebApplication application pool account is not found New-SPWebApplication application pool account is not found powershell powershell

New-SPWebApplication application pool account is not found


You must create a managed account first for your win2k8r2sptest\administrator. Here is the sequence of steps

$cred = get-credential 'win2k8r2sptest\administrator' // enter the password here$adminMA = New-SPManagedAccount -Credential $credNew-SPWebApplication -Name 'Test Webapp' -ApplicationPool "DefaultAppPool" -ApplicationPoolAccount $adminMA

I've tested this on vanilla SPS2010 SP1. I think the process is identical to Foundation as well.


In my case I already have the script as posted above by @romanrozinov. But it still didn't work. I realized I have to create a user account in the AD users. Steps can be followed here - http://www.mustbegeek.com/create-user-account-in-windows-server-2008-r2/

I'm an absolute beginner with Sharepoint, adding a user and then running below script fixed the issue:

 $cred = get-credential //enter user name and password$devAccount = New-SPManagedAccount -Credential $credNew-SPWebApplication -Name 'Test Webapp' -ApplicationPool "DefaultAppPool" -ApplicationPoolAccount $devAccount