Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Following the example in this blog post, I am trying to create a new Web Application with PowerShell.

However, when I try the line:

$WebAppBuilder.ApplicationPoolPassword = "password"

I receive the following error:

Exception setting "ApplicationPoolPassword": "Cannot convert the "password" value of type "System.String" to type "System.Security.SecureString"."

How might I go about fixing this?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You will have to ConvertTo-SecureString as documented here.

Or you could use Get-Credential to retrieve password, e.g. something like this:

$credential = Get-Credential 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.