I am new to Azure PowerShell scripting.

How can i check if a blob container exist under a storage account and create it if it does not exist.

I Tried the below code:

```
$StorageAccountName = "autodeploystorageacc1818"
$ContainerName = "acceleratorblobcontainer"
$ResourceGroupName =  "autodeploy"
$skuName = "Standard_LRS"
Try
{  
   Get-AzureRmContext -ErrorAction Continue  
}  
Catch [System.Management.Automation.PSInvalidOperationException]  
{  
   Login-AzureRmAccount  
}
Set-AzureRmCurrentStorageAccount -StorageAccountName $StorageAccountName  -ResourceGroupName $ResourceGroupName 
$StorageAccountName  = Get-AzureStorageBlob -Container $ContainerName -Context $StorageAccountName
New-AzureStorageContainer -Name $ContainerName -Permission Off`

```

But how can this be written as a conditional statement any help or ideas would be appreciated.