Remote Desktop Protocol Client On Linux –

How to use xRDP for remote access to Ubuntu

Related imagecentos_windows_rhel-gif

Screenshot of RDP session from Windows Machine 10 to Ubuntu Workstation. 


To remotely control my Windows machines, I always prefer to use RDP (Remote Desktop Protocol) as it performs much nicer than VNC (Virtual Network Computing). VNC has this streak of “JPEG” quality and slow behavior, whereas RDP is fast and crystal clear.RDP is however a proprietary protocol from Microsoft. So how can we use RDP to control our Ubuntu box remotely?

This is where xRDP comes in play, an open source remote desktop protocol (RDP) server. It actually runs VNC protocol over RDP as far as I understand, yet if behaves much better than VNC by itself (possibly because of the used desktop manager). Since Ubuntu 12.10 (if I’m not mistaken), xRDP doesn’t seem to work with the Ubuntu desktop anymore … unless you use an alternative desktop manager. This seems related to 3D acceleration and nobody seems to care (since 2011, according to bug reports).

Note : if you really need Copy/Paste functionality between the two machines, then please use Ubuntu’s default installed “Desktop Sharing” instead (MacOS X users read this forum post).
Desktop Manager

Since the current desktop manager of Ubuntu (Unity which runs on Gnome) no longer seems to work with xRDP, an alternative desktop manager needs to be installed.

I tried OpenBox, but wasn’t very impressed by the amount of work needed to get a reasonable desktop.

We will use another desktop manager that has been around for quite a long time is XFCE, which is lightweight and fast.

Note : A light weight desktop manager helps making a remote desktop connection much more enjoyable.
Installing xRDP and XFCE

Installing xRDP and XFCE is pretty easy, once you know what to do …

Just make sure you have an Internet connection before you start.

Step 1 – Install xRDP

We will use sudo and apt-get to update your system and install xRDP. Keep in mind that sudo will ask for your admin password.
sudo apt-get update
sudo apt-get install xrdp
Step 2 – Install XFCE4

Again we will use sudo and apt-get:
sudo apt-get install xfce4
Optional, recommended by Neal, install XFCE4 terminal and 2 icons sets:

# Install XFCE4 terminal (way better than xterm)
sudo apt-get install xfce4-terminal

# Install icon sets
sudo apt-get install gnome-icon-theme-full tango-icon-theme
Step 3 – Configure xRDP

In this step we modify 2 files to make sure xRDP uses xfce4.

First we need to create or edit our .xsession  file in our home directory.
We can either use nano or simply redirect an echo statement (easier):

echo xfce4-session >~/.xsession
The second file we need to edit is the startup file for xRDP, so it will start xfce4.

vi /etc/xrdp/
The content should look like this (pay attention to the last line):


if [ -r /etc/default/locale ]; then
. /etc/default/locale

Step 4 – Restart xRDP

To make all these changes effective, restart xRDP as such:
sudo service xrdp restart
Testing your xRDP connection

On the computer that will remotely control your Ubuntu machine, start you RDP client.

Windows comes standard with a Remote Desktop client (mstsc.exe – you can start it from a command prompt, or find the shortcut to Remote Desktop under Accessories).

For a Mac, Microsoft actually has a Remote Desktop Client which can be found in the Apple App Store, or you can use Cord (free).

Whichever client you use, most work with either the computer network name or IP address of your Ubuntu machine.


Depending on your RDP client capabilities and settings (for example: Microsoft RDP Client allows automatic login), you might or might not see the login screen.

Here we enter our Ubuntu username and password and click “OK”, after which briefly a window will show with the login process and you’ll have access to your Ubuntu machine, even though the desktop looks different. One downside I’ve discovered so far is that the clipboard is NOT being synchronized … so Copy and Paste between machines does not work properly.


xRDP - Login screen

xRDP – Login screen


xRDP – Your Ubuntu xfce4 desktop


Remote Desktop on Linux

Deploy Virtual Machine In Vsphere – As Static or DHCP IP Address-VMware PowerCLI,

Deploy Virtual Machine in VSphere- via Static IP or DHCP by script in VMware PowerCLI,


 Prerequisites Requirements

  • Virtual Machine Windows Template
  • VMware Customization Wizard Profile.
  • IP Address
  • Subnet
  • Gateway

Deploy Virtual Machine with specific Static IP Address.





Core Script Method= Set-OSCustomizationNicMapping -IpMode UseStaticIp
‘Modifying the customization file with the network information you specified in the CSV’
  Get-OSCustomizationSpec $Customization | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStaticIp -IpAddress $IPAddress -SubnetMask $Subnetmask -DefaultGateway $DefaultGW

Core Script Method= Set-OSCustomizationNicMapping -IpMode DHCP
Get-OSCustomizationSpec $Customization | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode

Powercli Code Sample

‘Beginning Script’
‘Loading Snapins’
function LoadSnapin{
if (!(Get-PSSnapin | where {$_.Name   -eq $PSSnapinName})){
Add-pssnapin -name $PSSnapinName
LoadSnapin -PSSnapinName   “VMware.VimAutomation.Core”
‘Reading CSV file’
$vms = Import-CSV C:\Users\richard\Documents\newvms1.csv
‘Reading the contents of the CSV, and for each line execute the following code’
foreach ($vm in $vms){
‘Declaring variables that correspond to the column names in the CSV’
$VMName = $
$VMHost = Get-VMHost $
$Datastore = Get-Datastore $vm.datastore
$Template = Get-Template $vm.template
$Customization = $vm.customization
$IPAddress = $vm.ipaddress
$Subnetmask = $vm.subnetmask
$DefaultGW = $vm.defaultgw
$DNS1 = $vm.dns1
$DNS2 = $vm.dns2
# $WINS1 = $vm.wins1
# $WINS2 = $vm.wins2’Modifying the customization file with the network information you specified in the CSV’
Get-OSCustomizationSpec $Customization | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStaticIp -IpAddr
 ‘VMWare Automated Template Deployment Script
Script and Code was borrowed from the following smart people to help with learning journey.
Luc Dekens, Vmware blog.
Powershell and Linux OS Deploy Virtual Machine via Powershell DSC Linux -Coming Soon!!!!



  1. Great Video Tutorial Overview of Using Templates and Clone methods in Vsphere. 

2. VMware Technology Network

3. vSphere PowerCLI Cmdlets Reference Get-OSCustomizationSpec

4. Working with Customization Specifications in PowerCLI

5. Powershell and Linux Integration

6. Deploying a VM with Static IP in 3 Steps

7. Deploy Linux VM via PowerCLI.

VRA- 7.1 Installation and Configuration -How To

vRealize Automation 7.1 Release -Build 4270058

What is new in VRA 7.1 

The vRealize Automation 7.1 release includes resolved issues and the following changes.
•Streamlined installation process using a silent installer.
•Agent and prerequisite command line interface.
•Migration tool to move data from a source vRealize Automation 6.2.x environment to a fresh vRealize Automation 7.1 environment while preserving the source environment.
•IPAM integration framework with ability to deploy machines and applications with automated assignment of IP addresses from leading IP address management systems, with the first integration with Infoblox.
•Integrated support for Active Directory policies.
•Custom property dictionary controls to improve property definitions and vRealize Orchestrator actions.
•Reconfigure life-cycle events by means of event broker workflow subscriptions.
•Additional vSphere provisioning options and data collection improvements.
•Ability to manually conduct horizontal scale in and scale out of application environments deployed by vRealize Automation, including the automatic update of dependent components.
•Customizable message of the day portlet available on the home page.
•Additional information and filter options on the Items page.
•Discontinued support for PostgreSQL external database.

Diagram of Creating Blueprints

With Infrastructure as a Service (IaaS), you can rapidly model and provision servers and desktops across virtual and physical, private and public, or hybrid cloud infrastructures.

Software components automate the installation, configuration, and life cycle management of middleware and application deployments in dynamic cloud environments. Applications can range from simple Web applications to complex and even packaged applications.

With the XaaS, XaaS architects can create XaaS blueprints and resource action, and publish them as catalog items.

The service catalog provides a unified self-service portal for consuming IT services. Users can browse the catalog to request items they need, track their requests, and manage their provisioned items.

Systems Requirements
Operating Systems, Databases, and Web Servers Supported Requirements.

vRealize Automation Installation Components
1.vRealize Automation Appliance
2.Management Agents
3.vRealize Automation Infrastructure as a Service
a.IaaS Website
b.Model Manager
c.Manager Service
d.IaaS Database
e.Distributed Execution Managers
f.vRealize Automation Agents


In this demonstration we will only review and perform – Minimal VRA 7.1 –Deploy a proof of concept (PoC) or development environment with a basic topology.

Depending on your deployment requirements, you can install and configure vRealize Automation components by using the rainpole installation scenario, the Installation Wizard, or through the management console.

Choose a minimal installation to deploy a proof of concept (PoC) or development environment with a basic topology. Choose an enterprise installation to deploy a production environment with the topology best suited to your organizational needs.

Prerequisite Installation Steps.

  • Host Names and IP Addresses
  • Hardware and Virtual Machine Requirements
  • Browser Considerations
  • Password Considerations
  • Windows Server Requirements
  • vRealize Automation Port Requirements
  • User Accounts and Credentials Required for Installation
  • Security
  • Time Synchronization
  1. Deploy VRA Appliance-

To deploy the vRealize Automation appliance, a system administrator must log in to the vSphere client and select deployment settings. Some restrictions apply to the root password you create for the vRealize Automation administrator.


■Download the vRealize Automation appliance from the VMware Web site.

■ Log in to the vSphere client as a user with system administrator privileges.

Deploy OVA Procedure

1 Select File > Deploy OVF Template from the vSphere client.


2 Browse to the vRealize Automation appliance file you downloaded and click Open.


3 Click Next.



4 Click Next on the OVF Template Details page.


5 Accept the license agreement and click Next.



6 Enter a unique virtual appliance name according to the IT naming convention of your organization in the Name text box,  for example, VRA. select the datacenter and location to which you want to deploy the virtual appliance, and click Next.



7 Follow the prompts until the Disk Format page appears.


8 Verify on the Disk Format page that enough space exists to deploy the virtual appliance and click Next.


9 Follow the prompts to the Properties page.


The options that appear depend on your vSphere configuration.


10 Configure the values on the Properties page.


a Enter the root password to use when you log in to the virtual appliance console in the Enter password and Confirm password text boxes.

b. Open web browser to VRA appliance address to configuration VRA-


https://<VRA IP or FQDN> Port number 5480

for example,


 —  VRA applicande password prompt, user the root user and  with the password set at the step a.

b Select or uncheck the SSH service checkbox to choose whether SSH service is enabled for the appliance.

This value is used to set the initial status of the SSH service in the appliance. If you are installing with the Installation Wizard, enable this before you begin the wizard. You can change this setting from the appliance management console after installation.

Installation Minimal Deployment Steps.

Install a minimal deployment for proof-of-concept work. The wizard for minimal installation assumes you are installing all IaaS components on a single Windows machine.
Minimal deployments typically support a single vRealize Automation appliance, one IaaS server, and use a vSphere agent to support endpoints.


■Verify that you have met the prerequisites described in Preparing for vRealize Automation Installation

■Deploy the vRealize Automation Appliance  Procedure

1 Open a Web browser.

2 Navigate to the vRealize Automation appliance management console by using its fully qualified domain name,

for example,


3 Log in with the user name root and the password you specified when the appliance was deployed.


4 When the Installation Wizard appears, click Next.


5 Accept the End User License Agreement and click Next.

6 Select Minimal Deployment and Install Infrastructure as a Service on the Deployment Type screen and click Next.


7 Check that the prerequisites listed on the Installation Prerequisites page have been met and that the Window server on which you installed the Management Agent is listed.


8 If needed, you can change the timekeeping method for your vRealize Automation appliance. Click Change Time Settings, if you make changes.

9 ClickNext.

10 Click Run on the Run the Prerequisite Checker screen to verify that the Windows server in your minimal deployment is correctly configured for vRealize Automation use.

*Download the vCAC Iaas Management Agent Setup to IAAS Managment Server..


Direct download link https://<vraurl:5480/vCAC-IaaSManagementAgent-Setup.msi

For example.


Because this step runs remotely, it can take several minutes for the step to run.

a If a failed status is returned for a machine, click Fix to start automatic corrections or click Show Details and follow the instructions.

The Fix option applies corrections and restarts the IaaS Windows server.

b Click Run to rerun the checker.

c When all statuses show success, click Next.
11 Proceed through the next screens, supplying the requested information to configure your deployment components, including the Web server, Manager Service, Distributed Execution Manager, vSphere proxy agent, and certificate information.

Additional information is available from the Help buttons.
VRA 7.1 Version Release Notes reference.

Windows 2016 Server -Evaluation Preview

What is Windows 2016?

Windows Server 2016 is an upcoming server operating system developed by Microsoft as part of the Windows NT family of operating systems, developed concurrently with Windows 10.

The first early preview version (Technical Preview) became available on 1 October 2014 together with the first technical preview of System Center, and is currently in public beta testing. Unlike previous Windows Server versions, which were released simultaneously with the client operating system, Windows Server 2016 will be released between September 26 to 30, 2016 at Microsoft’s Ignite conference


Image result for windows 2016 technical preview 5


Here are screenshot of Windows 2016 Server Installation. Look very like Windows 10 UI.

win2016 win20161 win20162 win20163 win20164 win20165PNG win20166 win20167 win20168 win20169 win201610 win201611 win201612 win201613 win201614 win201615 win201616 win201617 win201618 win201619 win201620 win201621

Found some great video tutorials on Windows 2016 Installation How To.

Ten reasons you’ll love Windows Server 2016: Nano Server

Windows Server 2016 Evaluation Preview.

What’s New in Windows Server 2016 Technical Preview

Windows Server 2016

Window 10 Enterprise Edition- Fresh Installation-All About

What is Windows 10?

Image result for windows 10

Windows 10 is a personal computer operating system developed and released by Microsoft as part of the Windows NT family of operating systems. It was officially unveiled in September 2014 following a brief demo at Build 2014. The first version of the operating system entered a public beta testing process in October 2014, leading up to its consumer release on July 29, 2015.

Windows 10 introduces what Microsoft described as “universal apps”; expanding on Metro-style apps, these apps can be designed to run across multiple Microsoft product families with nearly identical code‍—‌including PCs, tablets, smartphones, embedded systems, Xbox One, Surface Hub and Windows Holographic. The Windows user interface was revised to handle transitions between a mouse-oriented interface and a touchscreen-optimized interface based on available input devices‍—‌particularly on 2-in-1 PCs; both interfaces include an updated Start menu which incorporates elements of Windows 7’s traditional Start menu with the tiles of Windows 8. The first release of Windows 10 also introduces a virtual desktop system, a window and desktop management feature called Task View, the Microsoft Edge web browser, support for fingerprint and face recognition login, new security features for enterprise environments, and DirectX 12 and WDDM 2.0 to improve the operating system’s graphics capabilities for games.


Most of you probably now heard Windows 10 by now with all MS marketing of Windows 10.
This next section I will provide how to install Windows 10 fresh install from Windows ISO media.


Image result for windows 10 fresh install iso

Will be using Vmware Vsphere Virtualization technology to provide demonstration how easy to install Windows 10.

Install Free Windows 10 workstation Steps

I. Prerequisite 

  • Vsphere ESXI or Vcenter environment/hardware machine
  • Virtual Machine with at least 80G C drive.
  • 4 CPU
  • 6-8 G Memory
  • Download Window 10 ISO from MS Download

II. Installation Steps. 

  1. Create new Virtual Machine in ESXI or Vcenter
  2. Set the CD Rom as the primary in the boot order.
  3. Mount Windows 10 ISO to Virtual Machine.


4. click Next


5. Click Install Now. 


*Setup is starting prompt…


6. Check EUL and Click Next


7. Select Custom Installation Windows Option..


8. Select Default drive.


9. Windows 10 Installation Starts. 


10. Click on User Express Settings Option.


*Installation Prompt- Just a moment….


10. Click Next.

11. Click Next


12. Input the User Name . Password , and Password Hint.


*Installation Prompt– Just a moment.


13. Choice either option.. Not now or use Cortana.


*Installation status prompt.. Getting Things ready….


14. Will get network prompt , click Yes.


*Above screen should indicate Windows 10 fresh installation is complete.

Click on start menu and look around. A lot new stuff in Windows 10.


MS Edge Browser.



Here are great Windows 10 Installation Video Tutorial found on youtube.

Windows 10 Download Link.

How to Clean Install of Windows 10

Windows 10

Windows 10 Installation Video 

Windows 10 -Disable IPV6- A Must Read!!!

Window 10 -Disable IPV6 – A Must Read!!!!



We all know most or all organization are not yet ready for IPV 6-  I have seen out of the box testing with latest OS workstation and server release, forces IPV6 and the standard native disabling on Windows 10 didn’t disable it.

For example, typical step not enabling IPV6 – Uncheck Protocol on Network Card Setting- 


Screenshot show – that Internet protocol Version 6-TCP/IPV6 is uncheck.


How to Disable IPV6 On Windows 10.


Network Services DNS, DHCP & IPAM (DDI)

Automate IP Address Provisioning for Virtual Machines

The Infoblox VMware Cloud Adapter was developed for VMware vCenter Orchestrator (vCO)/VMware vRealize Orchestrator (vRO), which works in tandem with the VMware vCloud Director (vCD) and vCloud Automation Center (vCAC)/vRealize Automation (vRA). This adapter automates the processes of providing an IP address to a newly created virtual machine, updating DNS and configuring network devices quickly and efficiently.

The Infoblox VMware Cloud Adapter was developed for VMware vCenter Orchestrator (vCO)/VMware vRealize Orchestrator (vRO), which works in tandem with the VMware vCloud Director (vCD) and vCloud Automation Center (vCAC)/vRealize Automation (vRA). This adapter automates the processes of providing an IP address to a newly created virtual machine, updating DNS and configuring network devices quickly and efficiently.

Network landscapes are rapidly evolving, driven by trends in security, virualization, cloud, IPv6 adoption, and the Internet of Things (IoT). These modern demands require advanced solutions for managing critical network services in physical, virtual, and cloud environments.


Infoblox’s industry leading integrated, centrally managed approach to delivering enterprise-grade DNS, DHCP, and IP address management (DDI) supports current and evolving IT needs while providing the highest standards for security, service uptime, and operational efficiencies.



Infloblox IPAM –

How Install Infoblox DHCP, IPAM and DNS- Virualization

IPAM Automation with VMware and Infoblox Solutions

Windows Powershell-Introduction

Powershell-Intro Section

This section is posting to help with an introduction to Powershell. If you need know get more in-dept input on the Powershell Extension, Module, Cmdlets, and PowerCLI related topic.


Go to the section MS Power shell and and Vmware PowerCLI-

What are variables?


  1. Unit of memory
  2. Begin with dollar sign(4)
  3. Variable names can include spaces and special characters. 
  4. Note case-sensitive:
    *Automatic (built-in)

 i. Automatic Variables
a. Built-in
    b. Created and maintenance. by Power shell
    c. Store Power shell State. 

For example:

  • $Error : List of all errors
  • $? : Execution status of last operation
  • $HOME: User’s Home Directory
  • $Host: Object representing current host application for Poswershell
  • $NULL: NULL or empty value
  • $PSHOME: Full path of installation directory for Powershell
  • $True: Represents TRUE in commands
  • $False: Represent FALSE in commands

ii. User-Define Variables

  • Created and maintained by user
  • Existing only in current session
  • Lost when session is closed

iii.Variable CMDLETS


 Constant and Read Only Variables

*cannot be deleted
*cannot be changed
PS:C:\> New-Variable -Name pi -value  3.1419265 -option constant

Read Only:
*Can be deleted (except using -force)
*Cannot be changed (except using -force)
PS C:\> New-varible -Name max -Value 256 -option Readonly

Example: User Defined Variable






Data Type

*Everything is an OBJECT
*Each OBJECT has a TYPE

Example: Literal String

Create a variable
PS C:\  $a =123

Include the variable in a literal string(single-quotes)
PS C:\ $b =’As easy as $a’

Notice that $a is not expanded

PS C:\> $b
As easy as $a


*Simplify use of longer; more complex string assignments
*Here String can contain quotes, @ sign, etc



Variable Sub -Expression
*Returns the result of one or more enclosed statements
*Can be used to access an object property and concatenate its value within an expandable string.




Determine the variable type




Use Variable in a String-








Use a Variable in Data Types

What is Data Type in Powershell?

Data Type supports many other data types, such as floating point numbers, strings, and Boolean values. You don’t have to explicitly declare the data type of a variable; PowerShell automatically chooses the data type for you when you initialize the variable—that is, when you first assign a value.

  • Everything is an Object
  • Each Object has a TYPE

Example Expandable Strings

Create a varaible
PS C:\>  $a =123
Include the variable in a literal string (single -quotes)
PS C:\> $b =‘As easy as $a’
Notice that $a is not expanded
PS c:\c $b
As easy as $a

Example of Here Strings



vRealize Operations Manager and Log Insight Integration

“The time has come to make your VROPS and Log Insight Integrated– to help your organization more “awesome”.. to predict, consolidate and preempted all events and sys logs, VROPS analytic virtual infrastructure data in one single paint of glass.”



VROPS and Log Insight Integration.

vRealize Operations Requirements
•Integration between LI and vR Ops requires at least vR Ops 5.6 Standard edition. In order to get the best integration, vR Ops 6.0 is highly recommended — more on this in a future post.•If you are running vR Ops Standard edition, then you will need the default admin user credentials.
•If you are running vR Ops Advanced or Enterprise edition then read only user credentials are sufficient.
•vR Ops Foundation edition is not supported for integration with LI.

•Launch in Context functionality — more on this in a future post.•If running vR Ops 5.7.1 standalone then you need to manually install the LI adapter.
•If running vR Ops 6.0 then you need to manually install the Log Insight management pack. Note that there is a newer management pack available on Solution Exchange that should be used instead of the default LI management pack on the vR Ops 6.0 download site.
Configuring vRealize Operations Integration
•Prerequisites•If running vR Ops 5.7.1 standalone, manually install the Log Insight adapter.
•If running vR Ops 6.0, manually install the Log Insight management pack.
•Navigate to Administration > vRealize Operations in LI.
•Enter the hostname, username, and password for the vR Ops instance and select Test Connection.
•Ensure both checkboxes are enabled.
•Select Save. Be patient as the initial configuration can take several minutes to complete


There is some additional information about integration to be aware of:

  • To unconfigure integration (e.g. to switch to a different vR Ops instance), uncheck both checkboxes and then select Save.
  • LI can connect to a single vR Ops instance today, but multiple LI instances can be integrated with the same vR Ops instance.
  • If multiple LI instances are integrated with the same vR Ops instance then some integration benefits will only be available to the last configured LI instance — more on this in a future post.
vRealize Operations Manager

VMware PowerCLI Reset ESXI Host Root Password Script

Here is another useful PowerCli Script for VMware Administrator, especially during the time when organization required change all system accounts’ passwords – change password 60-90 days policy.

We all know it is a pain logging into ESXI Remote Console individually and setting the root password via ILO/DRAC/KVM (HP, Dell, and UCS)

So why not leaverage PowerCLI script to make things easier. For example, setting ESXI root password from powercli script.

I. Prerequisites

a. VMware Powercli 5 or 6  and  Existing ESXI Root Password,

b. Rest_esxi_root_password.ps1 and esxserver.txt script files. : Click below image to view what are the script files names:


b. Edit esxserver.txt and add list of ESXI Host FQDN or IP Addresses in the esxserver.txt: Click below image to view the syntax of ESXI host list within the esxserver.txt


III. Reset ESXI Root Password Code:

# This script changes the root password on all ESX hosts in the esxservers.txt textfile
# Get old root credential
$oldrootPassword = Read-Host “Enter old root password” -AsSecureString
$oldrootCredential = new-object -typename System.Management.Automation.PSCredential -argumentlist “root”,$oldrootPassword
# Get new root credential
$newrootPassword = Read-Host “Enter new root password” -AsSecureString
$newrootCredential = new-object -typename System.Management.Automation.PSCredential -argumentlist “root”,$newrootPassword
$newrootPassword2 = Read-Host “Retype new root password” -AsSecureString
$newrootCredential2 = new-object -typename System.Management.Automation.PSCredential -argumentlist “root”,$newrootPassword2
# Compare passwords
If ($newrootCredential.GetNetworkCredential().Password -ceq $newrootCredential2.GetNetworkCredential().Password) {
    # Create new root account object
$rootaccount = New-Object VMware.Vim.HostPosixAccountSpec
$ = “root”
$rootaccount.password = $newrootCredential.GetNetworkCredential().Password
$rootaccount.shellAccess = “/bin/bash”
    # Get list of Host servers from textfile to change root password on
Get-Content C:\scripts\esxservers.txt | %{
Connect-VIServer $_ -User root -Password $oldrootCredential.GetNetworkCredential().Password -ErrorAction SilentlyContinue -ErrorVariable ConnectError | Out-Null
If ($ConnectError -ne $Null) {
Write-Host “ERROR: Failed to connect to ESX server:” $_
Else {
$si = Get-View ServiceInstance
$acctMgr = Get-View -Id $si.content.accountManager
Write-Host “Root password successfully changed on” $_
Disconnect-VIServer -Confirm:$False | Out-Null
Else {
Write-Host “ERROR: New root passwords do not match. Exiting…”


III. Download ESXI Root Password.

[embeddoc url=”” download=”all”]

III. Step by Step Illustration.

a. Launch PowerCli -as – Run As Administrator.


b. Copy (download link above) and extra it on local machine.

*Please note, No need to type  Connect-VIServer, to log into ESXI or Vcenter,  the script will take host list and old password to authenticate in the systems, it is part of the  PowerCLI script .



c.  Edit and save, the esxserver.text with ESXI host(s) you will be reset root password. (please note you must know the orginal root password to proceed to be successfully with Root Password set script. )



 d.Execute the Reset_esxi_root_password.ps1 >  .\Reset_esxi_root_password.ps1



e. You will get prompt to input old password.


f. Then prompted for new password and confirm new password.

esxinewrootpw*Please note make sure the path to esxserver.txt is set correct.
By default it is set to c:script\esxserver.txt. Make sure it matches where both rest_esxi_root_password.ps1 and esxserver.txt is copied to local machine.
For example, here is the error message you will see:
Get-Content : Cannot find path ‘C:\scripts\esxservers.txt’ because it does not exist.
At C:\Users\richard\Desktop\Powercli\RootESXI\Reset_esxi_root_password.ps1:25 char:5
+     Get-Content C:\scripts\esxservers.txt | %{
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (C:\scripts\esxservers.txt:String) [Get-Content], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand


*if the old password was not input correct- it will error out with below message.

ERROR: Failed to connect to ESX server: x.x.x.x.



g. Successfully reset ESXI host root password prompt.



1. Change ESXI Root Password

2.PSCredential Class (System.Management.Automation