When working with arrays and PSObject in PowerShell, there are several efficient methods for creating and managing array elements. Below are examples that highlight both the creation of arrays and the addition of elements in different ways.
To create an empty array in PowerShell, you have two m…
I had a requirement to provide a solution for monitoring ESXi servers' CPU, memory, and datastore usage to non-IT or developer users without giving them direct access to vCenter or ESXi servers. The solution needed to avoid using any additional applications or tools. Previously, I had set up a syste…
This article demonstrates how to deploy an Azure ARM template using Terraform. I encountered several scenarios where resources deployed through Terraform, Bicep, or the REST API didn't function as expected. However, when I deployed the same resources using an ARM template, they worked flawlessly.
In this article, this example shows how to deploy resource group in Azure subscription. While deploying resource group with PowerShell you need to use New-AzSubscriptionDeployment cmdlet. Below is the output after deploying Resource Group in the subscription.
This article is about Implementing of CPU Quota Usage Alert for Azure Subscription. As part of my recent assignment, I successfully created a CPU quota usage alert for an Azure subscription using Azure Resource Manager (ARM) templates. The deployment enables real-time monitoring of CPU quota usage, …
After successfully configuring and setting up Azure and Terraform in GitHub Actions, I embarked on a Proof of Concept (POC) to automate PowerShell scripts (Azure az module) using GitHub Actions. I meticulously automated all the job steps using PowerShell, with a primary focus on utilizing credential…
In our team, a colleague was tasked with configuring SNMP settings on multiple HPE ILO portals. To streamline this process and avoid manual labor, they sought my expertise in automation. I leveraged the HPE ILO Redfish REST API with PowerShell to automate the task, utilizing the comprehensive API do…
This HTML tool enables users to restart Linux servers remotely from their web browser, providing a convenient and efficient way to manage server operations. Built using HTML, PHP, and PowerShell, this project is designed to be hosted on a Windows XAMPP server only.
This PowerShell script provides a graphical user interface (GUI) for generating new GUIDs. Each time the "Generate" button is clicked, a new GUID is created using the [guid]::NewGuid() command. The interface is built using Windows Forms, offering a user-friendly way to quickly generate and view uniq…
Using client id (Service Principal) and client secret to connect Azure Rest API is fairly easy and simple. As I have shown in my earlier articles. I am using another way of using your organization Username of Password to connect to azure Rest API instead of client id and client secret. You generate …
I had a task to explore and deploy resources in Microsoft Azure using Rest API. Very good and detailed documentation is provided by Microsoft for Azure Rest API here https://learn.microsoft.com/en-us/rest/api/azure/.
In this example I will use PowerShell to automate Azure Rest API and cre…
While working on collaborative environment of Terraform deployments, you might encounter an error of acquiring the tf state locking issue. In Terraform word when backend is configured to store state file on remote. It limits multiple users from making changes to environment at the same time to avoid…
Working with deprecated Internet Explorer using PowerShell to automate it was very easy earlier. To automated clicks or auto type on Internet Explorer, I was just using native .net com objects, which was a very simple and comprehensive. But since Internet Explorer is deprecated, I switched to Google…
This is an example of how to use parameters in Azure DevOps Pipeline YAML configurations. To start with this I have added first parameters: in the YAML file configuration. Under it I have multiple parameters, to create basic string parameter 3 properties are required name, displayName and type as …
While working with shared folder permissions, I wanted to document access and permissions of folders in readable format in automation way with PowerShell, You can see the permissions with below command of a folder. Access and permissions are in SDDL format, not in user friendly format to read, it co…
This web portal is part of Executing a Linux programs from PHP web server. In earlier part I used only PHP to remotely execute commands on Linux server. In this it is a combination of PHP and PowerShell. Once you launch portal you will need to provide Domain username and password to authenticate an…
This is a one liner command script to connect to Active Directory and verify user name and password credentials provided. I am using System.DirectoryServices.DirectoryEntry .net object here to connect to LDAP server (In my case it is Active Directory). When you are connected successful with correct…
Currently I am working on a PowerShell GUI project where I need to track Mouse Cursor. In this article this is a sample code to track Mouse Cursor. As you move mouse on GUI console, it shows the position of mouse.
In this sample code it uses MouseMove event and Windows.Input.Mouse position…