Skip to main content

88 posts tagged with "PowerShell"

View All Tags

· 5 min read
Hasan Gural

The following article will explain how to register an existing physical or virtual machine running Windows to Azure Arc Control Plane using a fundamental PowerShell Script.

In order to start registering existing Windows Servers to Azure Arc, we need to install the Azure Connected Machine agent on each machine that you plan to connect using Azure Arc. Before starting this, we should ensure that we have the things below.

· 3 min read
Hasan Gural

In our last article, I tried to explain how we can get a report for Secure Score details and assignments of Defender for Cloud Plans for each subscription. I will now expand these type of queries mainly for Virtual Networks.

If you are managing multiple Azure Hub environments, at some point, you will need to report the status of Virtual Network Peerings as well as Peering Flags for the connectivity side of it. As we said before, there are various ways to obtain it. If you have over a hundred subscriptions, I wouldn't prefer to use PowerShell for these types of reports for generating them. In my personal opinion, Azure Resource Graph is a solid and decent way to get results as an object in PowerShell, and then you can use data for generating HTML, CSV, Table Storage or updating SQL Table.

· 2 min read
Hasan Gural

In our last article, we tried to understand Azure Resource Graph queries and use them for particular example scenarios. This part of our article series will cover Secure Score information on subscription levels. There are many different ways to accomplish this aim, but the easiest way to do this is by creating queries with Resource Graph.

Secure Secure information on Subscription level

You can find Secure Score details under the microsoft.security/securescores. Later on, you can get the information that you wanted as a table with every property.

· 3 min read
Hasan Gural

In the first part of our article series, we tried to understand the Azure Resource Graph service. Now with executing sample queries, let's try to detail and implement them. For example, let's suppose that we have a scenario like this: an organization with up to 500~ Azure Subscriptions that one person manages. And this person has to list all of the storage accounts.

We mentioned plenty of different ways to complete the scenario above before. If you wish, you can access this information from Azure Portal or use the Get-AzStorageAccount cmdlet on PowerShell by visiting every subscription. Of course, there is an easier way, and it is using Azure Resource Graph Query. Let's try this to get information in a more accessible way.

· 3 min read
Hasan Gural

With this article, we will start an article series that will cover Azure Resource Graph and the particular features that make it different. You might never used or you might have never heard Azure Resource Graph before, but you will have a grasp of it with this article series. In this series, we will try to create and improve solutions that needed for real scenarios. Now without getting into detail, let's jump into our article.

What is Azure Resource Graph?

We can define Azure Resource Graph as an Azure service extension of Azure Resource Manager for absolute beginners. To answer what it provides and why we should use it, we need to look at the examples like the actions that we can execute in subscriptions in our organization by using Azure Resource Graph. These examples are:

· 4 min read
Hasan Gural

In the last article of our series, we will try to access the endpoint of Pipelines, and we will list pipelines expressions of all projects.

First of all, we need to look at the list of endpoint types down below.

Operation types for Pipelines

Operation NameOperation Detail
CreateCreate a pipeline.
GetGets a pipeline, optionally at the specified version
ListGet a list of pipelines

· 4 min read
Hasan Gural

In our previous article, we did some pre-coding to access Azure DevOps REST API. We got all the projects of a DevOps Organization as a list by executing an elementary request. Now, we should enlarge our knowledge with further examples.

Let's do an example where we try to access all the repositories as a list in an Azure DevOps Project. This is how the repository list looks from the interface of the AzDo.

· 4 min read
Hasan Gural

In this article series, we will focus on how and why Azure DevOps API can be usable with Powershell with emphasizing critical details in the latter parts. Before heading to the article, it is vital to notice that this article series requires a solid understanding of REST API. With the REST API's page down below, you can access all the endpoints and create requests with necessary methods such as GET, POST, PATCH

AzDo Rest API Documentation

· One min read
Hasan Gural

Azure Custom Resource Provider kullanım örneklerini blog üzerinde uzun bir seri ile paylaşmıştık. Fakat GitHub üzerinde belirttiğim repository üzerinden devamlı bir şekilde güncel tutmaya özen göstereceğim. Eğer talep ederseniz sizde Pull Request gönderip kendi Custom Resource Provider'larınızı paylaşırsanız örnekleri tek noktada toplayabileceğimiz bir yere sahip oluruz. Daha fazlası için aşağıdaki GitHub Repository incelemenizi tavsiye ederim.

https://github.com/hasangural/CustomResourceProvider

· 6 min read
Hasan Gural

Bir önceki yazımızda Visual Studio Code üzerinde ilk fonksiyonumuzu oluşturduk. Hatırlarsanız fonksiyonumuzun adı getResourceStatus olarak belirlemiştik. Fonksiyon bize Azure sanal sunucuların hakkında anlık raporlar (html output olarak) üretmesini sağlamak temel hedefi idi. Bu fonksiyon RESTful isteklerin kabul ediyor olacak ve istediğimiz zaman abonelik içerisinde bulunan sanal sunucuların yapılandırma bilgilerini anlık ve her yerden bir web request ile raporlayabileceğiz.

Fonksiyonumuzu deploy etmeden önce bildiğiniz gibi Azure Subscription içerisine Azure Function App deploy etmemiz gerekiyor. Bunu dilerseniz Azure Portal, ARM Template, VSCode, Powershell yapabilirsiniz. Bu yazı içerisinde size aşağıdaki Powershell Script'ini takip ederek Azure Function App oluşturmanızı yardımcı olacak olan kod bloğunu paylaşıyorum.