How do I determine the module for a given cmdlet for direct calling from a function that overrides the cmdlet?
For example, how am I supposed to find out that Start-Transcript lives in Microsoft.Powershell.Host?
Get-Module Start-Transcript
doesn't yield anything
Update for answer below.
This is the output:
PS C:\Windows> Get-Command -type cmdlet start-transcript | fl * HelpUri : http://go.microsoft.com/fwlink/?LinkID=113408 DLL : C:\Windows\assembly\GAC_MSIL\Microsoft.PowerShell.ConsoleHost\1.0.0.0__31bf3856ad364e35\Microsoft .PowerShell.ConsoleHost.dll Verb : Start Noun : Transcript HelpFile : Microsoft.PowerShell.ConsoleHost.dll-Help.xml PSSnapIn : Microsoft.PowerShell.Host ImplementingType : Microsoft.PowerShell.Commands.StartTranscriptCommand Definition : Start-Transcript [[-Path] <String>] [-Append] [-Force] [-NoClobber] [-Verbose] [-Debug] [-ErrorAc tion <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningV ariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm] DefaultParameterSet : OutputType : {} Name : Start-Transcript CommandType : Cmdlet Visibility : Public ModuleName : Microsoft.PowerShell.Host <------------ HERE IT IS Module : Parameters : {[Path, System.Management.Automation.ParameterMetadata], [Append, System.Management.Automation.Pa rameterMetadata], [Force, System.Management.Automation.ParameterMetadata], [NoClobber, System.Man agement.Automation.ParameterMetadata]...} ParameterSets : {[[-Path] <String>] [-Append] [-Force] [-NoClobber] [-Verbose] [-Debug] [-ErrorAction <ActionPref erence>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String> ] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]}
A PowerShell module is a package containing PowerShell cmdlets, providers, functions, workflows, variables and aliases.
The Get-InstalledModule cmdlet gets PowerShell modules that are installed on a computer using PowerShellGet. To see all modules installed on the system, use the Get-Module -ListAvailable command.
Description. The Find-Module cmdlet finds modules in a repository that match the specified criteria. Find-Module returns a PSRepositoryItemInfo object for each module it finds. The objects can be sent down the pipeline to cmdlets such as Install-Module .
Use CommandType or its alias, Type. By default, Get-Command gets all cmdlets, functions, and aliases. The acceptable values for this parameter are: Alias : Gets the aliases of all PowerShell commands.
Use
Get-Command Start-Transcript | fl *
to find information about the command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With