Thor Logo dbatools

Measure-DbatoolsImport

View Source
Chrissy LeMaire (@cl), netnerds.net
Windows, Linux, macOS

Synopsis

Measures and displays detailed timing metrics for dbatools module import operations

Description

Returns performance data collected during the dbatools module import process, showing the duration of each import step. This function helps troubleshoot slow module loading times by identifying which components take the longest to initialize. The timing data includes loading the dbatools library, type aliases, internal commands, external commands, and other initialization steps. Only displays steps that took measurable time (greater than 00:00:00) to complete.

Syntax

Measure-DbatoolsImport
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Measure-DbatoolsImport

Displays the import load times of the dbatools PowerShell module

Example: 2
PS C:\> Import-Module dbatools
PS C:\> Measure-DbatoolsImport

Displays the import load times of the dbatools PowerShell module

Outputs

PSCustomObject

Returns one object per dbatools module initialization step that took measurable time to complete. The timing data includes steps for loading the dbatools library, type aliases, internal commands, external commands, and other initialization operations.

Properties:

  • Name: Name of the initialization step (e.g., “Importing Type Aliases”, “Loading Internal Commands”)
  • Duration: TimeSpan representing how long the step took to complete; only steps with Duration greater than 00:00:00 are returned