< Back

Save-DbaDiagnosticQueryScript

Mon Jan 13, 2020 1:38 pm

NAME Save-DbaDiagnosticQueryScript



SYNOPSIS

Save-DbaDiagnosticQueryScript downloads the most recent version of all Glenn Berry DMV scripts





SYNTAX

Save-DbaDiagnosticQueryScript [[-Path] <System.IO.FileInfo>] [-EnableException <Switch>] [<CommonParameters>]





DESCRIPTION

The dbatools module will have the diagnostic queries pre-installed. Use this only to update to a more recent

version or specific versions.



This function is mainly used by Invoke-DbaDiagnosticQuery, but can also be used independently to download the

Glenn Berry DMV scripts.



Use this function to pre-download the scripts from a device with an Internet connection.



The function Invoke-DbaDiagnosticQuery will try to download these scripts automatically, but it obviously needs an

internet connection to do that.





PARAMETERS

-EnableException [<Switch>]

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.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Path [<System.IO.FileInfo>]

Specifies the path to the output



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Tags: Community, GlennBerry

Author: Andre Kamman (@AndreKamman), http://clouddba.io



Website: https://dbatools.io

Copyright: (c) 2018 by dbatools, licensed under MIT

License: MIT https://opensource.org/licenses/MIT



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Save-DbaDiagnosticQueryScript -Path c:\\temp



Downloads the most recent version of all Glenn Berry DMV scripts to the specified location.

If Path is not specified, the "My Documents" location will be used.



RELATED LINKS