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 install Ansible on Linux for vSphere configuration


Recently I took over a task to evaluate few DevOps configuration, automation and orchestration tools to configure VMware vSphere. There are many tools available in the market for DevOps automation. Personally I like and already worked on PowerCLI DSC earlier and have great expertise. Still I preferred Ansible since I have expertise on the same tool since great community support. Plus my entire…

Read more

Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration

After installation of new version of VMware PowerCli module on one of my deployment at client infrastructure. I tried testing it by using cmdlet connect-viserver to vcenter, which was failing with below error. Reading error carefully on the screen, which was telling me, my vcenter’s SSL certificate is not trusted or self-signed, also The error gives resolution it self what needs to be done next.…

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 splitter and two images. Below is the main source code in the grid for splitter.

<Grid Margin="10…

Read more

Powershell Azure Inventory GUI Utility



Here I have developed a script using Microsoft Powershell which I was working since last couple of days in my lunch breaks. Just to show my work below is the video, it shows how GUI tool looks like and work, Still there are lots of things remaining to edit and add to this tool, I am working on it, and gradually I will b…

Read more

Azure automation account DSC for On-Premise Virtual Machine on boarding

In my earlier series on on-prem Powershell DSC server I shown how to configure DSC (Desired State configuration) server and its client on windows & linux. Enabling WinRm is one of the main prerequisite for all DSC operations. If I see DSC's future, Microsoft is more and more focusing on Azure DSC (desired state configuration), Azure adds cloud-based management layer to DSC, you can use it as Dev…

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 Linux server from windows. To work DSC on Linux below versions and flavors of Linux are supported, I …

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 modules for management purpose. I was looking for remote solution to access those modules using windows p…

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 commands are executed on PowerShell as administrator. 

Below command generates your first self…

Read more

Enable Access to the VCSA Bash shell or Appliance Shell

Currently, the vCSA is bundled with below supported shells - BASH Shell & Appliance Shell. The appliance shell can be used to update the VCSA, using the software-packages command and has some other use cases. When you log in for first time by default it shows appliance shell, below is the method to switching the vCenter Server Appliance 6.x to BASH Shell

     1) Use putty any other ss…

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 certificate I am using CA signed certificate. First step I need is CSR file, I have used below two ope…

Read more

View older posts »

Page Views


This will work.

Import-CSV c:\serverlist.txt| ForEach-Object {.\Set-DNSIP -Name $_ -NetworkName Ethernet -DnsIPs '',''}

You will need to have to have the list of Nic names.

How can I use this with a list of servers from a text or csv file.
Something like this:

ForEach-Object {.\Set-DNSIP -Name (Get-Content C:\ServerList.txt) -NetworkName Ethernet -DnsIPs '',''}

So far it works great for (1) server name in the text or csv but not for multiple.

This script does not go into the subfolders. Can you provide the script for downloading subfolders and files therein as well?


"Here I am creating second self signed certificate but using parameter -Signer which specifies a Certifcate object with which this cmdlet signs the new certificate."
Created certificate is not self-signed. It is signed by specified "Certificate object". Although of course Microsoft called it wrong as usually.

Follow me on Blogarama