Category: PowerShell

Azure Cosmos DB–Setting Up New Database using Azure CLI–Sample

Posted on 2 min read

Purpose of this article is to help you with few steps of commands to provision a new Azure Cosmos DB database instance through Azure CLI or Azure Cloud Shell. Here is the snippet: <# This Bash script should help you create a Azure Cosmos DB instance using Azure CLI with bare minimal configuration #> export… Continue reading

Getting Started with Azure CLI 2.0

Posted on 2 min read

Older days we used to manage azure resources through AzureRM PowerShell modules . This was very much flexible for any Azure Administrator or Developers to run Automated Deployments to Azure Resource Manager resources. Azure CLI  is the next improved version with simplified cmdlets to make life easier and it is cross-platform. You can use Azure… Continue reading

PowerShell: Check a parameter/variable value is null

Posted on 1 min read

While you are writing PowerShell modules, with lot with parameters and you might want to verify these parameters are not ‘null’ to validate some business cases. In normal powershell inline scripting context, $variablename -eq “$null” would work : if ($varibalename -eq $null) { Write-Host "variable is null.Please supply the values for variablename." } RECOMMENDED APPROACH:… Continue reading