Menu

Virtual Geek

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

Blog posts : "Powershell"

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…

Read more

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 …

Read more

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…

Read more

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…

Read more

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…

Read more

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…

Read more

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…

Read more

PowerShell Convert MAC address to Link-Local IPv6 address

I received one query on one of the chat group I am part of asking if there is a way to convert MAC physical address to Link-Local IPV6 address using PowerShell, Infact I had worked on the same kind project of migrating from IPv4 to IPv6 and already written it long bank. Lets see what is the formula …

Read more

How to sign PowerShell ps1 scripts

By reading the article subject first question rose to the mind why you should sign PowerShell scripts? The answer is whenever we download powershell script or we receive it from another users, The digital signature allows the user to confirm the validity of the certificate used to sign the script.…

Read more

Creating an internal PowerShell module repository

I was at client location and online Microsoft PSGallery was blocked as per company security policy, They wanted to only allow to use local respository which will only have tested and verified PowerShell modules. For this we suggested to configure a solution local PowerShell repository. In the Micros…

Read more

Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send

I was setting up a local on premises PSRepository server for collaboration purpose between my team also future planning is to limit users downloading modules from only from in-house PowerShell repositories. Local repository was setup but while publishing module on the repository I was getting below …

Read more

Get-PSRepository WARNING Unable to find module repositories

I was at one of my client's location and setting up PowerShell enviroment. I was trying to download few PowerShell modules from online PSGallery with below commands, while received the errors. After trying find and install PowerShell module with required parameters, in both the error outputs it was …

Read more

PowerShell WPF before and after image slider

While doing a PowerShell GUI project for a one of my client, they wanted to use one of the WPF control – GridSplitter, in such a way that it will switch or show different images while sliding GridSplitter. This cool effect can be easily achieved by using WPF bindings. I am using horizontal grid spli…

Read more

Getting started with Powershell Desired State Configuration (DSC) on Linux

DSC is a (DevOps) management platform in PowerShell that enables you to manage your IT and development infrastructure with configuration as code. While writing Part 1: Configure PowerShell remoting between Windows and Linux my main motive was to configure push Desired State Configuration (DSC) on L…

Read more

Configure PowerShell remoting between Windows and Linux

After opensource PowerShell core 6 for linux was available to download, I wrote an article on it - How to Install and Use Microsoft PowerShell on Linux. This is just an addition to same guide. Few of my linux servers were installed with PowerShell core and they were installed with few PS modul…

Read more

Powershell Generate Self-signed certificate with Self-Signed Root CA Signer

While exploring options on creating self signed SSL certificate using PowerShell, I got to know one of the good New-SelfSignedCertificate parameter Signer. It can be used by developers for testing purpose or I can also use it to generate fake CA signed certificates for my lab experiments. All the …

Read more

Powershell WinRM HTTPs CA signed certificate configuration

This guide is not specific to configuration but it also shows how I troubleshooted CA signed certificate issue while configuring WinRM listener. This is a third part of PowerShell remoting over HTTPS using self-signed SSL certificate, For security best practices instead of going with Self signed ce…

Read more

Configure Powershell WinRM to use OpenSSL generated Self-Signed certificate

PowerShell remoting over HTTPS using self-signed SSL certificate

This is a step by step guide and will show you how to use HTTPS port  and self signed SSL certificate while using Powershell Remoting. On the PSRemoting regards I had already written one article in the past POWERSHELL PS REMOTING BETWEEN STANDALONE WORKGROUP COMPUTERS, When you use WinRM PSRemot…

Read more

Solved Visual studio Code make sure you configure your user.name and user.email in git

Recently I formatted laptop and all the settings for my script environment where gone, I developed lots of PowerShell script using my laptop and use Version control to track changes which is very important, especially when I daily change my codes. Although I solely write my code, still if i require …

Read more

20 blog posts

Blog Search

Page Views

11274852

Follow me on Blogarama