上QQ阅读APP看书,第一时间看更新
There's more...
Even if you're an advanced PowerShell user, Get-Command can help you. Just have a look at the amount of data you can access for each command by using Format-List. We'll later learn about Get-Member as well:
# Discover more about a cmdlet with Format-List
Get-Command New-Item | Format-List -Property *
# Examine additional properties that might be helpful
$cmd = Get-Command New-Item
# Where does the cmdlet's help content come from?
$cmd.HelpUri
# Quickly jump to the location of a cmdlet's module
Set-Location -Path $cmd.Module.ModuleBase
# How many parameters does a cmdlet have including the common parameters?
$cmd.Parameters.Count
# Discovering the data of a parameter, in this case realizing that
# New-Item allows empty strings or $null to be passed to the Name parameter
$cmd.Parameters.Name
Look at the following screenshot of how the output looks: