I'm not using Hyper-V

Ask your 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.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
bullitt773
Posts: 12
Last visit: Wed Mar 06, 2024 5:29 am

I'm not using Hyper-V

Post by bullitt773 »

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: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: I'm not using Hyper-V

Post by Alexander Riedel »

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: 12
Last visit: Wed Mar 06, 2024 5:29 am

Re: I'm not using Hyper-V

Post by bullitt773 »

'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: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: I'm not using Hyper-V

Post by Alexander Riedel »

[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.
bullitt773
Posts: 12
Last visit: Wed Mar 06, 2024 5:29 am

Re: I'm not using Hyper-V

Post by bullitt773 »

2019-09-03_14-13-31.png
2019-09-03_14-13-31.png (58.42 KiB) Viewed 4221 times
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: I'm not using Hyper-V

Post by Alexander Riedel »

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
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: I'm not using Hyper-V

Post by mxtrinidad »

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
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: I'm not using Hyper-V

Post by mxtrinidad »

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.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked