문제

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?

도움이 되었습니까?

해결책

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 
$credential.GetNetworkCredential().Password
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top