Quantcast
Channel: The Automation Code
Browsing all 42 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to add the Path validation in the PowerShell script?

To add the path validation in the PowerShell function, we can use the ValidateScript parameter which validates the script before running the actual commands. First, let’s see how we can use the...

View Article



Image may be NSFW.
Clik here to view.

How to validate the set in PowerShell?

To add the validation set functionality into PowerShell, we can use the ValidateSet parameter. Before going into further explanation, let’s take an example. Suppose we have three colors (Red, Green,...

View Article

Image may be NSFW.
Clik here to view.

How to add Parameters in the ARM template?

In this article, – We will add the Parameters for the Storage Account in the parameters section.– We will apply parameters to the Resources– How we can use the parameters in different ways.? If you...

View Article

Image may be NSFW.
Clik here to view.

How to retrieve Azure Storage Container SAS URL using PowerShell?

Azure storage container SAS (Shared Access Token) URL provides access to the storage account container which contains the storage account name, container name, and the SAS token. From Azure Portal:...

View Article

How to resolve : The underlying connection was closed: Could not establish...

“The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel” error generates when there could be certificate issue or the SSL / TLS versions are not...

View Article


Image may be NSFW.
Clik here to view.

How to use Azure REST API in PowerShell?

There are multiple ways to work with Azure and Azure rest API is one of them. To start with Azure API, we first need to connect to the Azure Account. You can use the Connect-AzAccount to connect your...

View Article

Image may be NSFW.
Clik here to view.

How to create and use Python dictionary?

Creating Dictionary: Dictionary in Python is a Key-Value pair. For example, EmployeeID:1001 is a key-value pair example. To declare empty dictionary we use {} symbol. Firstdict = {} Here the Firstdict...

View Article

Image may be NSFW.
Clik here to view.

How to resolve: Unable to find repository with Source location in PowerShell?

Hello there, Last week I was working on one of my PowerShell scripts which was supposed to install some Azure Modules and run our commands, and it worked all fine in all the environments but for the...

View Article


Image may be NSFW.
Clik here to view.

How to use $PSBoundParameters in PowerShell?

What is $PSBoundParameters in PowerShell? $PSBoundParameter is the automatic variable in PowerShell, used to store the parameter name and value in the hashtable format in Key-Value pair manner....

View Article


Image may be NSFW.
Clik here to view.

How to get Azure APP gateway certificate details?

Problem with AZ native command. To get the Azure APP gateway certificate, If we you are using AZ module, then you can use Get-AzApplicationGateway command. $appg = Get-AzApplicationGateway -Name...

View Article

Image may be NSFW.
Clik here to view.

How to use PowerShell RunCommand on Azure VM?

If you ever wondered how we can run the script directly on Azure VMs so we don’t need to worry from running script inside the windows server, test ping or WINRM connectivity.If you are Azure Admin or...

View Article

Image may be NSFW.
Clik here to view.

How to create an XML document using PowerShell?

To create an XML (eXtensible Markup Language) file there are a few methods and we will use the XMLTextWriter .Net method to create an XML file using PowerShell. Consider the below XML file as an...

View Article

Image may be NSFW.
Clik here to view.

How to create an XML document using PowerShell – Part 2?

In part-1, we have seen how we can create the parent and child nodes for the XML document. If you haven’t read through part-1 yet, check the below link and then continue this article....

View Article


Image may be NSFW.
Clik here to view.

How to use DSC in Azure Automation Account?

Table of Content.What is Azure State DSC?PricingPreRequisite.Writing DSC Configuration.Upload and Complie Configuration.Attach Configuration to Node.Check VM Compliance Status Overview: Azure State DSC...

View Article

Image may be NSFW.
Clik here to view.

How to create a Virtual Environment in Python?

What is a Virtual environment in Python? A virtual environment as the name suggests is created virtually in your system so you can install project-based dependencies and packages. It is similar to...

View Article


Image may be NSFW.
Clik here to view.

How to use the foreach -Parallel loop in PowerShell 7?

Unlike the normal foreach loop which runs sequentially in PowerShell, we can leverage the foreach-object -parallel loop to run the script parallelly. If you have worked with PowerShell 5 workflow then...

View Article

Image may be NSFW.
Clik here to view.

How to get an email or SMS notification for Azure Service maintenance?

It’s an occasional occurrence that Azure plans maintenance for its services for improvement, bug fixes, additional features, etc and it could disrupt your prod / non-prod work and can cause an outage....

View Article


Image may be NSFW.
Clik here to view.

How to save output from Foreach parallel loop in PowerShell?

In PowerShell 7, saving the output of the foreach parallel loop requires some tricks. It is unlike a simple foreach loop. For example, in a simple foreach loop, we can directly store output to a...

View Article

Image may be NSFW.
Clik here to view.

Importing repository in Azure DevOps

Sometimes you need to work on a different repository which is not in your project or organization in Azure DevOps. For example, your source code resides in a separate repo of the organization (Say...

View Article

Image may be NSFW.
Clik here to view.

How to delete/rename the Imported repository in Azure DevOps?

In the previous article, we have seen how we can import the repository in Azure DevOps. In this article, we will see how we can delete or rename the imported repository. Before we delete or rename the...

View Article
Browsing all 42 articles
Browse latest View live




Latest Images