PowerTip: Use Complete Name for PowerShell Cmdlet

Summary: Use the complete name for a Windows PowerShell cmdlet.

Hey, Scripting Guy! Question How can I ensure that I use the correct cmdlet in my Windows PowerShell session if I think
            there might be more than one with the same name?

Hey, Scripting Guy! Answer Use the complete name of the cmdlet—this includes the module name and the cmdlet name.
           Here is an example of using the standard Get-Process cmdlet:


Comments (1)

  1. tommymaynard says:

    I had an issue with this when I installed the Hyper-V feature in Windows 8.1. If you the same command type (alias, cmdlet, function, etc.) with the same name, then it will use the one that was loaded most recently. Take a look at my post about it here:
    http://tommymaynard.com/ql-cmdlets-of-the-same-name-vmware-hyper-v/. It also includes a function I wrote to help get around needing to use the complete name with Hyper-V and PowerCli.

Skip to main content