jasonrobinson
Enthusiast
Enthusiast

Remote Console URL

Jump to solution

Guys,

I need to generate the remote console url for all the vms in a given VC and export them to a txt file. From looking over the url I can see that VC encodes the vm-ID with base64. I dont see any cmdlet that will allow me to convert this string. Does anyone have any suggestions?

Thanks,

Jason

Jason @jrob24
0 Kudos
35 Replies
AS80
Contributor
Contributor

Anything you can think off.. I really need these URL's I have over 4000 VM's ..

Thanks

0 Kudos
LucD
Leadership
Leadership

Can you eventually try to run through the script line-by-line with the PowerGui debugger ?

That would allow you to check the variables before and after each line.

I looked at the script you attached multiple times and ran it in my test environment and the URLs were created correctly.

As a side-remark, did you generate an URL from the web interface ?

Do these come out correctly ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
AS80
Contributor
Contributor

Ok so here is what I did...

I generated the URL's from web page it worked fine so nothing look wrong from there

I ran the script line by line same output

I ran it Vcenter 2.5 and Vcenter 4.0 same results

I ran it against different Vcenter with different version same issue

Any thing you can think off

Thanks for helping me

0 Kudos
AS80
Contributor
Contributor

Do you think, I may be missing some thing on my client computer.. I have pretty much check every thing

Thanks

0 Kudos
LucD
Leadership
Leadership

I have to admin I'm at my wits end.

The script you attached rolls out correct URLs in all my environments.

Short of coming over and sitting at your station and using a debugger, I don't know what else I could advise you to do Smiley Sad


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
vAjit
Contributor
Contributor

I am experiencing the exact same issue with a perl script I got from another post (http://communities.vmware.com/message/891004)

0 Kudos
AS80
Contributor
Contributor

Did you run perl script from the Vcenter server or you ran it from a remote computer?

0 Kudos
vAjit
Contributor
Contributor

Ran it on my laptop which has VMware vSphere CLI installed, I am actually in a process of automating VM creation and supplying the VM URL to the user, most of the part has been completed, however I am stuck at generating the URL appropriately, the script I attached in my previous post scans a provided VC for all the VMs and returns back with their console URLs, I have asked the original script author for anything he can help us with.

0 Kudos
vAjit
Contributor
Contributor

Did it on VC server as well, result is the same Smiley Sad

0 Kudos
AS80
Contributor
Contributor

Luc,.. thanks for your help.. I have tried your script as well as this perl script results are exactly same .. do you think we may be missing some thing on the computer itself

0 Kudos
AS80
Contributor
Contributor

Luc,

The result for Power shell script and Perl script is same.. do you think we may be missing some thing on the desktop computer or on the VI server?

Thanks

0 Kudos
AS80
Contributor
Contributor

Hi, Can you help me with this.. I have been trying to get a dump pf URL's but seems like it never works for do you think I am missing some thing

VVB01

JUMP05CNC

https://VVB01/ui/vmDirect.do?view=d3NVcmw9aHR0cDovL2xvY2FsaG9zdC9zZGsmdm1JZD1WaXJ0dWFsTWFjaGluZXx2bS..._

VVB01

GGJCTESTVM

=_

Please read the thread

Thanks

0 Kudos
lamw
Community Manager
Community Manager

This script works:

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
EdG15
Contributor
Contributor

In my experience, the Luc's script works perfectly well in VMware 3.5 environment.

Than you Luc.

For vSphere it has to be mofified.

See attached script.

0 Kudos
AS80
Contributor
Contributor

Thanks a Ton

0 Kudos
EdG15
Contributor
Contributor

You're welcome.

As I said before, the thanks goes to Luc for developing the original script, I just modified it to work in vSpher.

BTW, looking at my script again, I see that unencrypted URL was not complete. Sorry.

There is a complete version.

0 Kudos