VMware Cloud Community
jasonrobinson
Enthusiast
Enthusiast
Jump to solution

Remote Console URL

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
Reply
0 Kudos
35 Replies
AS80
Contributor
Contributor
Jump to solution

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

Thanks

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
AS80
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
AS80
Contributor
Contributor
Jump to solution

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

Thanks

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
vAjit
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
AS80
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
vAjit
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos
vAjit
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
AS80
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
AS80
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
AS80
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

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".

Reply
0 Kudos
EdG15
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos
AS80
Contributor
Contributor
Jump to solution

Thanks a Ton

Reply
0 Kudos
EdG15
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos