Using Microsoft Azure REST API is great way to automate Azure Resources and operations. Some times I have found PowerShell Az module is not present on remote servers and I need to automate azure things, Rest API is very handy at the time when features which are not available on PowerShell module AZ.…
Blog posts : "powershell"
Connect-AzAccount The 'Connect-AzAccount' command was found in the module 'Az.Accounts', but the module could not be loaded
While connecting to Azure using powershell with Connect-AzAccount cmdlet I was receiving below error. As troubleshooting steps I tried to update/install Az module from online Microsoft PowerShell repository with -Force and -AllowClobber parameters, tried to Import Module Az, Az.Accounts on PowerShe…
Powershell WPF MahApps.Metro update theme library
This script is just an update to new dll libraries of MahApps.Metro theme for Powershell WPF. I had already written basics of Part 3: Powershell wpf MahApps.Metro theme step by step guide but, It is almost 2 years back and I was using MahApps.Metro 1.6 version and new version of MahApps.Metro v2…
Powershell adding leading zeros to string or int
I was working on a script project where I wanted to create and defined names for multiple virtual machine in the series, with maintaining length of the string of names with numbers adding leading zeros, Below -f format operator one-liner command helps me to create the list.
… |
Powershell Dell iDrac redfish Rest API basic authentication
In one of my blog Configure Dell iDrac9 Rest API with Powershell I showed how use x-auth-token to connect to Dell iDrac, here I instead of token, using basic authentication (use UserName and Password each time to connect to Redfish iDRAC rest api), This is just a example and I will be using expli…
Powershell web scrapping extract table from html
This is small script I use to collect the table data from website to Powershell Object and then further it can be saved to csv file. For this example I am taking table example from https://datatables.net. I will try to convert table to Powershell Object. HTML tables has tags th (Table header) and …
PowerShell slice array into groups of smaller arrays
This is a small script to slice or break array into groups of smaller array, and I use it in my scripts most often. This script is very helpful when I want to batch process multiple server at time but not on all the server, instead fewer servers at servers in batch. Once I have a very big fat list o…
Powershell Convert range of numbers into another list of numbers maintaining ratio
Recently I was working on some PowerShell GUI project, Where I wanted to convert a range of number into another range of number maintaining ratio, for this I had to use one Arithmetic Math formula and, for example I have numbers between 1 to 200, Which I wanted to fit into new number of range bet…
Powershell vCenter server Rest API create and assign tag and tagcategory
While working on one of the automation project I wanted to assign tags and tag category on VMware clusters using Powershell, It is easy task when done using PowerCLI module but the requirement was not to use PowerCLI module instead make use of vSphere vCenter Rest API.
Powershell Find application window state minimized or maximized
While working on one of the small freelance project there was a requirement to find whether launched application/process is minimized or maximized (For example when I open Microsoft excel what is the state whether it is minimized or maximized). This value of window state you can easily get with UIAu…
Configure Dell iDrac9 Rest API with Powershell
After writing 2 articles related on HPE ILO rest api, I had to automate Dell iDRAC9 systems using powershell. Dell iDRAC9 rest API is based on Redfish resources. HPE ILO5 also uses redfish for APIs but the resources and parameter usage are somewhat totally different, So I wrote Dell iDRAC codes fr…
Powershell Configure ILO5 using Restful API
This is second part of PowerShell HPE ILO4 Rest API automation examples. In earlier part I shown how to use Rest API on ILO version 4. But the same API didn't work on ILO5 for me, After verifying document for ILO5, I found it uses RedFish rest api.
What is Redfish?
DMTF's Redfish® is a sta…
PowerShell HPE ILO4 Rest API automation examples
Using Microsoft PowerShell to consume and automate any Restful API is very easy. In my earlier article I showed how to automate VMware product to automation rest api - Powershell Using vRealize Log Insight Rest API. In this article I am using HPE ILO4 Rest API to write automation scripts and how …
Powershell Using vRealize Log Insight Rest API
I had an assignment to automate vRLI (VMware vRealize Log Insight) using Powershell as well as Ansible. Here in this article I am showing how to use Microsoft Powershell to automate vRLI configurations. The best part about vRLI is, it provides Rest API which you can easily consume with any scripting…
PowerCLI Get-VMhost The operation on computer failed The WinRM client cannot process the request
I frequently get error winrm client cannot process the request while running few VMware PowerCLI commands for example: Get-VM, Get-VMhost etc. The complete error is highlighted as below in the Red, This generally happens due to duplicate cmdlet name in the another module.
Import-Module VMw…
Powershell New-Object Retrieving the COM class factory for component with CLSID 80040154 Class not registered (Exception from HRESULT 0x80040154 (REGDB_E_CLASSNOTREG))
I was trying to use PowerShell object InternetExplorer.Application for automation purpose, While running my Powershell scripts on my VMs, I was receiving below error. To troubleshoot further I tested other Microsoft object for example: Excel.Application and Outlook.Application. Still I was recei…
Step by Step guide to push your first project to github.com
Part 1 Git version control integration in Visual Studio Code
Part 2 Git master branch source control integration in Visual Studio Code
Part 3 Git clone version control integration in Visual Studio Code
I have already wrote few articles on how to use git earlier, but they where completely …
Powershell Write-Eventlog The source name test does not exist on computer localhost
I was writing one GUI program on Microsoft Powershell, One of the requirement was logs (Information, Warnings and Errors) must be written under Event Log - Event Viewer, So troubleshooting or information viewing for program operations is easy and everything is logged properly. To fulfill the task th…
PowerShell Invoke-WebRequest The underlying connection was closed: Could not establish trust relationship for the SSL TLS secure channel.
I face below error frequently whenever try to automate a website running self signed or invalid certificate, Here is my lab vCenter server for demo which is using self signed SSL certificate. This causes my script to fail whenever using Invoke-WebRequest to automate website. You can trust the cer…
PowerShell Invoke-WebRequest The request was aborted Could not create SSL TLS secure channel
I was testing automating few banking websites to check uptime, Invoke-WebRequest is use to access webiste, using this command I wrote a script to access bank website with PowerShell commands, but while executing scripts it was failing to access web site and showing below error.
Invoke-We…
Blog Search
Page Views
9280358
Archive
- March 2023 (5)
- February 2023 (1)
- January 2023 (1)
- December 2022 (10)
- November 2022 (15)
- October 2022 (15)
- September 2022 (14)
- March 2022 (8)
- December 2021 (9)
- November 2021 (6)
Comments
-
RubiMarch 20, 2023 02:37PM
-
NoneMarch 16, 2023 05:38PM
-
AnonymousMarch 6, 2023 09:46PM
-
SJFebruary 27, 2023 10:39AM
-
SubhankarFebruary 22, 2023 12:28PM