I'm not using Hyper-V

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Post Reply
bullitt773
Posts: 8
Joined: Tue Jul 02, 2019 6:02 pm

I'm not using Hyper-V

Post by bullitt773 » Tue Sep 03, 2019 9:49 am

I'm attempting to use the 'Get-VM' command, but it doesn't work as Powershell Studio is assuming that I"m using Hyper-V, when I'm using vSphere. All other vmware powercli commands see to be working.

User avatar
Alexander Riedel
Posts: 7017
Joined: Tue May 29, 2007 4:43 pm

Re: I'm not using Hyper-V

Post by Alexander Riedel » Tue Sep 03, 2019 10:24 am

Powershell Studio wouldn't assume anything. If you say "doesn't work" I am guessing that means you are getting a PowerShell error message.
If you could share that error message, it would probably help to determine the origin of the problem.
Alexander Riedel
SAPIEN Technologies, Inc.

bullitt773
Posts: 8
Joined: Tue Jul 02, 2019 6:02 pm

Re: I'm not using Hyper-V

Post by bullitt773 » Tue Sep 03, 2019 11:01 am

'GET-VM' is not recognized as the name of a cmdlet. Apparently Hyper-V and VMware share this command. From what I read, I needed to install the Hyper-V role, but once I did that, then none of them other PowerCli commands work, since it's assuming I'm running these commands off of a Hyper-V environment.

User avatar
Alexander Riedel
Posts: 7017
Joined: Tue May 29, 2007 4:43 pm

Re: I'm not using Hyper-V

Post by Alexander Riedel » Tue Sep 03, 2019 11:06 am

[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.

bullitt773
Posts: 8
Joined: Tue Jul 02, 2019 6:02 pm

Re: I'm not using Hyper-V

Post by bullitt773 » Tue Sep 03, 2019 11:17 am

2019-09-03_14-13-31.png
2019-09-03_14-13-31.png (58.42 KiB) Viewed 359 times

User avatar
Alexander Riedel
Posts: 7017
Joined: Tue May 29, 2007 4:43 pm

Re: I'm not using Hyper-V

Post by Alexander Riedel » Tue Sep 03, 2019 11:28 am

The help content is not an indication if a specific cmdlet is available on your machine or not.
You need to make sure you are importing the correct module, specially if you have name collisions with other modules.
You may have to use a module specific cmdlet name, see https://www.sapien.com/blog/2015/10/23/ ... let-names/
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
mxtrinidad
Site Admin
Posts: 328
Joined: Sun Mar 03, 2013 12:42 pm

Re: I'm not using Hyper-V

Post by mxtrinidad » Tue Sep 03, 2019 12:39 pm

Can you please provide the version of the PowerCLI you got installed? And, Can you confirmed is not installed on PowerShell Core version?

Thanks

User avatar
mxtrinidad
Site Admin
Posts: 328
Joined: Sun Mar 03, 2013 12:42 pm

Re: I'm not using Hyper-V

Post by mxtrinidad » Tue Sep 03, 2019 2:05 pm

Currently, if you need to have both Hyper-V and VMWare module installed, then you need to use the Qualified-Name to avoid cmdlets collisions.

If you need to work with VMWare only, go to the cache editor, unchecked "Hyper-V", checked "VMWare" modules, and build the cache. Then, restart the editor.

Look in the Object Browser, and make sure Hyper-V is not listed.

At this point, when you type the Get-VM cmdlet, it will be the VMWare command.
If you hover the mouse over the command, it will show the correct parameters.

About the Help panel information, we are currently investigating the issue.

Post Reply