Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to distinguish use of cmdlet versus alias

$
0
0

It appears that Microsoft did not perform a very clean vetting of verb-nouns within its own products.  The Hyper-V folks have a set of cmdlets that are of the form verb-VMxxxx.  It seems like the System Center Virtual Machine Manager folks created aliases of the form verb-VMxxxx.  So, if I am on a workstation (which I use to remotely manage multiple systems) and want to issue the simple Hyper-V command Get-VM -Name "VM" -ComputerName "Host", it fails because the SCVMM alias for Get-VM (alias for Get-SCVirtualMachine) takes precedence.

How does one enforce the use of a cmdlet versus an alias?

Thanks for the assistance.

On a different thought, I would think that Microsoft would have a vetting process to prevent this sort of thing from happening at least within its own products.  I can understand it possibly happening with third party modules getting added in.


. : | : . : | : . tim


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>