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 […]

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 […]