VMware Training and Certification. Year 2025. Part 1. Introduction. Authorized Training. VMware after the Broadcom acquisition: Implications for training. Why VMware Authorized Training? Core VMware Authorized Training Domains. VMware Certification as part of the learning journey. Target Audience. Brief Summary.

Introduction


Hello to all readers of the blog about IT Architecture and Learning!

In previous years, we published a series of articles: “VMware Learning. Year 2023”, “VMware Learning. Year 2022”, “VMware Training. Season 2021–2022”, and “VMware Learning. Year 2020”.

We are now starting a new series called “VMware Training and Certification. Year 2025”, in which we will explore all current educational directions of VMware, update information about previous courses, and consider changes in the platform after VMware’s acquisition by Broadcom.

To begin with, let us recall the features of authorized training, the main learning domains, and how certification paths are integrated into professional development.

Authorized Training


VMware technologies have long served as a foundation of enterprise IT infrastructure — from classic server virtualization to modern hybrid and multi-cloud architectures. Even in the context of significant corporate changes resulting from VMware’s acquisition by Broadcom, the platform continues to play a strategic role in data centers and remains a key building block for scalable, secure, and automated environments.

For organizations and professionals who design, operate, or transform such solutions, practical experience alone is no longer sufficient. A critical factor is structured, vendor-authorized training, built according to the official methodology of the technology owner.

VMware Authorized Training is not a collection of isolated courses, but a cohesive learning ecosystem. Each learning domain corresponds to a specific technology area and professional role – from administrators and support engineers to infrastructure, cloud, and application architects.

VMware after the Broadcom acquisition: Implications for training


Following VMware’s integration into Broadcom, the platform’s development focus has shifted toward enterprise customers, large-scale data centers, and mission-critical workloads. This shift is also reflected in the training model: courses have become more architecture-oriented, scenario-driven, and closely aligned with real-world operational practices.

In this context, authorized training serves a dual purpose. It delivers up-to-date product and platform knowledge while also establishing consistent approaches to infrastructure design, lifecycle management, and long-term operational stability.

Why VMware Authorized Training?


VMware authorized courses are developed directly by the platform vendor and:

  • are based on real-world architectural scenarios, not simplified lab exercises;
  • align with current and strategic VMware (Broadcom) product directions;
  • build competencies required for VMware certification programs;
  • establish a common terminology and methodology for design, operations, and troubleshooting.

As a result, authorized training is an optimal starting point both for professionals new to VMware and for experienced engineers seeking to structure their knowledge or progress to an architectural level.

Core VMware Authorized Training Domains


Core VMware Authorized Training Domains:

  • Datacenter Virtualization: Compute virtualization based on vSphere: ESXi, vCenter, resource management, high availability, scalability, and data center operations.
  • Cloud Management and Automation: Infrastructure and service lifecycle management, monitoring, and automation using VMware Aria (vRealize).
  • Network Virtualization: Software-defined networking with VMware NSX: switching, routing, microsegmentation, and integrated security.
  • Application Modernization: Platforms for modern applications and containers: Kubernetes, Tanzu, and hybrid application architectures.
  • End-User Computing: Virtual desktops, endpoint management, and secure access using Horizon and Workspace ONE.
  • Security: VMware Carbon Black Cloud, VMware NSX Security, Device Security.

Each learning domain – Datacenter Virtualization, Cloud Management and Automation, Network Virtualization, Application Modernization, End-User Computing, Security – has its own certification track, enabling a structured and long-term professional development path.

Each of these learning domains has its own training paths — from foundational courses for administrators to advanced programs for architects and consultants.

VMware Certification as part of the learning journey


VMware Authorized Training is closely integrated with the official VMware certification framework, which validates a professional’s technical readiness to work with enterprise environments. VMware certifications are not an end in themselves – they serve as indicators of proven competencies gained through structured learning and hands-on experience.

Depending on the technology domain and professional role, training paths align with the following certification levels:

  • VMware Certified Professional (VCP): Core professional level for administrators and operations engineers, validating installation, configuration, and daily operations skills.
  • VMware Certified Advanced Professional (VCAP): Advanced level focused on solution design or deployment and optimization, requiring deep architectural understanding.
  • VMware Certified Implementation Expert (VCIX): A combined credential demonstrating both design and implementation expertise within a specific domain.
  • VMware Certified Design Expert (VCDX): The highest architectural certification, confirming the ability to design complex, large-scale, mission-critical VMware solutions.

Target Audience


This series of articles is intended for:

  • VMware infrastructure engineers and administrators;
  • architects of on-premises, hybrid, and cloud solutions;
  • technical leaders and consultants;
  • participants of mentoring and corporate training programs;
  • organizations planning the development or transformation of their infrastructure.

In the following publications, each VMware Authorized Training domain will be reviewed separately, with explanations of roles, skill levels, typical use cases, and the logical progression between courses.

Brief Summary


This article opens the “VMware Training and Certification. Year 2025” series and provides an overview of VMware Authorized Training in the context of VMware by Broadcom. It explains the structure of official learning domains, the role of authorized courses, and how certification paths (VCP, VCAP, VCIX, VCDX) support long-term professional development for administrators, engineers, and architects working with enterprise VMware platforms.

The next article in the series will focus on Authorized Training: Datacenter Virtualization, covering VMware vSphere 8.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Certification, Education, Technology, Training, Virtualization, VMware | Tagged , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

VMware Training. Year 2023. Part 18. Introduction. Authorized Training: Virtual Cloud Network: VMware HCX. Brief Summary.

Introduction


Hello to all readers of my blog!

In the previous article of the series “VMware Training. Year 2023″ we considered a list of training programs in the direction of Virtual Cloud Network: vRealize Network Insight.

Today we will talk about the main training programs in the field Virtual Cloud Network: VMware HCX.

VMware HCX


VMware HCX is an application mobility platform designed for simplifying application migration, rebalancing workloads, and optimizing disaster recovery across data centers and clouds.

Key current VMware HCX technology training programs are:

VMware HCX: Management and Operations

  • Duration: 4 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience:
    • System administrators;
    • System engineers;
    • Migration engineers;
    • Migration architects.
  • Prerequisites: This course has the following prerequisites:
    • VMware NSX-T: Install, Configure, Manage [V3.0] or equivalent strong networking experience;
    • VMware vSphere: Install, Configure, Manage [V7];
    • Disaster recovery and business continuity fundamentals.

This four-day course gives you knowledge and practical exercises sufficient to manage VMware HCX and to migrate virtual machines using VMware HCX. The course focuses on configuration and management of VMware HCX. The course equips system administrators with the knowledge, skills, and abilities to achieve competence in migrating virtual machines.

VMware HCX: Deploy, Configure, Manage

  • Duration: 3 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience: System administrators, system engineers, migration engineers, and migration architects.
  • Prerequisites: This course has the following prerequisites:
    • VMware NSX: Install, Configure, Manage [V4.0] or equivalent strong networking experience;
    • VMware vSphere: Install, Configure, Manage [V8];
    • Disaster recovery and business continuity fundamentals.

This three-day training course provides you with the knowledge, skills, and abilities to achieve competence with VMware HCX. This course teaches you how to deploy the different architectural components of HCX, and perform the tasks required to migrate and rebalance workloads across data centers and clouds.

Brief Summary


In this article, we got acquainted with the main training programs in the field of Virtual Cloud Network: VMware HCX.

In the next publication of the cycle “VMware Training. Year 2023″ we will talk about training programs in the field of Anywhere Workspace: Horizon 8.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Cloud, Education, Technology, Training, Virtualization, VMware | Tagged , , , , , , , , , , , | Leave a comment

Anything as Code: Check Uploaded File Hash. Introduction. Function Check-UploadedFileHash. Brief Summary.

Introduction


Hello to all readers of the SDDC and Architecture, Solution, Implementation and Operations as Code blog.

Today, I will continue to talk about such a conceptual approach as Operations as Code as a component of the Anything as Code strategy.

In the previous post, Anything as code: Upload File to ESXi Datasore, I talked about the function that performs the task of uploading a file to the ESXi datasore. Functions are passed to the input the necessary parameters in the form of a variable, changing which you can also use a code reuse strategy.

Today we will take the next step and consider the following situation: The file is uploaded to the datastore of the hypervisor, but during operation we observe some errors. So I want to be sure that the file was uploaded correctly. To do this, you need to calculate the hash of the file and compare it with the correct one.

Moreover, for the efficiency of the work process, this action should be performed on the hypervisor side with the appropriate built-in tools.

So, for your attention, the PowerShell function Check-UploadedFileHash.

Check-UploadedFileHash


So let’s look at the code for the Check-UploadedFileHash function:

Function Check-UploadedFileHash {

<#
.SYNOPSIS
    Check file Hash Uploaded to ESXi datastore.  

.DESCRIPTION
    Check file Hash Uploaded to ESXi datastore. 

.PARAMETER Target
    Name or IP Address of the VMware ESXi.

.PARAMETER File
    Name of file.

.PARAMETER Datastore
    Name of ESXi Datastore.

.PARAMETER Folder
    Name of ESXi Datastore Folder.

.PARAMETER Algorithm
    Algorithm for calculate Hash.

.PARAMETER Hash
    Reference File Hash.

.NOTES
    Version:        0.1
    Author:         Andrii Romanenko
    Website:        blogs.airra.net
    Creation Date:  10.08.2023
    Purpose/Change: Initial script development

    Version:        0.2
    Author:         Andrii Romanenko
    Change Date:    02.01.2024
    Purpose/Change: Purpose/Change: Reorganize Function. Add Workflow Time Measuring External Function: Get-CalculateWorkingTime.
                                                         Add ValidateSet $Algorithm in Input Parameters
                                                         Add Case Algorithm Command and Output
    Version:        0.3
    Author:         Andrii Romanenko
    Change Date:    08.01.2024
    Purpose/Change: Purpose/Change: Reorganize Function. Rename function name to Check-UploadedFileHash and some variables.

.EXAMPLE

    $Parameters = @{
        Target    = $ESXiHost
        Datastore = $ISODatastore
        Folder    = "ISO\"
        File      = "en_windows_8_1_x64_dvd_2707217.iso"
        Algorithm = "SHA256"
        Hash      = "23DCCB255FA73CE6E93B12FEFEEFB7204C1681B9A343B51126D3D79F3A34BCD3"
    }
    Check-UploadedFileHash @Parameters

    $Parameters = @{
        Target    = $ESXiHost
        Datastore = $ISODatastore
        Folder    = "ISO\"
        File      = "en_windows_8_1_x64_dvd_2707217.iso"
        Algorithm = "MD5"
        Hash      = "f104b78019e86e74b149ae5e510f7be9"
    }
    Check-UploadedFileHash @Parameters

    $Parameters = @{
        Target    = $ESXiHost
        Datastore = $ISODatastore
        Folder    = "ISO\"
        File      = "en_windows_8_1_x64_dvd_2707217.iso"
        Algorithm = "SHA1"
        Hash      = "bc2f7ff5c91c9f0f8676e39e703085c65072139b"
    }
    Check-UploadedFileHash @Parameters

    $Parameters = @{
        Target    = $ESXiHost
        Datastore = $ISODatastore
        Folder    = "ISO\"
        File      = "en_windows_8_1_x64_dvd_2707217.iso"
        Algorithm = "SHA512"
        Hash      = "25446f98ea6cf35e95ecb0cb3ff9584e67c252d78ca0ac98f08e97d9aa62ddf537ea9c55f6e730abfa09b5759c16d4d2a6ad64ff356a62db914495f203b92807"
    }
    Check-UploadedFileHash @Parameters
#>

param ( 
    [Parameter(Mandatory)][string]$Target,
    [Parameter(Mandatory)][string]$File,
    [Parameter(Mandatory)][string]$Datastore,
    [Parameter(Mandatory)][string]$Folder,
    [Parameter(Mandatory)][ValidateSet('SHA1','SHA256','SHA512','MD5')][string]$Algorithm,
    [Parameter(Mandatory)][string]$Hash
)

# Get start time of the Check File Hash operation
$StartTime = Get-Date           
$Message = "Begin Check Hash: "  + $Image + " on Datastore: " + $Datastore + " on Target:" + $Target + "."
Write-Host -ForegroundColor Green $Message

# Check if SSH service on ESXI is running
$SSHServiceStatus = Get-VMHost | Get-VMHostService | Where { $_.Key -eq "TSM-SSH" }
If ($SSHServiceStatus.Running -eq "True")
{
$Message = "SSH Service is running. Nothing To Do."
Write-Host -ForegroundColor Green $Message
}
Else
{
$Message = "SSH Service is NOT running. Starting Service"
Write-Host -ForegroundColor Red $Message
Get-VMHost | Get-VMHostService | Where { $_.Key -eq "TSM-SSH" } | Start-VMHostService
}

# Open SSH session
$Message = "Open SSH Session to host: " + $Target + "."
Write-Host -ForegroundColor Green $Message
$SSHSession = New-SSHSession -ComputerName $Target –AcceptKey -Credential $Script:ESXISessionCredentials

# Check File Hash
$Message = "Begin Calculate Hash of file: " + $File + " on Datastore: " + $Datastore + "." 
Write-Host -ForegroundColor Green $Message

# Get Datasore ID
$DataStoreID = (Get-VMHost | Get-Datastore -Name $Datastore)
$DataStoreID = $DataStoreID.ID.Substring(10)

# Case AlgoritmCommand
Switch ($Algorithm) {
    "SHA1" { $AlgorithmCommand = "sha1sum"}
    "SHA256" { $AlgorithmCommand = "sha256sum"}
    "SHA512" { $AlgorithmCommand = "sha512sum"}
    "MD5" { $AlgorithmCommand = "md5sum"}
}

$SSHCommand = $AlgorithmCommand
$SSHCommand += ' /vmfs/volumes/'
$SSHCommand += $DataStoreID
$SSHCommand += '/'
$SSHCommand += $Folder.Replace("\", "/")
$SSHCommand += $File

$Result = Invoke-SSHCommand -SSHSession $SSHSession -Command $SSHCommand
#Write-Host $Result.Output

# Case Algoritm Output
Switch ($Algorithm) {
    "SHA1" { $HashResult = $Result.Output.Substring(0,40)}
    "SHA256" { $HashResult = $Result.Output.Substring(0,64)}
    "SHA512" { $HashResult = $Result.Output.Substring(0,128)}
    "MD5" { $HashResult = $Result.Output.Substring(0,32)}
}

$Message = "End Calculate Hash of file: " + $File + " on Datastore: " + $Datastore + "." 
Write-Host -ForegroundColor Green $Message

# Check Result
$Message = "Begin Check Hash of file: " + $File + "." 
Write-Host -ForegroundColor Green $Message

$Result=$HashResult.ToUpper().Equals($Hash.ToUpper())

If ($Result -eq "True")
{
$Message = "Hash Valid"
Write-Host -ForegroundColor Green $Message
}
Else
{
$Message = "Hash Not Valid"
Write-Host -ForegroundColor Red $Message
}
$Message = "End Check Hash of file: " + $File + "." 
Write-Host -ForegroundColor Green $Message

# Remove SSH Session
$Message = "Close SSH Session to host: " + $Target + "."
Write-Host -ForegroundColor Green $Message
Remove-SSHSession $SSHSession | Out-Null

# Get end time of the operation
$EndTime = Get-Date

# Calculate Elapsed Time of the operation
Get-CalculateWorkingTime -StartTime $StartTime -EndTime $EndTime
}

The function accepts the following mandatory parameters as input in the form of the @Parameters variable:

  • Target – Name or IP Address of the VMware ESXi;
  • File – Checked File Name;
  • Datastore – Name of ESXi Datastore;
  • Folder – Name of ESXi Datastore Folder;
  • Algorithm – Algorithm for calculate Hash;
  • Hash – Reference File Hash.

At the beginning of work, the start time is fixed in the form of the $StartTime variable.

The function will use the Posh-SSH Powershell module for its work to connect to the ESXi hypervisor and execute commands in the SSH environment. Therefore, the next step is to check whether this service is running on the hypervisor side, and if not, to start it.

This action is performed by standard PowerCLI cmdlets Get-VMHost, Get-VMHostService, Start-VMHostService.

Next, open an SSH session to the ESXi host New-SSHSession. This cmdlet is already from the Posh-SSH module.

For the algorithm to calculate the hash of the file, you will need to specify the path to the location of the file on the ESXi datastore. To do this, you should get a datastore identifier:

$DataStoreID = (Get-VMHost | Get-Datastore -Name $Datastore)

$DataStoreID = $DataStoreID.ID.Substring(10)

Different algorithms can be used to calculate the hash of a file. Their list is limited to the input variable $Algorithm and contains the following values: ‘SHA1′,’SHA256′,’SHA512′,’MD5’.

Depending on the value of the variable, the appropriate command will be used: sha1sum, sha256sum, sha512sum, md5sum. The Switch ($Algorithm) Powershell structure helps in this.

The $SSHCommand variable forms a command that should be sent to the SSH session. The result of the SSH Command goes into the $Result variable.

Depending on the hash calculation algorithm, the variable will contain a text fragment of different lengths. Therefore, depending on the $Algorithm variable, the required number of characters will be allocated. What will correspond to the calculated hash: sha1sumSubstring(0.40), sha256sumSubstring(0.64), sha512sumSubstring(0,128), md5sumSubstring(0,32).

Finally, the calculated hash is compared with the reference value from the $Hash variable. The result is displayed as Hash Valid or Hash Not Valid in green and red, respectively.

At the end of the work, we delete the SSH Session and calculate the duration of work with the Get-CalculateWorkingTime function, which I talked about in the previous post.

The result of the function is shown in the following figure:

Figure 1. The result of the execution of the Check-UploadedFileHash Powershell function

Brief Summary


So, in today’s post, I’ve shared with you some code snippets that demonstrate the strategy and practice of Operations as Code.

I note that you can use this code at your discretion, adding there, for example, verification codes and handling of exceptional situations, etc.

Also, don’t forget that the function requires the presence of the VMware PowerCLI and Posh-SSH.

That’s all for today. Follow the next publications of this direction.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Code, Programming, Technology, Virtualization, VMware | Tagged , , , , , , , , , , , , | Leave a comment

VMware Training. Year 2023. Part 17. Introduction. Authorized Training: Virtual Cloud Network: VMware vRealize Network Insight. Brief Summary.

Introduction


Hello to all readers of my blog!

In the previous article of the series “VMware Training. Year 2023″ we considered a list of training programs in the direction of Virtual Cloud Network: VMware SD-WAN.

Today we will talk about the main training programs in the field Virtual Cloud Network: vRealize Network Insight.

vRealize Network Insight


vRealize Network Insight is a network monitoring tool that helps you build an optimized, highly available and secure network infrastructure across your cloud environments including NSX, VMware SD-WAN, vSphere, VMware Cloud on AWS and Kubernetes deployments.

Key current VMware vRealize Network Insight technology training programs are:

● VMware vRealize Network Insight: Install, Configure, Manage [V6.1]

  • Duration: 2 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience: Network professionals and who design, build, operate, manage, and troubleshoot software-defined networking and security, and application owners who need visibility across multi-cloud environments.
  • Prerequisites: Students taking this course should have general networking concepts including TCP/IP service and protocols, security knowledge and familiar with NSX architecture.
    • Before taking this course, students are recommended to take the following courses or have equivalent knowledge and experience:
      • VMware NSX-T Data Center: Install, Configure, Manage.

This two-day, hands-on course gives you the skills to deploy and use VMware vRealize Network Insight to ensure an optimized, highly available, and secure infrastructure for your applications. You will learn the features, components, architecture, and benefits of vRealize Network Insight and how to use it to simplify daily operation and troubleshooting tasks.

WARNING! This course was removed from the catalog, and replaced by the following course: VMware Aria Operations for Networks: Install, Configure, Manage.

The courses of the VMware Aria direction will be considered in one of the following publications of this cycle.

Brief Summary


In this article, we got acquainted with the main training programs in the field of Virtual Cloud Network: VMware vRealize Network Insight.

In the next publication of the cycle “VMware Training. Year 2023″ we will talk about training programs in the field of Virtual Cloud Network: VMware HCX.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Education, Monitoring, Network, Technology, Training, Virtualization, VMware | Tagged , , , , , , , , , , | Leave a comment

Anything as Code: Upload File to ESXi Datasore Introduction. Function Upload-FileToDatastore. Get-CalculateWorkingTime. Brief Summary.

Introduction


Hello to all readers of the SDDC and Architecture, Solution, Implementation and Operations as Code blog.

Today we will talk about such a conceptual approach as Operations as Code, which is an integral part of the Anything as Code: strategy. I, as an Architect and Engineer in the field of cloud technologies, have been trying to adhere to this strategy as much as possible for the last ten years.

Today I want to share with you my small developments, which fit nicely into the Operation as Code approach.

Probably, we all constantly face the situation when we need to upload some file to the VMware Virtual Infrastructure Datastore, for example, the installation image of the operating system in order to mount it to the virtual machine.

I wrote a small Powershell function that performs the task of uploading a file to the ESXi datastore. Functions are passed to the input the necessary parameters in the form of a variable, changing which you can also use a code reuse strategy.

Upload-FileToDatastore


So let’s look at the code for the Upload-FileToDatastore function:

Function Upload-FileToDatastore {

<#
.SYNOPSIS
    Upload file to ESXi datastore.

.DESCRIPTION
    Silent deploy the specified file to ESXi datastore.

.PARAMETER Target
    Name or IP Address of the VMware ESXi.

.PARAMETER Path
    Path to source file.

.PARAMETER Source
    Name of source file.

.PARAMETER Datastore
    Name of destination ESXi Datastore.

.PARAMETER Folder
    Name of destination ESXi Datastore Folder.

.NOTES
    Version:        0.1
    Author:         Andrii Romanenko
    Website:        blogs.airra.net
    Creation Date:  12.05.2022
    Purpose/Change: Initial script development

    Version:        0.2
    Author:         Andrii Romanenko
    Change Date:    28.09.2022
    Purpose/Change: Add Work Time Measuring.

    Version:        0.3
    Author:         Andrii Romanenko
    Change Date:    30.12.2023
    Purpose/Change: Reorganize Function. Add Workflow Time Measuring External Function: Get-CalculateWorkingTime.

.EXAMPLE

    $Parameters = @{
        Target    = $ESXiHost
        Path      = "c:\!\"
        Source    = "en_windows_server_2019_x64_dvd_4cb967d8.iso"
        Datastore = $ISODatastore
        Folder    = "\ISO"
    }
    Upload-FileToDatastore @Parameters
#>

param ( 
    [Parameter(Mandatory)][string]$Target,
    [Parameter(Mandatory)][string]$Path,
    [Parameter(Mandatory)][string]$Source,
    [Parameter(Mandatory)][string]$Datastore,
    [Parameter(Mandatory)][string]$Folder 
)

# Get start time of the Upload ISO operation
$StartTime = Get-Date           
$Message = "Begin Upload: "  + $Source + " to Datastore: " + $Datastore + " on Target:" + $Target + "."
Write-Host -ForegroundColor Green $Message

# Upload ISO
$ds = Get-VMHost -Name $Target | Get-Datastore $Datastore
New-PSDrive -Location $ds -Name DS -PSProvider VimDatastore -Root "\" > $null
Copy-DatastoreItem -Item $Path$Source -Destination "DS:/$($Folder)"
Remove-PSDrive -Name DS -Confirm:$false

Write-Host -ForegroundColor Green "Upload Finished!"

# Get end time of the Upload ISO operation
$EndTime = Get-Date

# Calculate Elapsed Time of the operation
Get-CalculateWorkingTime -StartTime $StartTime -EndTime $EndTime
}

The function accepts the following mandatory parameters as input in the form of the @Parameters variable:

  • Target – Name or IP Address of the VMware ESXi;
  • Path – Path to source file;
  • Source – Name of source file;
  • Datastore – Name of destination ESXi Datastore;
  • Folder – Name of destination ESXi Datastore Folder.

At the beginning of work, the start time is fixed in the form of the $StartTime variable.

Next, the Datastore parameters of the ESXi Host are entered into the $ds variable.

To access the Datastore for the copy operation, the standard New-PSDrive Powershell commandlet is used. The copy operation is performed by the Copy-DatastoreItem command from VMware PowerCLI.

At the end of the operation, the PSDdrive object is deleted and the copying $EndTime is fixed.

The calculation of the duration of the copying operation is carried out by calling the external function Get-CalculateWorkingTime, which receives the parameters of the start and end of the operation.

The result of the function is shown in the following figure:

Figure 1. The result of the execution of the Upload-FileToDatastore Powershell function.

Get-CalculateWorkingTime


The code for the Get-CalculateWorkingTime function is below.

Function Get-CalculateWorkingTime {

<#
.SYNOPSIS
    Calculate working time of workflow.

.DESCRIPTION
    Calculate working time of workflow.

.PARAMETER StartTime
    Begin Time of Workflow.

.PARAMETER EndTime
    End Time of Workflow.

.NOTES
    Version:        0.1
    Author:         Andrii Romanenko
    Website:        blogs.airra.net
    Creation Date:  22.03.2023
    Purpose/Change: Initial script development

    Version:        0.2
    Author:         Andrii Romanenko
    Website:        blogs.airra.net
    Creation Date:  14.08.2023
    Purpose/Change: Add time measuring format in hours.

.EXAMPLE
    
    Get-CalculateWorkingTime -StartTime $StartTime -EndTime $EndTime 

#>

param ( 
    [Parameter(Mandatory)][datetime]$StartTime,
    [Parameter(Mandatory)][datetime]$EndTime 
)

# Calculate Elapsed Time of the workflow operation
$ElapsedTime = $EndTime-$StartTime
$ElapsedTime = '{0:hh} h. {0:mm} min. {0:ss} sec.' -f $ElapsedTime 
Write-Host 'Total Operation Duration:'  $ElapsedTime -ForegroundColor Green 
}

Brief Summary


So, in today’s post, I’ve shared with you some code snippets that demonstrate the strategy and practice of Operations as Code.

I note that you can use this code at your discretion, adding there, for example, verification codes and handling of exceptional situations, such as whether there is a connection to the ESXi host or a file with the same name is present, etc.

Also, don’t forget that the function requires the presence of the VMware PowerCLI.

That’s all for today. But in the next publication, I will tell about the function that will help check the already copied file on the datastore for the checksum.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Code, Programming, Technology, Virtualization, VMware | Tagged , , , , , , , , , , | Leave a comment