Poweshell-Commands


  • Get-Command
  • Measure-Command
  • Trace-Command

    Example

    NAME Get-Command SYNOPSIS Gets basic information about cmdlets and other elements of Windows PowerShell commands. SYNTAX Get-Command [[-Name] ] [-CommandType {Alias | Function | Filter | Cmdlet | ExternalScript | Application | Script | All}] [[-ArgumentList] ] [-Module ] [-Syntax] [-TotalCount ] [ ] Get-Command [-Noun ] [-Verb ] [[-ArgumentList] ] [-Module ] [-Syntax] [-Tot alCount ] [] DESCRIPTION The Get-Command cmdlet gets basic information about cmdlets and other elements of Windows PowerShell commands in th e session, such as aliases, functions, filters, scripts, and applications. Get-Command gets its data directly from the code of a cmdlet, function, script, or alias, unlike Get-Help, which ge ts its information from help topic files. Without parameters, "Get-Command" gets all of the cmdlets and functions in the current session. "Get-Command *" get s all Windows PowerShell elements and all of the non-Windows-PowerShell files in the Path environment variable ($en v:path). It groups the files in the "Application" command type. You can use the Module parameter of Get-Command to find the commands that were added to the session by adding a Win dows PowerShell snap-in or importing a module. RELATED LINKS Online version: http://go.microsoft.com/fwlink/?LinkID=113309 about_Command_Precedence Get-Help Get-PSDrive Get-Member Import-PSSession Export-PSSession REMARKS To see the examples, type: "get-help Get-Command -examples". For more information, type: "get-help Get-Command -detailed". For technical information, type: "get-help Get-Command -full". --------------------

    NAME Measure-Command SYNOPSIS Measures the time it takes to run script blocks and cmdlets. SYNTAX Measure-Command [-Expression] [-InputObject ] [] DESCRIPTION The Measure-Command cmdlet runs a script block or cmdlet internally, times the execution of the operation, and retu rns the execution time. RELATED LINKS Online version: http://go.microsoft.com/fwlink/?LinkID=113348 Trace-Command Invoke-Command REMARKS To see the examples, type: "get-help Measure-Command -examples". For more information, type: "get-help Measure-Command -detailed". For technical information, type: "get-help Measure-Command -full". ------------------------------------

    NAME Trace-Command SYNOPSIS Configures and starts a trace of the specified expression or command. SYNTAX Trace-Command [-Command] [-ArgumentList ] [-Name] [[-Option] {None | Constructor | Di spose | Finalizer | Method | Property | Delegates | Events | Exception | Lock | Error | Errors | Warning | Verbose | WriteLine | Data | Scope | ExecutionFlow | Assert | All}] [-Debugger] [-FilePath ] [-Force] [-InputObject ] [-ListenerOption {None | LogicalOperationStack | DateTime | Timestamp | ProcessId | ThreadId | Callsta ck}] [-PSHost] [] Trace-Command [-Expression] [-Name] [[-Option] {None | Constructor | Dispose | Finalizer | Method | Property | Delegates | Events | Exception | Lock | Error | Errors | Warning | Verbose | WriteLine | Data | Scope | ExecutionFlow | Assert | All}] [-Debugger] [-FilePath ] [-Force] [-InputObject ] [-List enerOption {None | LogicalOperationStack | DateTime | Timestamp | ProcessId | ThreadId | Callstack}] [-PSHost] [] DESCRIPTION The Trace-Command cmdlet configures and starts a trace of the specified expression or command. It works like Set-Tr aceSource, except that it applies only to the specified command. RELATED LINKS Online version: http://go.microsoft.com/fwlink/?LinkID=113419 Get-TraceSource Set-TraceSource REMARKS To see the examples, type: "get-help Trace-Command -examples". For more information, type: "get-help Trace-Command -detailed". For technical information, type: "get-help Trace-Command -full".

    Copy and Try it