WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / PowerShell community module for Application Transformer for VMware Tanzu

PowerShell community module for Application Transformer for VMware Tanzu

02.03.2022 by William Lam // Leave a Comment

In the previous blog post, we explored the Application Transformer for VMware Tanzu REST API and how it can be used for automation and more advanced workflows. To simplify the consumption of the App Transformer REST API and how I started to explore and learn about the APIs, I created a PowerShell module for App Transformer that implements a number of the App Transformer REST API that can easily be consumed using the following functions:

  • Connect-AppTransformer
  • Get-AppTransformerApplication
  • Get-AppTransformerComponent
  • Get-AppTransformerComponentSignature
  • Get-AppTransformerCredential
  • Get-AppTransformerNetworkInsight
  • Get-AppTransformerVCenter
  • Get-AppTransformerVM
  • New-AppTransformerCredential
  • New-AppTransformerCredentialAssociation
  • New-AppTransformerNetworkInsightCloud
  • New-AppTransformerVCenter
  • Remove-AppTransformerCredential
  • Start-AppTransformerIntrospection


🥳 To help celebrate the official GA of Application Transformer for VMware Tanzu today, I have just published my PowerShell Community Module for App Transformer into the PowerShell Gallery!

Installation

The App Transformer Community PowerShell module can be installed directly from the PowerShell gallery with the following command:

Install-Module VMware.Community.AppTransformer

Session

Before you can use any of the App Transformer functions, you will need to first login using Connect-AppTransformer function which accepts FQDN/IP Address of your App Transformer instance and the username and password as demonstrated in the example below.

$AppTransformerUsername = "FILL_ME_IN"
$AppTransformerPassword = "FILL_ME_IN"

[Security.SecureString]$SecurePassword = ConvertTo-SecureString $AppTransformerPassword -AsPlainText

Connect-AppTransformer -Server at.vmware.corp -Username $AppTransformerUsername -Password $SecurePassword

Credentials

Before you can register a vCenter Server or perform an introspection operation against your VMs, you will first need to create a few credentials by using the New-AppTransformerCredential function which accepts credential alias (short name), username and password demonstrated in the example below.

$vmcVCUserAlias = "*protected email*"
$vmcVCUsername = "*protected email*"
$vmcVCPassword = "FILL_ME_IN"

[Security.SecureString]$SecurePassword1 = ConvertTo-SecureString $vmcVCPassword -AsPlainText
New-AppTransformerCredential -Alias $vmcVCUserAlias -Username $vmcVCUsername -Password $SecurePassword1


We can also retrieve existing credentials by using the New-AppTransformerCredential as shown in screenshot below. The function also supports filtering by credential alias name if you specify the -Name parameter. If you need to remove a credential, you can use Remove-AppTransformerCredential function which accepts the credential alias name.

Below is an example of adding several different credentials which will then be referenced in other functions.

vCenter Server

Once you have added the credentials for your desired vCenter Server, we can now register it by using the New-AppTransformerVCenter function which accepts the FQDN/IP Address of the vCenter Server, alias name for vCenter Server and the credential alias name as demonstrated in example below.


We can list our registered vCenter Server by using the Get-AppTransformerVCenter function as show in example below.

vRealize Network Insight Cloud

Once a vCenter Server has been registred with App Transformer, you can then register the respective vRealize Network Insight or vRealize Network Insight Cloud (vRNIC) instance, if you have that deployed. The module currently only includes support for registering vRNIC instance using the New-AppTransformerNetworkInsightCloud function which accepts CSP token with a minimum of the Network Insight User role and the vCenter Server alias name that vRNIC instance is registred with as demonstrated in the example below.


We can list our registered vCenter Server by using the Get-AppTransformerNetworkInsightCloud function as show in the screenshot below.

Virtual Machines

Once you have successfully registred your vCenter Server, you can perform a "shallow" scan where App Transformer will see the list of available VMs that can then be introspected (once guest credentials have been associated) and also go through topology discovery (assuming you have vRNIC deployed and running). To see the list of  all VMs, you can use the Get-AppTransformerVM function and you can also filter by specifying the -Name parameter.


Assuming you have already created or bulk import guestOS credentials, we now need to associate the specific credentials with the respective VM(s). To do this, you can  use the New-AppTransformerCredentialAssociation function which accepts credential alias name and list of VM(s) to be associated with that credential. Below is an example associating two different credentials with a list of VM(s), which becomes extremely useful for large environments.

$SimpleVMCredentialName = "root-simple"
$SimpleVMs = ("tomcat-vm","tomcat_centos7")

$ComplexVMCredentialName = "root-complex"
$ComplexVMs = ("JBoss-VM","MySql-DB","Tomcat-multi-instance","Weblogic-12C","websphere_centos7","app_db_vm","web_db_vm")

New-AppTransformerCredentialAssocation -CredentialName $SimpleVMCredentialName -VMNames $SimpleVMs

New-AppTransformerCredentialAssocation -CredentialName $ComplexVMCredentialName  -VMNames $ComplexVMs

Note: To determine if a VM has been associated with a credential, you can use the Get-AppTransformerVM function to check serviceAccount property.

Once a credential has been associated with a VM, we can now perform the Introspection operation by using the Start-AppTransformerIntrospection function which accepts the name of a VM to start the Component discovery.

Below is an example looping through our $SimpleVMs and $ComplexVMs list and performing the Introspection. A sleep is added as App Transformer will not process further Introspection if there are too many running, so you may want to batch the operation based on the size of your environment.

Components

To list all Components discovered by App Transformer, you can use the Get-AppTransformerComponent function, which also supports filtering based on the name of a Component by using the -Name parameter as demonstrated below.


Note: The underlining App Transformer REST API for retrieving Components supports a number of advanced filtering options, the function provided here is only a sample implementation and for more advanced options, you should consider enhancing the function based on your requirements.

Applications

To list all Applications discovered by App Transformer or that has been manually created, you can use the Get-AppTransformerApplication function, which also supports filtering based on the name of a Component by using the -Name parameter as demonstrated below. For automatic Application discovery, you will need data from vRealize Network Insight or vRealize Network Insight Cloud and run the topology discovery operation prior to listing the Applications.


Note: The underlining App Transformer REST API for retrieving Applications supports a number of advanced filtering options, the function provided here is only a sample implementation and for more advanced options, you should consider enhancing the function based on your requirements.

Component Signatures

App Transformer includes over 200+ out of the box component signatures and you can certainly add custom signatures to teach App Transformer about new or custom applications you have running in your environment. You can view all signatures by using the Get-AppTransformerComponentSignature function, which also supports filtering based on the name of a Component by using the -Name parameter as demonstrated below.

More from my site

  • Quick Tip - Listing vSphere Global Permissions using PowerShell
  • Updated Dashboard for VMware Community Homelabs using Dashimo
  • How to automate adding a license into vCenter Server with custom label? 
  • Getting Started with the Application Transformer for VMware Tanzu REST API
  • Automating the deployment of Application Transformer for VMware Tanzu

Categories // Automation, Cloud Native, PowerCLI, VMware Tanzu, vSphere Tags // Application Transformer, powershell

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...