Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Blog posts : "powershell"

Monitoring Dell Server Health Using RACADM CLI: Sensor Info from iDRAC

The racadm cli command with getsensorinfo subcommand fetches real-time live hardware sensor data such as temperature, voltage, and power, memory, processor status and other hardware information from a Dell server's iDRAC system. This is very useful to system administrators for monitoring server hea…

Read more

Turn Your PowerShell Into a Web Server: Instantly Share Local HTML & Files!

While working on some project I wanted a quick web server for testing. Instead of deploying and using full fledged production web servers such as IIS, Apache, HTTPD, NGINX etc. I created very lightweight web server using PowerShell which serve the purpose to use it for just quick web testing purpose…

Read more

Mastering Terraform Import: Seamlessly Integrate Existing Azure Resources

Why Importing Matters in Infrastructure-as-Code
When adopting Terraform for existing cloud environments, you'll inevitably face a critical challenge: How to bring existing infrastructure under Terraform management? This is where resource importing becomes essential. Without proper imports, Terrafor…

Read more

From Manual to Automated - Managing Dell iDRAC Power via Redfish API and PowerShell

Managing server power states manually is time-consuming, especially in large-scale environments or remote setups. For IT administrators overseeing Dell PowerEdge servers, automation is key to efficiency. Enter iDRAC (Integrated Dell Remote Access Controller) and the Redfish API—a modern RESTful st…

Read more

Key based passwordless authentication to Microsoft Windows OpenSSH Server

This is a second part of  OpenSSH Server configuration for Windows. In this part I am generating private and public keys, which will be used to login into Windows OpenSSH server. When using key based authentication on OpenSSH, you don't need to provide a password to connect Windows Server over Ope…

Read more

OpenSSH Server configuration for Windows

I had a requirement to test configuring OpenSSH server on Microsoft Windows and connect it through OpenSSH client. Using given below steps in this article we can setup OpenSSH server on Windows server and connect through Linux SSH client.

First go to Settings >> Apps & features >> Optional featu…

Read more

Get Nutanix virtual machine details using PowerShell

This article is demonstration on how to connect to Nutanix using PowerShell and fetch virtual machine inventory. This is the view of Nutanix prism central portal and on the dashboard I can see all the information related to Nutanix objects.

nutanix AHV powershell automation configuration inventory aos hypervisor virtualization.png

In this prism central I can see virtual machines. My…

Read more

Create PowerShell array of object in different way

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…

Read more

Broadcom VMware PowerCLI based ESXi capacity planner html web portal

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…

Read more

Deploying Azure ARM templates using Terraform

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.

Read more

Azure resource group deployments with ARM JSON templates in Subscription with PowerShell

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.

.\091-Complete_ARM_Template> # Crea…

Read more

Create CPU quota usage alerts for subscription using Azure ARM templates

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, …

Read more

Part 4.1 GitHub Actions deploy azure resources with PowerShell

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…

Read more

Configure SNMP Service on HPE ILO Redfish Rest API using PowerShell

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…

Read more

Reboot remote Linux server from PHP PowerShell web server for privileged users

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. 

For added security and author…

Read more

Generate GUID using PowerShell GUI tool

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…

Read more

PowerShell create resources on Azure using Rest API with user account

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 …

Read more

Azure Rest API connect with Powershell and create resources

Powershell Microsoft Azure Rest API postman configuration automation application platform interface invoke-webrequest invoke-restmethod.png

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…

Read more

Terraform Force-Unlock Command and Unlocking State file on Azure backend with PowerShell

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…

Read more

Create storage account and Service Principal using PowerShell for Terraform Azure Backend

While working on earlier article Configure Azure Storage Account Blob as Terraform backend to store tfstate file, I wanted to test terraform backend configuration with Azure Service Principal (App registrations) account. To configure initial resources on Azure for backend, I have automated all the …

Read more

20 blog posts

Blog Search

Page Views

12949755

Follow me on Blogarama