Virtual Geek

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

Stuffs from real IT system ADMINISTRATORS world and my LAB

How to reset vCenter Server SSO administrator@vsphere.local password

Whenever I get a already configured VMware vSphere projects handover to optimization and modernization, Sometimes I received infrastructure vCenter server with forgotten passwords either root or administrator@vsphere.local. In my earlier blog I have already shows a procedure to Resetting root password in VMware vCenter Server Appliance, here I will be resetting a password of forgotten vCenter Se…

Read more

vCenter Server Public Key Authentication configuration SSH error received disconnect Too many authentication failures

This article is a second part of vCenter Server SSH received disconnect Too many authentication failures. In ther earlier article I resolved error without touching or configuring the VCSA (vCenter Server Appliance Server) to skip public key authentication. In this article I will configure VCSA server (VMware vCenter Server) to use public key authentication so I don't have do any extra settings on…

Read more

VMware PowerCLI esxcli namespace command elements empty no output

This article is another part and related to this VMware PowerCLI Connect-VIServer Object reference not set to an instance of an object. The resolution used in the earlier blog is applied here in this article.

The problem description is, I connected to my vCenter server after I tried to connect ESXi server with esxcli command set but sub command elements where blank empty. I wanted to install…

Read more

VMware PowerCLI Connect-VIServer Object reference not set to an instance of an object

While connecting to ESXi server with VMware PowerCLI from one of my server I was keep receiving below error. I wasn't able to connect to ESXi server directly from PowerCLI module. 

@SERVER01 ~ Connect-VIServer
Connect-VIServer :  Object reference not set to an instance of an object.
At line:1 char:1
+ Connect-VIServer
+ ~~~~~~~~~~~~~~~~~~~~…

Read more

Automate Many-to-One client certificate mappings for IIS hardening using PowerShell

Recently while talking to one of my colleage from another department, he wanted help on PowerShell scripts to automate few IIS Webserver (Internet Information Services) advanced configuration where he was struggling setting few IIS settings of manyToOneMappings for hardning purpose, other settings where easier to create new local user and install IIS with certain features. Below is the screensh…

Read more

Configure a Azure VM with Desired State Configuration in Automation Account

While working on one of the Azure Automation Accounts project I had to test and provide a demo of Desired State Configuration (DSC) on the Azure Virtual Machine, how it can be useful. There was a client requirment to not to use Group Policy for hardening, but the configuration must be done through DSC so servers can be targeted for hardening with proper reports. I had already did one huge project …

Read more

Writing and Using Terraform modules

This is a small example of Terraform module how to write and use it. A Terraform module is a folder/container for multiple resources that are used together. Every Terraform configuration has at least one module, known as its root module, which consists of the resources defined in the terraform .tf files in the main working directory.

Download Terraform module example zip here or you can downl…

Read more

vCenter Server SSH received disconnect Too many authentication failures

While connecting to vCenter Server Appliance with ssh command I was facing error Too many authentication failures disconnect. I checked ssh settings on the VCSA photon os from VM console but didnt find any issue. 

Related Article: 
Resetting root password in VMware vCenter Server Appliance
vCenter Server Public Key Authentication configuration SSH error received disconnect Too many authent…

Read more

Resetting root password in VMware vCenter Server Appliance

Recently I came accross vCenter server in my infrastructure where root password was not working. So I thought of resetting forgotten root password. Before starting reset process make sure to take the snapshot of  vcsa (VMware vCenter server appliance) virtual machine. This way it be can ensured there won't be any not mess anything on vm while doing this low level activity.

Microsoft vmware vsphere vcenter server snapshot take snapshot manager vcsa vcenter appliance reset root password management.png

Related Article

Read more

Powershell GUI VMware ESXi custom patch bundle builder

Every time VMware releases ESXi patches, and I need to patch them on different projects with few modifications to patch bundle, by trimming down few driver VIBs packages or add third party driver vibs zip files packages. I do everything with PowerCLI commands. But as I wanted my colleage to perform same tasks for other different project. So for this I have written this PowerShell GUI script as ESX…

Read more

View older posts »

Page Views


You can use get-azsubscription then use Set-AzContext with foreach loop to go through multiple subscription.

Thank you for the handy info.Is it possible for the one-liner bulk user create script to modify is so it users a csv file with the required fields (displayName,userPrincipalName,Password [passwordProfile],Block sign in (Yes/No))?


How to get multiple subscriptions. this scrip is working for only one subscription

I found useful to put at line 35 a try catch to avoid error if the key you are looking at doesn't actually exist. Something like
try {
$Data = $key.GetValue($ValueName)
$data = "NOT SET"

It's not so clean but it worked for me :)
Great JOB!

Follow me on Blogarama