VMware Cloud Community
rajkumar8218
Contributor
Contributor

unable to use command GPM get-vm

Hi All,

I have learned this command from one of the tutorial. where it displays the parameter of the vm. But when i try to type this command i'm unable to execute it..it is not working for me.

2. When i connect to virtual center by using my power user account using power CLI 4, it showing as administrator connected. what could be  the reason.

3. even after connecting to my virtual center by using powerCLI4, when try the command get-VMhostAccount. Its prompting me an error. It is not displaying the users account from Virtual center.

Please help me with this three questions. As im in the power CLI 4 learning period, these answers will be more helpful to me.

Thank u in advance.

Raj Kumar

Regards, Raj Kumar
0 Kudos
5 Replies
LucD
Leadership
Leadership

I suspect you are referring to Hal's Get-Parameter function.


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

0 Kudos
rajkumar8218
Contributor
Contributor

Hi thankyou for ur help,

Yes, Im following hal's powershell info. I have downloaded the get-parameter PS1 script. I will try it out.

Could you advise me on this..When i connect to virtual center by using active directory user account using power CLI 4, it showing as administrator connected.

I tried both by connecting through Admin account also through a normal account. But it showing as a administrator connected

what could be the reason? Advise please

Regards, Raj Kumar
0 Kudos
LucD
Leadership
Leadership

I assume you're doing a Connect-VIServer ?

Where do you see the "administrator connected" ? Under the User property ?

Perhaps a screenshot could make it clear.


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

0 Kudos
rajkumar8218
Contributor
Contributor

Hi,

I have downloaded the get-parameter script from poshcode.org/462, in my powershell, I type the command set-executionpolicy unrestricted

and typed the path of the file. But it is still not getting executed. find my screenshot and advise the same.

Regards, Raj Kumar
0 Kudos
LucD
Leadership
Leadership

How to run a script from a file is documented extensively in the Windows PowerShell Owner's Manual.

Scripts you download from the Internet are by default blocked (it's a security measure).

See my VIProperties in a Module post on how to unblock such a downloaded file.

Btw I think it's safer to use RemoteSigned instead of Unrestricted for the security policy.


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

0 Kudos