Author | Friedrich Weinmann (@FredWeinmann) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out New-DbatoolsSupportPackage on GitHub.
Want to see the Bill Of Health for this command? Check out New-DbatoolsSupportPackage.
Creates a comprehensive diagnostic package for troubleshooting dbatools module issues and bugs.
This function creates an extensive diagnostic package specifically designed to help the dbatools team troubleshoot module-related issues, bugs, or unexpected behavior. When you encounter problems with dbatools commands or need to submit a bug report, this package provides all the environmental and runtime information needed for effective debugging.
The resulting compressed file contains comprehensive system and PowerShell environment details that are essential for reproducing and diagnosing issues. This saves you from manually collecting multiple pieces of information and ensures nothing important gets missed when reporting problems.
The package includes:
The output file is automatically created on your desktop (or home directory if desktop doesn't exist) as a timestamped ZIP archive. Always start a fresh PowerShell session and reproduce the minimal steps to trigger your issue before running this command - this keeps the diagnostic data focused and avoids including unrelated information or sensitive data from your session history.
New-DbatoolsSupportPackage
[[-Path] <String>]
[[-Variables] <String[]>]
[-PassThru]
[-EnableException]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PS C:\> New-DbatoolsSupportPackage
Creates a large support pack in order to help us troubleshoot stuff.
Specifies the directory where the support package ZIP file will be created. Defaults to your desktop, or home directory if desktop doesn't exist.
Use this when you need the diagnostic file saved to a specific location for easier access or compliance requirements.
Alias | |
Required | False |
Pipeline | false |
Default Value | "$($env:USERPROFILE)\Desktop" |
Specifies additional PowerShell variables to include in the diagnostic package by name. Only captures variables that exist in your current session.
Use this when specific variables contain connection strings, configuration settings, or data relevant to reproducing your issue.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Returns the FileInfo object for the created ZIP file instead of just displaying its location.
Use this when you need to programmatically work with the support package file, such as uploading it automatically or getting its size.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
If this switch is enabled, no actions are performed but informational messages will be displayed that explain what would happen if the command were to run.
Alias | wi |
Required | False |
Pipeline | false |
Default Value |
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
Alias | cf |
Required | False |
Pipeline | false |
Default Value |