Question: 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?

Answer: 
you can call php functions in the smarty code. Try this:

```
{if $customer instanceof Customer}
    YES, instance of Customer
{else}
    NO, Not an instance
{/if}

```

Also, it might be good idea to check if the variable is actually set before using it if the controller code has many paths:

```
{if isset($customer) && $customer instanceof Customer}
    YES, instance of Customer
{else}
    NO, Not an instance
{/if}

```
Function [`is_a`](http://php.net/is_a) could be used for this.

```
{if is_a($customer, 'Customer')}
    YES, instance of Customer
{else}
    NO, Not an instance
{/if}

```