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: 
here is good example for this.

```
{if is_object($obj)}
  {*=== your code ===*}
{else}
  {*=== your code ===*}
{/if}

```

we can use is\_object to know that this is an object or not.

hope it will help someone..
You can get the specific class of the object as well if needed with `$obj|get_class`

Example:

```
{if $animal instanceof Horse}
    <span>Yup, it's a horse class.</span>
{else}
    <span>It is actually a {{$animal|get_class}}</span>
{/if}

```