Global Subscription and Directory Filter in Azure Portal

Global Subscription and Directory Filter in Azure Portal

Azure portal allows us to apply global subscription and directory filter that gets applied to your entire portal session. This will cause that directory and/or subscription to persist throughout the Azure portal session displaying only the resources from the selected subscription/Directory. So, if you have access to a bunch of directories that in turn hold a […]

Analyzing PowerShell scripts with PSScriptAnalyzer

Hi, This post will show you how you can use PSScriptAnalyzer to analyze whether your PowerShell scripts or functions confirm with industry best practices or not. PSScriptAnalyzer (PSSA going forward) is a static code analyzer that checks your PowerShell scripts, modules, functions and gives a detailed report on any rule/rules that the scripts or modules […]

[Powershell-Basics] – Looping through hash table

Hi, This post will show how to loop through a hash table in PowerShell. Let’s say for example we have a hashTable object in PowerShell as shown below: $SampleTable = @{} # Syntax for creating hashtable –> @{} $SampleTable.”Name” = “Amogh” $SampleTable.”City” = “Hyderabad” $SampleTable.”Country” = “India” For looping through the hashtable, we can use […]

Save with Encoding in Visual Studio

Hi, This post shows how you can save files while retaining their encoding and line endings format. For example, if you’re writing a shell script that will be run on a UNIX operating system, the script is supposed to have line endings as (LF) while Windows’ line endings usually follow (CR)(LF) convention. So to save a […]

Get-AutomationVariable Vs Get-AzureRmAutomationVariable

Hi, I finally started working on PowerShell and so thought that documenting my learnings here would be useful. So in this post, we will see the difference between the 2 cmdlets Get-AzureRmAutomationVariable and Get-AutomationVariable. So let’s see the outputs of the two cmdlets. First, Get-AzureRmAutomationVariable As you can see, when we just run this cmdlet […]