When creating an encrypted VM, VMware Workstation gives you the option to remember the password. It does this by storing the password in the Windows Credential Manager.
VMware does not provide a way to retrieve this stored password, but it can be accessed via the Win32 CredReadW API function.
There are a number of PowerShell projects including PowerShell Credential Manager which provide access to this API, but in testing I found they were unable to correctly display the VMware password.
This PowerShell example has been tested using Windows PowerShell (v5.1) and PowerShell (v7) using VMwa