We were trying to set passphrase in sharepoint via powershell cmdlet.
When we mentioned the switch -confirm in the following line, it asked for confirmation
Set-SPPassPhrase -PassPhrase $passphrase
Then we removed -confirm switch as we passed password in the script itself [though it is security risk , for test environment they needed it] but still it is asking for confirmation. Whether confirmation is by default?
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
$passphrase = ConvertTo-SecureString "MyPass#$#@" -asPlainText –Force
Set-SPPassPhrase -PassPhrase $passphrase
How to bypass confirmation?