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 directly, it asks for the resource group name and automation account name. Once these are provided, it lists all the variables that are present in the automation account along with properties of each of the automation variable.

There is also an option to get details of a particular automation variable by adding the         -Name parameter and providing the name of the automation variable. This retrieves the details of only that variable as shown below.

Now coming to the second cmdlet, Get-AutomationVariable. This cmdlet directly gives the value of the automation variable as shown below.

This can be used when we only need the value without any other details of the variable.

Hope this helps!

Advertisements

About Amogh Natu

Technology enthusiast, Associate Consultant @ Microsoft, music lover, love my guitar, Microsoft.NET, ASP.NET, C#.NET Professional.
This entry was posted in PowerShell and tagged , , , , . Bookmark the permalink.

Your comments or opinions.....

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s