bin/dbatools-index.json

[
    {
        "CommandName": "Add-DbaCmsRegServer",
        "Description": "Adds registered servers to SQL Server Central Management Server (CMS). If you need more flexiblity, look into Import-DbaCmsRegServer which\naccepts multiple kinds of input and allows you to add reg servers from different CMSes.",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Add-DbaRegisteredServer",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Adds registered servers to SQL Server Central Management Server (CMS)",
        "Name": "Add-DbaCmsRegServer",
        "Links": "https://dbatools.io/Add-DbaCmsRegServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eAdd-DbaCmsRegServer -SqlInstance sql2008 -ServerName sql01\nCreates a registered server on sql2008\u0027s CMS which points to the SQL Server, sql01. When scrolling in CMS, the name \"sql01\" will be visible.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eAdd-DbaCmsRegServer -SqlInstance sql2008 -ServerName sql01 -Name \"The 2008 Clustered Instance\" -Description \"HR\u0027s Dedicated SharePoint instance\"\nCreates a registered server on sql2008\u0027s CMS which points to the SQL Server, sql01. When scrolling in CMS, \"The 2008 Clustered Instance\" will be visible.\r\nClearly this is hard to explain ;)\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eAdd-DbaCmsRegServer -SqlInstance sql2008 -ServerName sql01 -Group hr\\Seattle\nCreates a registered server on sql2008\u0027s CMS which points to the SQL Server, sql01. When scrolling in CMS, the name \"sql01\" will be visible within the Seattle group which is in the hr group.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sql2008 -Group hr\\Seattle | Add-DbaCmsRegServer -ServerName sql01111\nCreates a registered server on sql2008\u0027s CMS which points to the SQL Server, sql01. When scrolling in CMS, the name \"sql01\" will be visible within the Seattle group which is in the hr group.",
        "Syntax": "Add-DbaCmsRegServer [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-ServerName] \u003cString\u003e [[-Name] \u003cString\u003e] [[-Description] \u003cString\u003e] [[-Group] \u003cObject\u003e] [[-InputObject] \u003cServerGroup[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Add-DbaCmsRegServerGroup",
        "Description": "Adds registered server groups to SQL Server Central Management Server (CMS). If you need more flexibility, look into Import-DbaCmsRegServer which accepts multiple kinds of input and allows you to add reg servers and groups from different CMS.",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Add-DbaRegisteredServerGroup",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Adds registered server groups to SQL Server Central Management Server (CMS)",
        "Name": "Add-DbaCmsRegServerGroup",
        "Links": "https://dbatools.io/Add-DbaCmsRegServerGroup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eAdd-DbaCmsRegServerGroup -SqlInstance sql2012 -Name HR\nCreates a registered server group called HR, in the root of sql2012\u0027s CMS\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eAdd-DbaCmsRegServerGroup -SqlInstance sql2012, sql2014 -Name sub-folder -Group HR\nCreates a registered server group on sql2012 and sql2014 called sub-folder within the HR group\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sql2012, sql2014 -Group HR | Add-DbaCmsRegServerGroup -Name sub-folder\nCreates a registered server group on sql2012 and sql2014 called sub-folder within the HR group of each server",
        "Syntax": "Add-DbaCmsRegServerGroup [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-Name] \u003cString\u003e [[-Description] \u003cString\u003e] [[-Group] \u003cString\u003e] [[-InputObject] \u003cServerGroup[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Add-DbaComputerCertificate",
        "Description": "Adds a computer certificate from a local or remote computer.",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Adds a computer certificate - useful for older systems.",
        "Name": "Add-DbaComputerCertificate",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eAdd-DbaComputerCertificate -ComputerName Server1 -Path C:\\temp\\cert.cer\nAdds the local C:\\temp\\cert.cer to the remote server Server1 in LocalMachine\\My (Personal).\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eAdd-DbaComputerCertificate -Path C:\\temp\\cert.cer\nAdds the local C:\\temp\\cert.cer to the local computer\u0027s LocalMachine\\My (Personal) certificate store.",
        "Syntax": "Add-DbaComputerCertificate [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Password] \u003cSecureString\u003e] [[-Certificate] \u003cX509Certificate2[]\u003e] [[-Path] \u003cString\u003e] [[-Store] \u003cString\u003e] [[-Folder] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Add-DbaDbMirrorMonitor",
        "Description": "Creates a database mirroring monitor job that periodically updates the mirroring status for every mirrored database on the server instance.\n\nBasically executes sp_dbmmonitoraddmonitoring.",
        "Tags": [
                     "Mirror",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a database mirroring monitor job that periodically updates the mirroring status for every mirrored database on the server instance.",
        "Name": "Add-DbaDbMirrorMonitor",
        "Links": "https://dbatools.io/Add-DbaDbMirrorMonitor",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eAdd-DbaDbMirrorMonitor -SqlInstance sql2008, sql2012\nCreates a database mirroring monitor job that periodically updates the mirroring status for every mirrored database on sql2008 and sql2012.",
        "Syntax": "Add-DbaDbMirrorMonitor [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Add-DbaPfDataCollectorCounter",
        "Description": "Adds a Performance Data Collector Counter.",
        "Tags": "PerfMon",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Adds a Performance Data Collector Counter.",
        "Name": "Add-DbaPfDataCollectorCounter",
        "Links": "https://dbatools.io/Add-DbaPfDataCollectorCounter",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eAdd-DbaPfDataCollectorCounter -ComputerName sql2017 -CollectorSet \u0027System Correlation\u0027 -Collector DataCollector01 -Counter \u0027\\LogicalDisk(*)\\Avg. Disk Queue Length\u0027\nAdds the \u0027\\LogicalDisk(*)\\Avg. Disk Queue Length\u0027 counter within the DataCollector01 collector within the System Correlation collector set on sql2017.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollector | Out-GridView -PassThru | Add-DbaPfDataCollectorCounter -Counter \u0027\\LogicalDisk(*)\\Avg. Disk Queue Length\u0027 -Confirm\nAllows you to select which Data Collector you\u0027d like to add the counter \u0027\\LogicalDisk(*)\\Avg. Disk Queue Length\u0027 on localhost and prompts for confirmation.",
        "Syntax": "Add-DbaPfDataCollectorCounter [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-Collector] \u003cString[]\u003e] [-Counter] \u003cObject[]\u003e [[-InputObject] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Backup-DbaDatabase",
        "Description": "Performs a backup of a specified type of 1 or more databases on a single SQL Server Instance. These backups may be Full, Differential or Transaction log backups.",
        "Tags": [
                     "DisasterRecovery",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Backup one or more SQL Sever databases from a single SQL Server SqlInstance.",
        "Name": "Backup-DbaDatabase",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eBackup-DbaDatabase -SqlInstance Server1 -Database HR, Finance\nThis will perform a full database backup on the databases HR and Finance on SQL Server Instance Server1 to Server1 default backup directory.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eBackup-DbaDatabase -SqlInstance sql2016 -BackupDirectory C:\\temp -Database AdventureWorks2014 -Type Full\nBacks up AdventureWorks2014 to sql2016 C:\\temp folder.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eBackup-DbaDatabase -SqlInstance sql2016 -AzureBaseUrl https://dbatoolsaz.blob.core.windows.net/azbackups/ -AzureCredential dbatoolscred -Type Full -CreateFolder\nPerforms a full backup of all databases on the sql2016 instance to their own containers under the https://dbatoolsaz.blob.core.windows.net/azbackups/ container on Azure blog storage using the sql \r\ncredential \"dbatoolscred\" registered on the sql2016 instance.",
        "Syntax": "Backup-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-BackupDirectory \u003cString[]\u003e] [-BackupFileName \u003cString\u003e] [-CopyOnly] [-Type \u003cString\u003e] [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-IgnoreFileChecks] [-OutputScriptOnly] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nBackup-DbaDatabase -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-BackupDirectory \u003cString[]\u003e] [-BackupFileName \u003cString\u003e] [-CopyOnly] [-Type \u003cString\u003e] [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-IgnoreFileChecks] [-OutputScriptOnly] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nBackup-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-BackupDirectory \u003cString[]\u003e] [-BackupFileName \u003cString\u003e] [-CopyOnly] [-Type \u003cString\u003e] -InputObject \u003cObject[]\u003e [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-IgnoreFileChecks] [-OutputScriptOnly] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Backup-DbaDbCertificate",
        "Description": "Exports database certificates from SQL Server using SMO and outputs the .cer and .pvk files.",
        "Tags": [
                     "Migration",
                     "Certificate"
                 ],
        "Alias": "Backup-DbaDatabaseCertificate",
        "Author": "Jess Pomfret (@jpomfret)",
        "Synopsis": "Exports database certificates from SQL Server using SMO.",
        "Name": "Backup-DbaDbCertificate",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eBackup-DbaDbCertificate -SqlInstance Server1\nExports all the certificates on the specified SQL Server to the default data path for the instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$cred = Get-Credential sqladmin\nPS C:\\\u003e Backup-DbaDbCertificate -SqlInstance Server1 -SqlCredential $cred\nConnects using sqladmin credential and exports all the certificates on the specified SQL Server to the default data path for the instance.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eBackup-DbaDbCertificate -SqlInstance Server1 -Certificate Certificate1\nExports only the certificate named Certificate1 on the specified SQL Server to the default data path for the instance.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eBackup-DbaDbCertificate -SqlInstance Server1 -Database AdventureWorks\nExports only the certificates for AdventureWorks on the specified SQL Server to the default data path for the instance.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eBackup-DbaDbCertificate -SqlInstance Server1 -ExcludeDatabase AdventureWorks\nExports all certificates except those for AdventureWorks on the specified SQL Server to the default data path for the instance.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eBackup-DbaDbCertificate -SqlInstance Server1 -Path \\\\Server1\\Certificates -EncryptionPassword (ConvertTo-SecureString -force -AsPlainText GoodPass1234!!)\nExports all the certificates and private keys on the specified SQL Server.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$EncryptionPassword = ConvertTo-SecureString -AsPlainText \"GoodPass1234!!\" -force\nPS C:\\\u003e $DecryptionPassword = ConvertTo-SecureString -AsPlainText \"Password4567!!\" -force\r\nPS C:\\\u003e Backup-DbaDbCertificate -SqlInstance Server1 -EncryptionPassword $EncryptionPassword -DecryptionPassword $DecryptionPassword\nExports all the certificates on the specified SQL Server using the supplied DecryptionPassword, since an EncryptionPassword is specified private keys are also exported.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eBackup-DbaDbCertificate -SqlInstance Server1 -Path \\\\Server1\\Certificates\nExports all certificates on the specified SQL Server to the specified path.\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eBackup-DbaDbCertificate -SqlInstance Server1 -Suffix DbaTools\nExports all certificates on the specified SQL Server to the specified path, appends DbaTools to the end of the filenames.\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003eGet-DbaDbCertificate -SqlInstance sql2016 | Backup-DbaDbCertificate\nExports all certificates found on sql2016 to the default data directory.",
        "Syntax": "Backup-DbaDbCertificate [-SqlCredential \u003cPSCredential\u003e] [-EncryptionPassword \u003cSecureString\u003e] [-DecryptionPassword \u003cSecureString\u003e] [-Path \u003cFileInfo\u003e] [-Suffix \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nBackup-DbaDbCertificate -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Certificate \u003cObject[]\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-EncryptionPassword \u003cSecureString\u003e] [-DecryptionPassword \u003cSecureString\u003e] [-Path \u003cFileInfo\u003e] [-Suffix \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nBackup-DbaDbCertificate [-SqlCredential \u003cPSCredential\u003e] [-EncryptionPassword \u003cSecureString\u003e] [-DecryptionPassword \u003cSecureString\u003e] [-Path \u003cFileInfo\u003e] [-Suffix \u003cString\u003e] [-InputObject \u003cCertificate[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Backup-DbaDbMasterKey",
        "Description": "Backs up specified database master key.",
        "Tags": [
                     "Certificate",
                     "Database"
                 ],
        "Alias": "Backup-DbaDatabaseMasterKey",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Backs up specified database master key.",
        "Name": "Backup-DbaDbMasterKey",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eBackup-DbaDbMasterKey -SqlInstance server1\\sql2016\nComputerName : SERVER1\r\nInstanceName : SQL2016\r\nSqlInstance : SERVER1\\SQL2016\r\nDatabase : master\r\nFilename : E:\\MSSQL13.SQL2016\\MSSQL\\Backup\\server1$sql2016-master-20170614162311.key\r\nStatus : Success\nPrompts for export password, then logs into server1\\sql2016 with Windows credentials then backs up all database keys to the default backup directory.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eBackup-DbaDbMasterKey -SqlInstance Server1 -Database db1 -Path \\\\nas\\sqlbackups\\keys\nLogs into sql2016 with Windows credentials then backs up db1\u0027s keys to the \\\\nas\\sqlbackups\\keys directory.",
        "Syntax": "Backup-DbaDbMasterKey [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-ExcludeDatabase] \u003cString[]\u003e] [[-Password] \u003cSecureString\u003e] [[-Path] \u003cString\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Clear-DbaConnectionPool",
        "Description": "This command resets (or empties) the connection pool.\n\nIf there are connections in use at the time of the call, they are marked appropriately and will be discarded (instead of being returned to the pool) when Close() is called on them.\n\nRef: https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearallpools(v=vs.110).aspx",
        "Tags": "Connection",
        "Alias": "Clear-DbaSqlConnectionPool",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Resets (or empties) the connection pool.",
        "Name": "Clear-DbaConnectionPool",
        "Links": "https://dbatools.io/Clear-DbaConnectionPool",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eClear-DbaConnectionPool\nClears all local connection pools.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eClear-DbaConnectionPool -ComputerName workstation27\nClears all connection pools on workstation27.",
        "Syntax": "Clear-DbaConnectionPool [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Clear-DbaPlanCache",
        "Description": "Checks ad-hoc and prepared plan cache for each database, if over 100 MBs removes from the cache.\n\nThis command automates that process.\n\nReferences: https://www.sqlskills.com/blogs/kimberly/plan-cache-adhoc-workloads-and-clearing-the-single-use-plan-cache-bloat/",
        "Tags": "Memory",
        "Alias": "",
        "Author": "Tracy Boggiano, databasesuperhero.com",
        "Synopsis": "Removes ad-hoc and prepared plan caches is single use plans are over defined threshold.",
        "Name": "Clear-DbaPlanCache",
        "Links": "https://dbatools.io/Clear-DbaPlanCache",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eClear-DbaPlanCache -SqlInstance sql2017 -Threshold 200\nLogs into the SQL Server instance \"sql2017\" and removes plan caches if over 200 MB.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eClear-DbaPlanCache -SqlInstance sql2017 -SqlCredential sqladmin\nLogs into the SQL instance using the SQL Login \u0027sqladmin\u0027 and then Windows instance as \u0027ad\\sqldba\u0027\r\nand removes if Threshold over 100 MB.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaInstance -ComputerName localhost | Get-DbaPlanCache | Clear-DbaPlanCache -Threshold 200\nScans localhost for instances using the browser service, traverses all instances and gets the plan cache for each, clears them out if they are above 200 MB.",
        "Syntax": "Clear-DbaPlanCache [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Threshold] \u003cInt32\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Clear-DbaWaitStatistics",
        "Description": "Reset the aggregated statistics - basically just executes DBCC SQLPERF (N\u0027sys.dm_os_wait_stats\u0027, CLEAR)",
        "Tags": [
                     "WaitStatistic",
                     "Waits"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl)",
        "Synopsis": "Clears wait statistics",
        "Name": "Clear-DbaWaitStatistics",
        "Links": "https://dbatools.io/Clear-DbaWaitStatistics",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eClear-DbaWaitStatistics -SqlInstance sql2008, sqlserver2012\nAfter confirmation, clears wait stats on servers sql2008 and sqlserver2012\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eClear-DbaWaitStatistics -SqlInstance sql2008, sqlserver2012 -Confirm:$false\nClears wait stats on servers sql2008 and sqlserver2012, without prompting",
        "Syntax": "Clear-DbaWaitStatistics [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Connect-DbaInstance",
        "Description": "This command is robust because it initializes properties that do not cause enumeration by default. It also supports both Windows and SQL Server authentication methods, and detects which to use based upon the provided credentials.\n\nBy default, this command also sets the connection\u0027s ApplicationName property to \"dbatools PowerShell module - dbatools.io - custom connection\". If you\u0027re doing anything that requires profiling, you can look for this client name.\n\nAlternatively, you can pass in whichever client name you\u0027d like using the -ClientName parameter. There are a ton of other parameters for you to explore as well.\n\nSee https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx\nand https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.aspx,\nand https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx\n\nTo execute SQL commands, you can use $server.ConnectionContext.ExecuteReader($sql) or $server.Databases[\u0027master\u0027].ExecuteNonQuery($sql)",
        "Tags": [
                     "Connect",
                     "Connection"
                 ],
        "Alias": "Connect-DbaServer,Get-DbaInstance",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a robust SMO SQL Server object.",
        "Name": "Connect-DbaInstance",
        "Links": "https://dbatools.io/Connect-DbaInstance",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eConnect-DbaInstance -SqlInstance sql2014\nCreates an SMO Server object that connects using Windows Authentication\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$wincred = Get-Credential ad\\sqladmin\nPS C:\\\u003e Connect-DbaInstance -SqlInstance sql2014 -Credential $wincred\nCreates an SMO Server object that connects using alternative Windows credentials\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$sqlcred = Get-Credential sqladmin\nPS C:\\\u003e $server = Connect-DbaInstance -SqlInstance sql2014 -Credential $sqlcred\nLogin to sql2014 as SQL login sqladmin.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$server = Connect-DbaInstance -SqlInstance sql2014 -ClientName \"my connection\"\nCreates an SMO Server object that connects using Windows Authentication and uses the client name \"my connection\". So when you open up profiler or use extended events, you can search for \"my \r\nconnection\".\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$server = Connect-DbaInstance -SqlInstance sql2014 -AppendConnectionString \"Packet Size=4096;AttachDbFilename=C:\\MyFolder\\MyDataFile.mdf;User Instance=true;\"\nCreates an SMO Server object that connects to sql2014 using Windows Authentication, then it sets the packet size (this can also be done via -PacketSize) and other connection attributes.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$server = Connect-DbaInstance -SqlInstance sql2014 -NetworkProtocol TcpIp -MultiSubnetFailover\nCreates an SMO Server object that connects using Windows Authentication that uses TCP/IP and has MultiSubnetFailover enabled.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$server = Connect-DbaInstance sql2016 -ApplicationIntent ReadOnly\nConnects with ReadOnly ApplicationIntent.",
        "Syntax": "Connect-DbaInstance [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Credential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-AccessToken] \u003cString\u003e] [[-ApplicationIntent] \u003cString\u003e] [[-BatchSeparator] \u003cString\u003e] [[-ClientName] \u003cString\u003e] [[-ConnectTimeout] \u003cInt32\u003e] [-EncryptConnection] [[-FailoverPartner] \u003cString\u003e] [-IsActiveDirectoryUniversalAuth] [[-LockTimeout] \u003cInt32\u003e] [[-MaxPoolSize] \u003cInt32\u003e] [[-MinPoolSize] \u003cInt32\u003e] [-MultipleActiveResultSets] [-MultiSubnetFailover] [[-NetworkProtocol] \u003cString\u003e] [-NonPooledConnection] [[-PacketSize] \u003cInt32\u003e] [[-PooledConnectionLifetime] \u003cInt32\u003e] \r\n[[-SqlExecutionModes] \u003cString\u003e] [[-StatementTimeout] \u003cInt32\u003e] [-TrustServerCertificate] [[-WorkstationId] \u003cString\u003e] [[-AppendConnectionString] \u003cString\u003e] [-SqlConnectionOnly] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "ConvertTo-DbaDataTable",
        "Description": "Creates a DataTable based on an object\u0027s properties. This allows you to easily write to SQL Server tables.\n\nThanks to Chad Miller, this is based on his script. https://gallery.technet.microsoft.com/scriptcenter/4208a159-a52e-4b99-83d4-8048468d29dd\n\nIf the attempt to convert to data table fails, try the -Raw parameter for less accurate datatype detection.",
        "Tags": [
                     "DataTable",
                     "Table",
                     "Data"
                 ],
        "Alias": "Out-DbaDataTable",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a DataTable for an object.",
        "Name": "ConvertTo-DbaDataTable",
        "Links": "https://dbatools.io/ConvertTo-DbaDataTable",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-Service | ConvertTo-DbaDataTable\nCreates a DataTable from the output of Get-Service.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eConvertTo-DbaDataTable -InputObject $csv.cheesetypes\nCreates a DataTable from the CSV object $csv.cheesetypes.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$dblist | ConvertTo-DbaDataTable\nCreates a DataTable from the $dblist object passed in via pipeline.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-Process | ConvertTo-DbaDataTable -TimeSpanType TotalSeconds\nCreates a DataTable with the running processes and converts any TimeSpan property to TotalSeconds.",
        "Syntax": "ConvertTo-DbaDataTable [-InputObject] \u003cPSObject[]\u003e [[-TimeSpanType] \u003cString\u003e] [-SizeType \u003cString\u003e] [-IgnoreNull] [-Raw] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "ConvertTo-DbaTimeline",
        "Description": "This function accepts input as pipeline from the following dbatools functions:\nGet-DbaAgentJobHistory\nGet-DbaBackupHistory\n(more to come...)\nAnd generates Bootstrap based, HTML file with Google Chart Timeline",
        "Tags": "Chart",
        "Alias": "",
        "Author": "Marcin Gminski (@marcingminski)",
        "Synopsis": "Converts InputObject to a html timeline using Google Chart",
        "Name": "ConvertTo-DbaTimeline",
        "Links": "https://dbatools.io/ConvertTo-DbaTimeline",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentJobHistory -SqlInstance sql-1 -StartDate \u00272018-08-13 00:00\u0027 -EndDate \u00272018-08-13 23:59\u0027 -NoJobSteps | ConvertTo-DbaTimeline | Out-File C:\\temp\\DbaAgentJobHistory.html -Encoding \r\nASCII\nCreates an output file containing a pretty timeline for all of the agent job history results for sql-1 the whole day of 2018-08-13\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlcm | Get-DbaBackupHistory -Since \u00272018-08-13 00:00\u0027 | ConvertTo-DbaTimeline | Out-File C:\\temp\\DbaBackupHistory.html -Encoding ASCII\nCreates an output file containing a pretty timeline for the agent job history since 2018-08-13 for all of the registered servers on sqlcm\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$messageParameters = @{\n\u003e\u003e Subject = \"Backup history for sql2017 and sql2016\"\r\n\u003e\u003e Body = Get-DbaBackupHistory -SqlInstance sql2017, sql2016 -Since \u00272018-08-13 00:00\u0027 | ConvertTo-DbaTimeline\r\n\u003e\u003e From = \"dba@ad.local\"\r\n\u003e\u003e To = \"dba@ad.local\"\r\n\u003e\u003e SmtpServer = \"smtp.ad.local\"\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e Send-MailMessage @messageParameters -BodyAsHtml\nSends an email to dba@ad.local with the results of Get-DbaBackupHistory. Note that viewing these reports may not be supported in all email clients.",
        "Syntax": "ConvertTo-DbaTimeline [-InputObject] \u003cObject[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "ConvertTo-DbaXESession",
        "Description": "Uses a slightly modified version of sp_SQLskills_ConvertTraceToExtendedEvents.sql to convert Traces to Extended Events.\n\nT-SQL code by: Jonathan M. Kehayias, SQLskills.com. T-SQL can be found in this module directory and at\nhttps://www.sqlskills.com/blogs/jonathan/converting-sql-trace-to-extended-events-in-sql-server-2012/",
        "Tags": [
                     "Trace",
                     "ExtendedEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Uses a slightly modified version of sp_SQLskills_ConvertTraceToExtendedEvents.sql to convert Traces to Extended Events.",
        "Name": "ConvertTo-DbaXESession",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2017, sql2012 | Where Id -eq 2 | ConvertTo-DbaXESession -Name \u0027Test\u0027\nConverts Trace with ID 2 to a Session named Test on SQL Server instances named sql2017 and sql2012 and creates the Session on each respective server.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2014 | Out-GridView -PassThru | ConvertTo-DbaXESession -Name \u0027Test\u0027 | Start-DbaXESession\nConverts selected traces on sql2014 to sessions, creates the session, and starts it.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2014 | Where Id -eq 1 | ConvertTo-DbaXESession -Name \u0027Test\u0027 -OutputScriptOnly\nConverts trace ID 1 on sql2014 to an Extended Event and outputs the resulting T-SQL.",
        "Syntax": "ConvertTo-DbaXESession [-InputObject] \u003cObject[]\u003e [-Name] \u003cString\u003e [-OutputScriptOnly] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaAgentAlert",
        "Description": "By default, all alerts are copied. The -Alert parameter is auto-populated for command-line completion and can be used to copy only specific alerts.\n\nIf the alert already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": [
                     "Migration",
                     "Agent"
                 ],
        "Alias": "Copy-SqlAlert",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaAgentAlert migrates alerts from one SQL Server to another.",
        "Name": "Copy-DbaAgentAlert",
        "Links": "https://dbatools.io/Copy-DbaAgentAlert",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaAgentAlert -Source sqlserver2014a -Destination sqlcluster\nCopies all alerts from sqlserver2014a to sqlcluster using Windows credentials. If alerts with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaAgentAlert -Source sqlserver2014a -Destination sqlcluster -Alert PSAlert -SourceSqlCredential $cred -Force\nCopies a only the alert named PSAlert from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If a alert with the same name exists on \r\nsqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaAgentAlert -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaAgentAlert [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Alert] \u003cObject[]\u003e] [[-ExcludeAlert] \u003cObject[]\u003e] [-IncludeDefaults] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaAgentCategory",
        "Description": "By default, all SQL Agent categories for Jobs, Operators and Alerts are copied.\n\nThe -OperatorCategories parameter is auto-populated for command-line completion and can be used to copy only specific operator categories.\nThe -AgentCategories parameter is auto-populated for command-line completion and can be used to copy only specific agent categories.\nThe -JobCategories parameter is auto-populated for command-line completion and can be used to copy only specific job categories.\n\nIf the category already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": [
                     "Migration",
                     "Agent"
                 ],
        "Alias": "Copy-SqlAgentCategory",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaAgentCategory migrates SQL Agent categories from one SQL Server to another. This is similar to sp_add_category.\n\nhttps://msdn.microsoft.com/en-us/library/ms181597.aspx",
        "Name": "Copy-DbaAgentCategory",
        "Links": "https://dbatools.io/Copy-DbaAgentCategory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaAgentCategory -Source sqlserver2014a -Destination sqlcluster\nCopies all operator categories from sqlserver2014a to sqlcluster using Windows authentication. If operator categories with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaAgentCategory -Source sqlserver2014a -Destination sqlcluster -OperatorCategory PSOperator -SourceSqlCredential $cred -Force\nCopies a single operator category, the PSOperator operator category from sqlserver2014a to sqlcluster using SQL credentials to authenticate to sqlserver2014a and Windows credentials for sqlcluster. \r\nIf a operator category with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaAgentCategory -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaAgentCategory -Source \u003cDbaInstanceParameter\u003e [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-JobCategory \u003cString[]\u003e] [-AgentCategory \u003cString[]\u003e] [-OperatorCategory \u003cString[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nCopy-DbaAgentCategory -Source \u003cDbaInstanceParameter\u003e [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-CategoryType \u003cString[]\u003e] [-JobCategory \u003cString[]\u003e] [-AgentCategory \u003cString[]\u003e] [-OperatorCategory \u003cString[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaAgentJob",
        "Description": "By default, all jobs are copied. The -Job parameter is auto-populated for command-line completion and can be used to copy only specific jobs.\n\nIf the job already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": [
                     "Migration",
                     "Agent",
                     "Job"
                 ],
        "Alias": "Copy-SqlJob",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaAgentJob migrates jobs from one SQL Server to another.",
        "Name": "Copy-DbaAgentJob",
        "Links": "https://dbatools.io/Copy-DbaAgentJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaAgentJob -Source sqlserver2014a -Destination sqlcluster\nCopies all jobs from sqlserver2014a to sqlcluster, using Windows credentials. If jobs with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaAgentJob -Source sqlserver2014a -Destination sqlcluster -Job PSJob -SourceSqlCredential $cred -Force\nCopies a single job, the PSJob job from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If a job with the same name exists on \r\nsqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaAgentJob -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaAgentJob [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Job] \u003cObject[]\u003e] [[-ExcludeJob] \u003cObject[]\u003e] [-DisableOnSource] [-DisableOnDestination] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaAgentOperator",
        "Description": "By default, all operators are copied. The -Operators parameter is auto-populated for command-line completion and can be used to copy only specific operators.\n\nIf the associated credentials for the operator do not exist on the destination, it will be skipped. If the operator already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": [
                     "Migration",
                     "Agent",
                     "Operator"
                 ],
        "Alias": "Copy-SqlOperator",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaAgentOperator migrates operators from one SQL Server to another.",
        "Name": "Copy-DbaAgentOperator",
        "Links": "https://dbatools.io/Copy-DbaAgentOperator",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaAgentOperator -Source sqlserver2014a -Destination sqlcluster\nCopies all operators from sqlserver2014a to sqlcluster using Windows credentials. If operators with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaAgentOperator -Source sqlserver2014a -Destination sqlcluster -Operator PSOperator -SourceSqlCredential $cred -Force\nCopies only the PSOperator operator from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If an operator with the same name exists on \r\nsqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaAgentOperator -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaAgentOperator [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Operator] \u003cObject[]\u003e] [[-ExcludeOperator] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaAgentProxyAccount",
        "Description": "By default, all proxy accounts are copied. The -ProxyAccounts parameter is auto-populated for command-line completion and can be used to copy only specific proxy accounts.\n\nIf the associated credential for the account does not exist on the destination, it will be skipped. If the proxy account already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": [
                     "Migration",
                     "Agent"
                 ],
        "Alias": "Copy-SqlProxyAccount",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaAgentProxyAccount migrates proxy accounts from one SQL Server to another.",
        "Name": "Copy-DbaAgentProxyAccount",
        "Links": "https://dbatools.io/Copy-DbaAgentProxyAccount",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaAgentProxyAccount -Source sqlserver2014a -Destination sqlcluster\nCopies all proxy accounts from sqlserver2014a to sqlcluster using Windows credentials. If proxy accounts with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaAgentProxyAccount -Source sqlserver2014a -Destination sqlcluster -ProxyAccount PSProxy -SourceSqlCredential $cred -Force\nCopies only the PSProxy proxy account from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If a proxy account with the same name exists \r\non sqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaAgentProxyAccount -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaAgentProxyAccount [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-ProxyAccount] \u003cString[]\u003e] [[-ExcludeProxyAccount] \u003cString[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaAgentServer",
        "Description": "A wrapper function that calls the associated Copy command for each of the object types seen in SSMS under SQL Server Agent. This also copies all of the the SQL Agent properties (job history max rows, DBMail profile name, etc.).\n\nYou must have sysadmin access and server version must be SQL Server version 2000 or greater.",
        "Tags": [
                     "Migration",
                     "SqlServerAgent",
                     "SqlAgent"
                 ],
        "Alias": "Copy-DbaSqlServerAgent,Copy-SqlServerAgent",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy SQL Server Agent from one server to another.",
        "Name": "Copy-DbaAgentServer",
        "Links": "https://dbatools.io/Copy-DbaAgentServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaAgentServer -Source sqlserver2014a -Destination sqlcluster\nCopies all job server objects from sqlserver2014a to sqlcluster using Windows credentials for authentication. If job objects with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaAgentServer -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred\nCopies all job objects from sqlserver2014a to sqlcluster using SQL credentials to authentication to sqlserver2014a and Windows credentials to authenticate to sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaAgentServer -Source sqlserver2014a -Destination sqlcluster -WhatIf\nShows what would happen if the command were executed.",
        "Syntax": "Copy-DbaAgentServer [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [-DisableJobsOnDestination] [-DisableJobsOnSource] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaAgentSharedSchedule",
        "Description": "All shared job schedules are copied.\n\nIf the associated credential for the account does not exist on the destination, it will be skipped. If the shared job schedule already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": [
                     "Migration",
                     "Agent"
                 ],
        "Alias": "Copy-SqlSharedSchedule",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaAgentSharedSchedule migrates shared job schedules from one SQL Server to another.",
        "Name": "Copy-DbaAgentSharedSchedule",
        "Links": "https://dbatools.io/Copy-DbaAgentSharedSchedule",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaAgentSharedSchedule -Source sqlserver2014a -Destination sqlcluster\nCopies all shared job schedules from sqlserver2014a to sqlcluster using Windows credentials. If shared job schedules with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaAgentSharedSchedule -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaAgentSharedSchedule [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaBackupDevice",
        "Description": "Backups are migrated using Admin shares. If the destination directory does not exist, SQL Server\u0027s default backup directory will be used.\n\nIf a backup device with same name exists on destination, it will not be dropped and recreated unless -Force is used.",
        "Tags": [
                     "Migration",
                     "Backup"
                 ],
        "Alias": "Copy-SqlBackupDevice",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copies backup devices one by one. Copies both SQL code and the backup file itself.",
        "Name": "Copy-DbaBackupDevice",
        "Links": "https://dbatools.io/Copy-DbaBackupDevice",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaBackupDevice -Source sqlserver2014a -Destination sqlcluster\nCopies all server backup devices from sqlserver2014a to sqlcluster using Windows credentials. If backup devices with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaBackupDevice -Source sqlserver2014a -Destination sqlcluster -BackupDevice backup01 -SourceSqlCredential $cred -Force\nCopies only the backup device named backup01 from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If a backup device with the same \r\nname exists on sqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaBackupDevice -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaBackupDevice [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-BackupDevice] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaCentralManagementServer",
        "Description": "Copy-DbaCentralManagementServer copies all groups, subgroups, and server instances from one SQL Server to another.",
        "Tags": "Migration",
        "Alias": "Copy-SqlCentralManagementServer",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates SQL Server Central Management groups and server instances from one SQL Server to another.",
        "Name": "Copy-DbaCentralManagementServer",
        "Links": "https://dbatools.io/Copy-DbaCentralManagementServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaCentralManagementServer -Source sqlserver2014a -Destination sqlcluster\nAll groups, subgroups, and server instances are copied from sqlserver2014a CMS to sqlcluster CMS.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaCentralManagementServer -Source sqlserver2014a -Destination sqlcluster -ServerGroup Group1,Group3\nTop-level groups Group1 and Group3 along with their subgroups and server instances are copied from sqlserver to sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaCentralManagementServer -Source sqlserver2014a -Destination sqlcluster -ServerGroup Group1,Group3 -SwitchServerName -SourceSqlCredential $SourceSqlCredential -DestinationSqlCredential \r\n$DestinationSqlCredential\nTop-level groups Group1 and Group3 along with their subgroups and server instances are copied from sqlserver to sqlcluster. When adding sql instances to sqlcluster, if the server name of the \r\nmigrating instance is \"sqlcluster\", it will be switched to \"sqlserver\".\nIf SwitchServerName is not specified, \"sqlcluster\" will be skipped.",
        "Syntax": "Copy-DbaCentralManagementServer [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-CMSGroup] \u003cObject[]\u003e] [-SwitchServerName] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaCredential",
        "Description": "By using password decryption techniques provided by Antti Rantasaari (NetSPI, 2014), this script migrates SQL Server Credentials from one server to another while maintaining username and password.\n\nCredit: https://blog.netspi.com/decrypting-mssql-database-link-server-passwords/",
        "Tags": [
                     "WSMan",
                     "Migration"
                 ],
        "Alias": "Copy-SqlCredential",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaCredential migrates SQL Server Credentials from one SQL Server to another while maintaining Credential passwords.",
        "Name": "Copy-DbaCredential",
        "Links": "https://dbatools.io/Copy-DbaCredential",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaCredential -Source sqlserver2014a -Destination sqlcluster\nCopies all SQL Server Credentials on sqlserver2014a to sqlcluster. If Credentials exist on destination, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaCredential -Source sqlserver2014a -Destination sqlcluster -Name \"PowerShell Proxy Account\" -Force\nCopies over one SQL Server Credential (PowerShell Proxy Account) from sqlserver to sqlcluster. If the Credential already exists on the destination, it will be dropped and recreated.",
        "Syntax": "Copy-DbaCredential [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cString[]\u003e] [[-ExcludeName] \u003cString[]\u003e] [[-Identity] \u003cString[]\u003e] [[-ExcludeIdentity] \u003cString[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaCustomError",
        "Description": "By default, all custom errors are copied. The -CustomError parameter is auto-populated for command-line completion and can be used to copy only specific custom errors.\n\nIf the custom error already exists on the destination, it will be skipped unless -Force is used. The us_english version must be created first. If you drop the us_english version, all the other languages will be dropped for that specific ID as well.",
        "Tags": [
                     "Migration",
                     "CustomError"
                 ],
        "Alias": "Copy-SqlCustomError",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaCustomError migrates custom errors (user defined messages), by the custom error ID, from one SQL Server to another.",
        "Name": "Copy-DbaCustomError",
        "Links": "https://dbatools.io/Copy-DbaCustomError",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaCustomError -Source sqlserver2014a -Destination sqlcluster\nCopies all server custom errors from sqlserver2014a to sqlcluster using Windows credentials. If custom errors with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaCustomError -Source sqlserver2014a -SourceSqlCredential $scred -Destination sqlcluster -DestinationSqlCredential $dcred -CustomError 60000 -Force\nCopies only the custom error with ID number 60000 from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If a custom error with the same \r\nname exists on sqlcluster, it will be updated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaCustomError -Source sqlserver2014a -Destination sqlcluster -ExcludeCustomError 60000 -Force\nCopies all the custom errors found on sqlserver2014a except the custom error with ID number 60000 to sqlcluster. If a custom error with the same name exists on sqlcluster, it will be updated because \r\n-Force was used.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eCopy-DbaCustomError -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaCustomError [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-CustomError] \u003cObject[]\u003e] [[-ExcludeCustomError] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaDatabase",
        "Description": "This script provides the ability to migrate databases using detach/copy/attach or backup/restore. This script works with named instances, clusters and SQL Server Express Edition.\n\nBy default, databases will be migrated to the destination SQL Server\u0027s default data and log directories. You can override this by specifying -ReuseSourceFolderStructure. Filestreams and filegroups are also migrated. Safety is emphasized.",
        "Tags": [
                     "Migration",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "Copy-SqlDatabase",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates SQL Server databases from one SQL Server to another.",
        "Name": "Copy-DbaDatabase",
        "Links": "https://dbatools.io/Copy-DbaDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaDatabase -Source sql2014a -Destination sql2014b -Database TestDB -BackupRestore -NetworkShare \\\\fileshare\\sql\\migration\nMigrates a single user database TestDB using Backup and restore from instance sql2014a to sql2014b. Backup files are stored in \\\\fileshare\\sql\\migration.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaDatabase -Source sql2012 -Destination sql2014, sql2016 -DetachAttach -Reattach\nDatabases will be migrated from sql2012 to both sql2014 and sql2016 using the detach/copy files/attach method.The following will be performed: kick all users out of the database, detach all data/log \r\nfiles, move files across the network over an admin share (\\\\SqlSERVER\\M$\\MSSql...), attach file on destination server, reattach at source. If the database files (*.mdf, *.ndf, *.ldf) on *destination* \r\nexist and aren\u0027t in use, they will be overwritten.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaDatabase -Source sql2014a -Destination sqlcluster, sql2016 -BackupRestore -UseLastBackups -Force\nMigrates all user databases to sqlcluster and sql2016 using the last Full, Diff and Log backups from sql204a. If the databases exists on the destinations, they will be dropped prior to attach.\nNote that the backups must exist in a location accessible by all destination servers, such a network share.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eCopy-DbaDatabase -Source sql2014a -Destination sqlcluster -ExcludeDatabase Northwind, pubs -IncludeSupportDbs -Force -BackupRestore -NetworkShare \\\\fileshare\\sql\\migration\nMigrates all user databases except for Northwind and pubs by using backup/restore (copy-only). Backup files are stored in \\\\fileshare\\sql\\migration. If the database exists on the destination, it will \r\nbe dropped prior to attach.\nIt also includes the support databases (ReportServer, ReportServerTempDb, distribution).",
        "Syntax": "Copy-DbaDatabase [-Source \u003cDbaInstanceParameter\u003e] [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] -BackupRestore [-NetworkShare \u003cString\u003e] [-WithReplace] [-NoRecovery] [-NoBackupCleanup] [-NumberFiles \u003cInt32\u003e] [-SetSourceReadOnly] [-ReuseSourceFolderStructure] [-IncludeSupportDbs] [-UseLastBackups] [-Continue] [-InputObject \u003cDatabase[]\u003e] [-NoCopyOnly] [-SetSourceOffline] [-NewName \u003cString\u003e] [-Prefix \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] \r\n[-Confirm] [\u003cCommonParameters\u003e]\nCopy-DbaDatabase [-Source \u003cDbaInstanceParameter\u003e] [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] -DetachAttach [-Reattach] [-SetSourceReadOnly] [-ReuseSourceFolderStructure] [-IncludeSupportDbs] [-InputObject \u003cDatabase[]\u003e] [-NoCopyOnly] [-SetSourceOffline] [-NewName \u003cString\u003e] [-Prefix \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaDataCollector",
        "Description": "By default, all data collector objects are migrated. If the object already exists on the destination, it will be skipped unless -Force is used.\n\nThe -CollectionSet parameter is auto-populated for command-line completion and can be used to copy only specific objects.",
        "Tags": [
                     "Migration",
                     "DataCollection"
                 ],
        "Alias": "Copy-DbaSqlDataCollector,Copy-SqlDataCollector",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates user SQL Data Collector collection sets. SQL Data Collector configuration is on the agenda, but it\u0027s hard.",
        "Name": "Copy-DbaDataCollector",
        "Links": "https://dbatools.io/Copy-DbaDataCollector",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaDataCollector -Source sqlserver2014a -Destination sqlcluster\nCopies all Data Collector Objects and Configurations from sqlserver2014a to sqlcluster, using Windows credentials.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaDataCollector -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred\nCopies all Data Collector Objects and Configurations from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaDataCollector -Source sqlserver2014a -Destination sqlcluster -WhatIf\nShows what would happen if the command were executed.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eCopy-DbaDataCollector -Source sqlserver2014a -Destination sqlcluster -CollectionSet \u0027Server Activity\u0027, \u0027Table Usage Analysis\u0027\nCopies two Collection Sets, Server Activity and Table Usage Analysis, from sqlserver2014a to sqlcluster.",
        "Syntax": "Copy-DbaDataCollector [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-CollectionSet] \u003cObject[]\u003e] [[-ExcludeCollectionSet] \u003cObject[]\u003e] [-NoServerReconfig] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaDbAssembly",
        "Description": "By default, all assemblies are copied.\n\nIf the assembly already exists on the destination, it will be skipped unless -Force is used.\n\nThis script does not yet copy dependencies or dependent objects.",
        "Tags": [
                     "Migration",
                     "Assembly"
                 ],
        "Alias": "Copy-DbaDatabaseAssembly,Copy-SqlDatabaseAssembly",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaDbAssembly migrates assemblies from one SQL Server to another.",
        "Name": "Copy-DbaDbAssembly",
        "Links": "http://dbatools.io/Get-SqlDatabaseAssembly",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaDbAssembly -Source sqlserver2014a -Destination sqlcluster\nCopies all assemblies from sqlserver2014a to sqlcluster using Windows credentials. If assemblies with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaDbAssembly -Source sqlserver2014a -Destination sqlcluster -Assembly dbname.assemblyname, dbname3.anotherassembly -SourceSqlCredential $cred -Force\nCopies two assemblies, the dbname.assemblyname and dbname3.anotherassembly from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If an \r\nassembly with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used.\nIn this example, anotherassembly will be copied to the dbname3 database on the server sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaDbAssembly -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaDbAssembly [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Assembly] \u003cObject[]\u003e] [[-ExcludeAssembly] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaDbMail",
        "Description": "By default, all mail configurations for Profiles, Accounts, Mail Servers and Configs are copied.",
        "Tags": [
                     "Migration",
                     "Mail"
                 ],
        "Alias": "Copy-DbaDatabaseMail,Copy-SqlDatabaseMail",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates Mail Profiles, Accounts, Mail Servers and Mail Server Configs from one SQL Server to another.",
        "Name": "Copy-DbaDbMail",
        "Links": "https://dbatools.io/Copy-DbaDbMail",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaDbMail -Source sqlserver2014a -Destination sqlcluster\nCopies all database mail objects from sqlserver2014a to sqlcluster using Windows credentials. If database mail objects with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaDbMail -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred\nCopies all database mail objects from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaDbMail -Source sqlserver2014a -Destination sqlcluster -WhatIf\nShows what would happen if the command were executed.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eCopy-DbaDbMail -Source sqlserver2014a -Destination sqlcluster -EnableException\nPerforms execution of function, and will throw a terminating exception if something breaks",
        "Syntax": "Copy-DbaDbMail -Source \u003cDbaInstanceParameter\u003e -Destination \u003cDbaInstanceParameter[]\u003e [-SourceSqlCredential \u003cPSCredential\u003e] [-DestinationSqlCredential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nCopy-DbaDbMail -Source \u003cDbaInstanceParameter\u003e -Destination \u003cDbaInstanceParameter[]\u003e [-Type \u003cString[]\u003e] [-SourceSqlCredential \u003cPSCredential\u003e] [-DestinationSqlCredential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaDbTableData",
        "Description": "Copies data between SQL Server tables using SQL Bulk Copy.\nThe same can be achieved also doing\n$sourcetable = Invoke-SqlCmd2 -ServerInstance instance1 ... -As DataTable\nWrite-DbaDataTable -SqlInstance ... -InputObject $sourcetable\nbut it will force buffering the contents on the table in memory (high RAM usage for large tables).\nWith this function, a streaming copy will be done in the most speedy and least resource-intensive way.",
        "Tags": "Migration",
        "Alias": "Copy-DbaTableData",
        "Author": "Simone Bizzotto (@niphlod)",
        "Synopsis": "Copies data between SQL Server tables.",
        "Name": "Copy-DbaDbTableData",
        "Links": "https://dbatools.io/Copy-DbaDbTableData",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaDbTableData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -Table test_table\nCopies all the data from sql1 to sql2, using the database dbatools_from.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaDbTableData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -DestinationDatabase dbatools_dest -Table test_table\nCopies all the data from sql1 to sql2, using the database dbatools_from as source and dbatools_dest as destination\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbTable -SqlInstance sql1 -Database tempdb -Table tb1, tb2 | Copy-DbaDbTableData -DestinationTable tb3\nCopies all data from tables tb1 and tb2 in tempdb on sql1 to tb3 in tempdb on sql1\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbTable -SqlInstance sql1 -Database tempdb -Table tb1, tb2 | Copy-DbaDbTableData -Destination sql2\nCopies data from tbl1 in tempdb on sql1 to tbl1 in tempdb on sql2\r\nthen\r\nCopies data from tbl2 in tempdb on sql1 to tbl2 in tempdb on sql2\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eCopy-DbaDbTableData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -Table test_table\nCopies all the data from sql1 to sql2, using the database dbatools_from.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eCopy-DbaDbTableData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -Table test_table -KeepIdentity -Truncate\nCopies all the data from sql1 to sql2, using the database dbatools_from, keeping identity columns and truncating the destination\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eCopy-DbaDbTableData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -Table test_table -KeepIdentity -Truncate\nCopies all the data from sql1 to sql2, using the database dbatools_from, keeping identity columns and truncating the destination",
        "Syntax": "Copy-DbaDbTableData [[-SqlInstance] \u003cDbaInstanceParameter\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Destination] \u003cDbaInstanceParameter\u003e] [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString\u003e] [[-DestinationDatabase] \u003cString\u003e] [[-Table] \u003cString[]\u003e] [[-Query] \u003cString\u003e] [[-BatchSize] \u003cInt32\u003e] [[-NotifyAfter] \u003cInt32\u003e] [[-DestinationTable] \u003cString\u003e] [-NoTableLock] [-CheckConstraints] [-FireTriggers] [-KeepIdentity] [-KeepNulls] [-Truncate] [[-bulkCopyTimeOut] \u003cInt32\u003e] [[-InputObject] \u003cTable[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaEndpoint",
        "Description": "By default, all endpoints are copied.\n\nIf the endpoint already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": [
                     "Migration",
                     "Endpoint"
                 ],
        "Alias": "Copy-SqlEndpoint",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaEndpoint migrates server endpoints from one SQL Server to another.",
        "Name": "Copy-DbaEndpoint",
        "Links": "https://dbatools.io/Copy-DbaEndpoint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaEndpoint -Source sqlserver2014a -Destination sqlcluster\nCopies all server endpoints from sqlserver2014a to sqlcluster, using Windows credentials. If endpoints with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaEndpoint -Source sqlserver2014a -SourceSqlCredential $cred -Destination sqlcluster -Endpoint tg_noDbDrop -Force\nCopies only the tg_noDbDrop endpoint from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If an endpoint with the same name exists on \r\nsqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaEndpoint -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaEndpoint [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Endpoint] \u003cObject[]\u003e] [[-ExcludeEndpoint] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaExtendedEvent",
        "Description": "Migrates SQL Extended Event Sessions except the two default sessions, AlwaysOn_health and system_health.\n\nBy default, all non-system Extended Events are migrated.",
        "Tags": [
                     "Migration",
                     "ExtendedEvent",
                     "XEvent"
                 ],
        "Alias": "Copy-SqlExtendedEvent",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates SQL Extended Event Sessions except the two default sessions, AlwaysOn_health and system_health.",
        "Name": "Copy-DbaExtendedEvent",
        "Links": "https://dbatools.io/Copy-DbaExtendedEvent",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaExtendedEvent -Source sqlserver2014a -Destination sqlcluster\nCopies all Extended Event sessions from sqlserver2014a to sqlcluster using Windows credentials.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaExtendedEvent -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred\nCopies all Extended Event sessions from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaExtendedEvent -Source sqlserver2014a -Destination sqlcluster -WhatIf\nShows what would happen if the command were executed.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eCopy-DbaExtendedEvent -Source sqlserver2014a -Destination sqlcluster -XeSession CheckQueries, MonitorUserDefinedException\nCopies only the Extended Events named CheckQueries and MonitorUserDefinedException from sqlserver2014a to sqlcluster.",
        "Syntax": "Copy-DbaExtendedEvent [-Source] \u003cDbaInstanceParameter\u003e [-Destination] \u003cDbaInstanceParameter[]\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-XeSession] \u003cObject[]\u003e] [[-ExcludeXeSession] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaLinkedServer",
        "Description": "By using password decryption techniques provided by Antti Rantasaari (NetSPI, 2014), this script migrates SQL Server Linked Servers from one server to another, while maintaining username and password.\n\nCredit: https://blog.netspi.com/decrypting-mssql-database-link-server-passwords/",
        "Tags": [
                     "WSMan",
                     "Migration",
                     "LinkedServer"
                 ],
        "Alias": "Copy-SqlLinkedServer",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaLinkedServer migrates Linked Servers from one SQL Server to another. Linked Server logins and passwords are migrated as well.",
        "Name": "Copy-DbaLinkedServer",
        "Links": "https://dbatools.io/Copy-DbaLinkedServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaLinkedServer -Source sqlserver2014a -Destination sqlcluster\nCopies all SQL Server Linked Servers on sqlserver2014a to sqlcluster. If Linked Server exists on destination, it will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaLinkedServer -Source sqlserver2014a -Destination sqlcluster -LinkedServer SQL2K5,SQL2k -Force\nCopies over two SQL Server Linked Servers (SQL2K and SQL2K2) from sqlserver to sqlcluster. If the credential already exists on the destination, it will be dropped.",
        "Syntax": "Copy-DbaLinkedServer [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-LinkedServer] \u003cObject[]\u003e] [[-ExcludeLinkedServer] \u003cObject[]\u003e] [-UpgradeSqlClient] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaLogin",
        "Description": "SQL Server 2000: Migrates logins with SIDs, passwords, server roles and database roles.\n\nSQL Server 2005 \u0026 newer: Migrates logins with SIDs, passwords, defaultdb, server roles \u0026 securables, database permissions \u0026 securables, login attributes (enforce password policy, expiration, etc.)\n\nThe login hash algorithm changed in SQL Server 2012, and is not backwards compatible with previous SQL Server versions. This means that while SQL Server 2000 logins can be migrated to SQL Server 2012, logins created in SQL Server 2012 can only be migrated to SQL Server 2012 and above.",
        "Tags": [
                     "Migration",
                     "Login"
                 ],
        "Alias": "Copy-SqlLogin",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates logins from source to destination SQL Servers. Supports SQL Server versions 2000 and newer.",
        "Name": "Copy-DbaLogin",
        "Links": "https://dbatools.io/Copy-DbaLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -Force\nCopies all logins from Source Destination. If a SQL Login on Source exists on the Destination, the Login on Destination will be dropped and recreated.\nIf active connections are found for a login, the copy of that Login will fail as it cannot be dropped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -Force -KillActiveConnection\nCopies all logins from Source Destination. If a SQL Login on Source exists on the Destination, the Login on Destination will be dropped and recreated.\nIf any active connections are found they will be killed.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -Exclude realcajun -SourceSqlCredential $scred -DestinationSqlCredential $dcred\nCopies all Logins from Source to Destination except for realcajun using SQL Authentication to connect to both instances.\nIf a Login already exists on the destination, it will not be migrated.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eCopy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -Login realcajun, netnerds -force\nCopies ONLY Logins netnerds and realcajun. If Login realcajun or netnerds exists on Destination, the existing Login(s) will be dropped and recreated.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eCopy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -SyncOnly\nSyncs only SQL Server login permissions, roles, etc. Does not add or drop logins or users.\nIf a matching Login does not exist on Destination, the Login will be skipped.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eCopy-DbaLogin -LoginRenameHashtable @{ \"OldUser\" =\"newlogin\" } -Source $Sql01 -Destination Localhost -SourceSqlCredential $sqlcred\nCopies OldUser and then renames it to newlogin.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 | Out-GridView -Passthru | Copy-DbaLogin -Destination sql2017\nDisplays all available logins on sql2016 in a grid view, then copies all selected logins to sql2017.",
        "Syntax": "Copy-DbaLogin [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-Login \u003cObject[]\u003e] [-ExcludeLogin \u003cObject[]\u003e] [-ExcludeSystemLogin] [-SyncOnly] [-LoginRenameHashtable \u003cHashtable\u003e] [-KillActiveConnection] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nCopy-DbaLogin -Source \u003cDbaInstanceParameter\u003e [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-Login \u003cObject[]\u003e] [-ExcludeLogin \u003cObject[]\u003e] [-ExcludeSystemLogin] [-SyncOnly] [-SyncSaName] [-LoginRenameHashtable \u003cHashtable\u003e] [-KillActiveConnection] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nCopy-DbaLogin [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-Login \u003cObject[]\u003e] [-ExcludeLogin \u003cObject[]\u003e] [-ExcludeSystemLogin] [-SyncOnly] [-SyncSaName] [-LoginRenameHashtable \u003cHashtable\u003e] [-KillActiveConnection] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nCopy-DbaLogin [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-Login \u003cObject[]\u003e] [-ExcludeLogin \u003cObject[]\u003e] [-ExcludeSystemLogin] [-SyncOnly] -OutFile \u003cString\u003e [-LoginRenameHashtable \u003cHashtable\u003e] [-KillActiveConnection] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nCopy-DbaLogin [-SourceSqlCredential \u003cPSCredential\u003e] -Destination \u003cDbaInstanceParameter[]\u003e [-DestinationSqlCredential \u003cPSCredential\u003e] [-Login \u003cObject[]\u003e] [-ExcludeLogin \u003cObject[]\u003e] [-ExcludeSystemLogin] [-SyncOnly] [-InputObject \u003cObject\u003e] [-LoginRenameHashtable \u003cHashtable\u003e] [-KillActiveConnection] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaPolicyManagement",
        "Description": "By default, all policies and conditions are copied. If an object already exist on the destination, it will be skipped unless -Force is used.\n\nThe -Policy and -Condition parameters are auto-populated for command-line completion and can be used to copy only specific objects.",
        "Tags": "Migration",
        "Alias": "Copy-DbaSqlPolicyManagement,Copy-SqlPolicyManagement",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates SQL Policy Based Management Objects, including both policies and conditions.",
        "Name": "Copy-DbaPolicyManagement",
        "Links": "https://dbatools.io/Copy-DbaPolicyManagement",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaPolicyManagement -Source sqlserver2014a -Destination sqlcluster\nCopies all policies and conditions from sqlserver2014a to sqlcluster, using Windows credentials.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaPolicyManagement -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred\nCopies all policies and conditions from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaPolicyManagement -Source sqlserver2014a -Destination sqlcluster -WhatIf\nShows what would happen if the command were executed.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eCopy-DbaPolicyManagement -Source sqlserver2014a -Destination sqlcluster -Policy \u0027xp_cmdshell must be disabled\u0027\nCopies only one policy, \u0027xp_cmdshell must be disabled\u0027 from sqlserver2014a to sqlcluster. No conditions are migrated.",
        "Syntax": "Copy-DbaPolicyManagement [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Policy] \u003cObject[]\u003e] [[-ExcludePolicy] \u003cObject[]\u003e] [[-Condition] \u003cObject[]\u003e] [[-ExcludeCondition] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaQueryStoreConfig",
        "Description": "Copies the configuration of a Query Store enabled database and sets the copied configuration on other databases.",
        "Tags": "QueryStore",
        "Alias": "",
        "Author": "Enrico van de Laar (@evdlaar)",
        "Synopsis": "Copies the configuration of a Query Store enabled database and sets the copied configuration on other databases.",
        "Name": "Copy-DbaQueryStoreConfig",
        "Links": "https://dbatools.io/Copy-QueryStoreConfig",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaQueryStoreConfig -Source ServerA\\SQL -SourceDatabase AdventureWorks -Destination ServerB\\SQL -AllDatabases\nCopy the Query Store configuration of the AdventureWorks database in the ServerA\\SQL instance and apply it on all user databases in the ServerB\\SQL Instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaQueryStoreConfig -Source ServerA\\SQL -SourceDatabase AdventureWorks -Destination ServerB\\SQL -DestinationDatabase WorldWideTraders\nCopy the Query Store configuration of the AdventureWorks database in the ServerA\\SQL instance and apply it to the WorldWideTraders database in the ServerB\\SQL Instance.",
        "Syntax": "Copy-DbaQueryStoreConfig [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-SourceDatabase] \u003cObject\u003e [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-DestinationDatabase] \u003cObject[]\u003e] [[-Exclude] \u003cObject[]\u003e] [-AllDatabases] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaResourceGovernor",
        "Description": "By default, all non-system resource pools are migrated. If the pool already exists on the destination, it will be skipped unless -Force is used.\n\nThe -ResourcePool parameter is auto-populated for command-line completion and can be used to copy only specific objects.",
        "Tags": [
                     "Migration",
                     "ResourceGovernor"
                 ],
        "Alias": "Copy-SqlResourceGovernor",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates Resource Pools",
        "Name": "Copy-DbaResourceGovernor",
        "Links": "https://dbatools.io/Copy-DbaResourceGovernor",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaResourceGovernor -Source sqlserver2014a -Destination sqlcluster\nCopies all all non-system resource pools from sqlserver2014a to sqlcluster using Windows credentials to connect to the SQL Server instances..\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaResourceGovernor -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred\nCopies all all non-system resource pools from sqlserver2014a to sqlcluster using SQL credentials to connect to sqlserver2014a and Windows credentials to connect to sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaResourceGovernor -Source sqlserver2014a -Destination sqlcluster -WhatIf\nShows what would happen if the command were executed.",
        "Syntax": "Copy-DbaResourceGovernor [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-ResourcePool] \u003cObject[]\u003e] [[-ExcludeResourcePool] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaServerAudit",
        "Description": "By default, all audits are copied. The -Audit parameter is auto-populated for command-line completion and can be used to copy only specific audits.\n\nIf the audit already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": "Migration",
        "Alias": "Copy-SqlAudit",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaServerAudit migrates server audits from one SQL Server to another.",
        "Name": "Copy-DbaServerAudit",
        "Links": "https://dbatools.io/Copy-DbaServerAudit",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaServerAudit -Source sqlserver2014a -Destination sqlcluster\nCopies all server audits from sqlserver2014a to sqlcluster, using Windows credentials. If audits with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaServerAudit -Source sqlserver2014a -Destination sqlcluster -Audit tg_noDbDrop -SourceSqlCredential $cred -Force\nCopies a single audit, the tg_noDbDrop audit from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If an audit with the same name exists \r\non sqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaServerAudit -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaServerAudit [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Audit] \u003cObject[]\u003e] [[-ExcludeAudit] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaServerAuditSpecification",
        "Description": "By default, all audits are copied. The -AuditSpecification parameter is auto-populated for command-line completion and can be used to copy only specific audits.\n\nIf the audit specification already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": [
                     "Migration",
                     "ServerAudit",
                     "AuditSpecification"
                 ],
        "Alias": "Copy-SqlAuditSpecification",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaServerAuditSpecification migrates server audit specifications from one SQL Server to another.",
        "Name": "Copy-DbaServerAuditSpecification",
        "Links": "https://dbatools.io/Copy-DbaServerAuditSpecification",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaServerAuditSpecification -Source sqlserver2014a -Destination sqlcluster\nCopies all server audits from sqlserver2014a to sqlcluster using Windows credentials to connect. If audits with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaServerAuditSpecification -Source sqlserver2014a -Destination sqlcluster -ServerAuditSpecification tg_noDbDrop -SourceSqlCredential $cred -Force\nCopies a single audit, the tg_noDbDrop audit from sqlserver2014a to sqlcluster using SQL credentials to connect to sqlserver2014a and Windows credentials to connect to sqlcluster. If an audit \r\nspecification with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaServerAuditSpecification -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaServerAuditSpecification [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-AuditSpecification] \u003cObject[]\u003e] [[-ExcludeAuditSpecification] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaServerTrigger",
        "Description": "By default, all triggers are copied. The -ServerTrigger parameter is auto-populated for command-line completion and can be used to copy only specific triggers.\n\nIf the trigger already exists on the destination, it will be skipped unless -Force is used.",
        "Tags": "Migration",
        "Alias": "Copy-SqlServerTrigger",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaServerTrigger migrates server triggers from one SQL Server to another.",
        "Name": "Copy-DbaServerTrigger",
        "Links": "https://dbatools.io/Copy-DbaServerTrigger",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaServerTrigger -Source sqlserver2014a -Destination sqlcluster\nCopies all server triggers from sqlserver2014a to sqlcluster, using Windows credentials. If triggers with the same name exist on sqlcluster, they will be skipped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaServerTrigger -Source sqlserver2014a -Destination sqlcluster -ServerTrigger tg_noDbDrop -SourceSqlCredential $cred -Force\nCopies a single trigger, the tg_noDbDrop trigger from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If a trigger with the same name \r\nexists on sqlcluster, it will be dropped and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaServerTrigger -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.",
        "Syntax": "Copy-DbaServerTrigger [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-ServerTrigger] \u003cObject[]\u003e] [[-ExcludeServerTrigger] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaSpConfigure",
        "Description": "By default, all configuration values are copied. The -ConfigName parameter is auto-populated for command-line completion and can be used to copy only specific configs.",
        "Tags": [
                     "Migration",
                     "Configure",
                     "SpConfigure"
                 ],
        "Alias": "Copy-SqlSpConfigure",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copy-DbaSpConfigure migrates configuration values from one SQL Server to another.",
        "Name": "Copy-DbaSpConfigure",
        "Links": "https://dbatools.io/Copy-DbaSpConfigure",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaSpConfigure -Source sqlserver2014a -Destination sqlcluster\nCopies all sp_configure settings from sqlserver2014a to sqlcluster\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaSpConfigure -Source sqlserver2014a -Destination sqlcluster -ConfigName DefaultBackupCompression, IsSqlClrEnabled -SourceSqlCredential $cred -Force\nCopies the values for IsSqlClrEnabled and DefaultBackupCompression from sqlserver2014a to sqlcluster using SQL credentials to authenticate to sqlserver2014a and Windows credentials to authenticate to \r\nsqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaSpConfigure -Source sqlserver2014a -Destination sqlcluster -ExcludeConfigName DefaultBackupCompression, IsSqlClrEnabled\nCopies all configs except for IsSqlClrEnabled and DefaultBackupCompression, from sqlserver2014a to sqlcluster.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eCopy-DbaSpConfigure -Source sqlserver2014a -Destination sqlcluster -WhatIf\nShows what would happen if the command were executed.",
        "Syntax": "Copy-DbaSpConfigure [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-ConfigName] \u003cObject[]\u003e] [[-ExcludeConfigName] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaSsisCatalog",
        "Description": "By default, all folders, projects, and environments are copied. The -Project parameter can be specified to copy only one project, if desired.\n\nThe parameters get more granular from the Folder level. For example, specifying -Folder will only deploy projects/environments from within that folder.",
        "Tags": [
                     "Migration",
                     "SSIS"
                 ],
        "Alias": "Copy-SqlSsisCatalog",
        "Author": "Phil Schwartz (philschwartz.me, @pschwartzzz)",
        "Synopsis": "Copy-DbaSsisCatalog migrates Folders, SSIS projects, and environments from one SQL Server to another.",
        "Name": "Copy-DbaSsisCatalog",
        "Links": "https://dbatools.io/Copy-DbaSsisCatalog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster\nCopies all folders, environments and SSIS Projects from sqlserver2014a to sqlcluster, using Windows credentials to authenticate to both instances. If folders with the same name exist on the \r\ndestination they will be skipped, but projects will be redeployed.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster -Project Archive_Tables -SourceSqlCredential $cred -Force\nCopies a single Project, the Archive_Tables Project, from sqlserver2014a to sqlcluster using SQL credentials to authenticate to sqlserver2014a and Windows credentials to authenticate to sqlcluster. \r\nIf a Project with the same name exists on sqlcluster, it will be deleted and recreated because -Force was used.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eCopy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force\nShows what would happen if the command were executed using force.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$SecurePW = Read-Host \"Enter password\" -AsSecureString\nPS C:\\\u003e Copy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster -CreateCatalogPassword $SecurePW\nDeploy entire SSIS catalog to an instance without a destination catalog. User prompts for creating the catalog on Destination will be bypassed.",
        "Syntax": "Copy-DbaSsisCatalog [-Source] \u003cDbaInstanceParameter\u003e [-Destination] \u003cDbaInstanceParameter[]\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Project] \u003cString\u003e] [[-Folder] \u003cString\u003e] [[-Environment] \u003cString\u003e] [[-CreateCatalogPassword] \u003cSecureString\u003e] [-EnableSqlClr] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaSysDbUserObject",
        "Description": "Imports all user objects found in source SQL Server\u0027s master, msdb and model databases to the destination. This is useful because many DBAs store backup/maintenance procs/tables/triggers/etc (among other things) in master or msdb.\n\nIt is also useful for migrating objects within the model database.",
        "Tags": [
                     "Migration",
                     "SystemDatabase",
                     "UserObject"
                 ],
        "Alias": "Copy-SqlSysDbUserObjects",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Imports all user objects found in source SQL Server\u0027s master, msdb and model databases to the destination.",
        "Name": "Copy-DbaSysDbUserObject",
        "Links": "https://dbatools.io/Copy-DbaSysDbUserObject",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eadCopy-DbaSysDbUserObject $sourceServer $destserver\nCopies user objects from source to destination",
        "Syntax": "Copy-DbaSysDbUserObject [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter[]\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [-Force] [-Classic] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Copy-DbaXESessionTemplate",
        "Description": "Copies non-Microsoft templates from the dbatools template repository (\\bin\\xetemplates\\) to $home\\Documents\\SQL Server Management Studio\\Templates\\XEventTemplates.\n\nUseful for when you want to use the SSMS GUI.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copies non-Microsoft templates from the dbatools template repository (\\bin\\xetemplates\\) to $home\\Documents\\SQL Server Management Studio\\Templates\\XEventTemplates.",
        "Name": "Copy-DbaXESessionTemplate",
        "Links": "https://dbatools.io/Copy-DbaXESessionTemplate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eCopy-DbaXESessionTemplate\nCopies non-Microsoft templates from the dbatools template repository (\\bin\\xetemplates\\) to $home\\Documents\\SQL Server Management Studio\\Templates\\XEventTemplates.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eCopy-DbaXESessionTemplate -Path C:\\temp\\xetemplates\nCopies your templates from C:\\temp\\xetemplates to $home\\Documents\\SQL Server Management Studio\\Templates\\XEventTemplates.",
        "Syntax": "Copy-DbaXESessionTemplate [[-Path] \u003cString[]\u003e] [[-Destination] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Disable-DbaAgHadr",
        "Description": "In order to build an AG a cluster has to be built and then the Hadr enabled for the SQL Server\nservice. This function disables that feature for the SQL Server service.",
        "Tags": [
                     "Hadr",
                     "AG",
                     "AvailabilityGroup"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), http://wsmelton.github.io",
        "Synopsis": "Disables the Hadr service setting on the specified SQL Server.",
        "Name": "Disable-DbaAgHadr",
        "Links": "https://dbatools.io/Disable-DbaAgHadr",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eDisable-DbaAgHadr -SqlInstance sql2016 -Force\nSets Hadr service to disabled for the instance sql2016, and restart the service to apply the change.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eDisable-DbaAgHadr -SqlInstance sql2012\\dev1 -Force\nSets Hadr service to disabled for the instance dev1 on sq2012, and restart the service to apply the change.",
        "Syntax": "Disable-DbaAgHadr [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Credential] \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Disable-DbaForceNetworkEncryption",
        "Description": "Disables Force Encryption for a SQL Server instance. Note that this requires access to the Windows Server, not the SQL instance itself.\n\nThis setting is found in Configuration Manager.",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Disables Force Encryption for a SQL Server instance",
        "Name": "Disable-DbaForceNetworkEncryption",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eDisable-DbaForceNetworkEncryption\nDisables Force Encryption on the default (MSSQLSERVER) instance on localhost - requires (and checks for) RunAs admin.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eDisable-DbaForceNetworkEncryption -SqlInstance sql01\\SQL2008R2SP2\nDisables Force Network Encryption for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both login and modify the registry.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eDisable-DbaForceNetworkEncryption -SqlInstance sql01\\SQL2008R2SP2 -WhatIf\nShows what would happen if the command were executed.",
        "Syntax": "Disable-DbaForceNetworkEncryption [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Disable-DbaTraceFlag",
        "Description": "The function will disable a Trace Flag that is currently running globally on the SQL Server instance(s) listed",
        "Tags": "TraceFlag",
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Disable a Global Trace Flag that is currently running",
        "Name": "Disable-DbaTraceFlag",
        "Links": "https://dbatools.io/Disable-DbaTraceFlag",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eDisable-DbaTraceFlag -SqlInstance sql2016 -TraceFlag 3226\nDisable the globally running trace flag 3226 on SQL Server instance sql2016",
        "Syntax": "Disable-DbaTraceFlag [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -TraceFlag \u003cInt32[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Dismount-DbaDatabase",
        "Description": "This command detaches one or more SQL Server databases. If necessary, -Force can be used to break mirrors and remove databases from availability groups prior to detaching.",
        "Tags": "Database",
        "Alias": "Detach-DbaDatabase",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Detach a SQL Server Database.",
        "Name": "Dismount-DbaDatabase",
        "Links": "https://dbatools.io/Dismount-DbaDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eDetach-DbaDatabase -SqlInstance sql2016b -Database SharePoint_Config, WSS_Logging\nDetaches SharePoint_Config and WSS_Logging from sql2016b\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2016b -Database \u0027PerformancePoint Service Application_10032db0fa0041df8f913f558a5dc0d4\u0027 | Detach-DbaDatabase -Force\nDetaches \u0027PerformancePoint Service Application_10032db0fa0041df8f913f558a5dc0d4\u0027 from sql2016b. Since Force was specified, if the database is part of mirror, the mirror will be broken prior to \r\ndetaching.\nIf the database is part of an Availability Group, it will first be dropped prior to detachment.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2016b -Database WSS_Logging | Detach-DbaDatabase -Force -WhatIf\nShows what would happen if the command were to execute (without actually executing the detach/break/remove commands).",
        "Syntax": "Dismount-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-UpdateStatistics] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nDismount-DbaDatabase -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Database \u003cString\u003e [-UpdateStatistics] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nDismount-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] -InputObject \u003cDatabase[]\u003e [-UpdateStatistics] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Enable-DbaAgHadr",
        "Description": "In order to build an AG a cluster has to be built and then the Hadr enabled for the SQL Server\nservice. This function enables that feature for the SQL Server service.",
        "Tags": [
                     "Hadr",
                     "HA",
                     "AG",
                     "AvailabilityGroup"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), http://wsmelton.github.io",
        "Synopsis": "Enables the Hadr service setting on the specified SQL Server.",
        "Name": "Enable-DbaAgHadr",
        "Links": "https://dbatools.io/Enable-DbaAgHadr",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eEnable-DbaAgHadr -SqlInstance sql2016 -Force\nSets Hadr service to enabled for the instance sql2016, and restart the service to apply the change.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eEnable-DbaAgHadr -SqlInstance sql2012\\dev1 -Force\nSets Hadr service to disabled for the instance dev1 on sq2012, and restart the service to apply the change.",
        "Syntax": "Enable-DbaAgHadr [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Credential] \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Enable-DbaForceNetworkEncryption",
        "Description": "Enables Force Encryption for a SQL Server instance. Note that this requires access to the Windows Server, not the SQL instance itself.\n\nThis setting is found in Configuration Manager.",
        "Tags": [
                     "Certificate",
                     "Encryption"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Enables Force Encryption for a SQL Server instance.",
        "Name": "Enable-DbaForceNetworkEncryption",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eEnable-DbaForceNetworkEncryption\nEnables Force Encryption on the default (MSSQLSERVER) instance on localhost. Requires (and checks for) RunAs admin.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eEnable-DbaForceNetworkEncryption -SqlInstance sql01\\SQL2008R2SP2\nEnables Force Network Encryption for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both connect and modify the registry.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eEnable-DbaForceNetworkEncryption -SqlInstance sql01\\SQL2008R2SP2 -WhatIf\nShows what would happen if the command were executed.",
        "Syntax": "Enable-DbaForceNetworkEncryption [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Enable-DbaTraceFlag",
        "Description": "The function will set one or multiple trace flags on the SQL Server instance(s) listed",
        "Tags": "TraceFlag",
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Enable Global Trace Flag(s)",
        "Name": "Enable-DbaTraceFlag",
        "Links": "https://dbatools.io/Enable-DbaTraceFlag",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eEnable-DbaTraceFlag -SqlInstance sql2016 -TraceFlag 3226\nEnable the trace flag 3226 on SQL Server instance sql2016\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eEnable-DbaTraceFlag -SqlInstance sql2016 -TraceFlag 1117, 1118\nEnable multiple trace flags on SQL Server instance sql2016",
        "Syntax": "Enable-DbaTraceFlag [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -TraceFlag \u003cInt32[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Expand-DbaTLogResponsibly",
        "Description": "As you may already know, having a transaction log file with too many Virtual Log Files (VLFs) can hurt your database performance in many ways.\n\nExample:\nToo many VLFs can cause transaction log backups to slow down and can also slow down database recovery and, in extreme cases, even impact insert/update/delete performance.\n\nReferences:\nhttp://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/\nhttp://blogs.msdn.com/b/saponsqlserver/archive/2012/02/22/too-many-virtual-log-files-vlfs-can-cause-slow-database-recovery.aspx\nhttp://www.brentozar.com/blitz/high-virtual-log-file-vlf-count/\n\nIn order to get rid of this fragmentation we need to grow the file taking the following into consideration:\n- How many VLFs are created when we perform a grow operation or when an auto-grow is invoked?\n\nNote: In SQL Server 2014 this algorithm has changed (http://www.sqlskills.com/blogs/paul/important-change-vlf-creation-algorithm-sql-server-2014/)\n\nAttention:\nWe are growing in MB instead of GB because of known issue prior to SQL 2012:\nMore detail here:\nhttp://www.sqlskills.com/BLOGS/PAUL/post/Bug-log-file-growth-broken-for-multiples-of-4GB.aspx\nand\nhttp://connect.microsoft.com/SqlInstance/feedback/details/481594/log-growth-not-working-properly-with-specific-growth-sizes-vlfs-also-not-created-appropriately\nor\nhttps://connect.microsoft.com/SqlInstance/feedback/details/357502/transaction-log-file-size-will-not-grow-exactly-4gb-when-filegrowth-4gb\n\nUnderstanding related problems:\nhttp://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/\nhttp://blogs.msdn.com/b/saponsqlserver/archive/2012/02/22/too-many-virtual-log-files-vlfs-can-cause-slow-database-recovery.aspx\nhttp://www.brentozar.com/blitz/high-virtual-log-file-vlf-count/\n\nKnown bug before SQL Server 2012\nhttp://www.sqlskills.com/BLOGS/PAUL/post/Bug-log-file-growth-broken-for-multiples-of-4GB.aspx\nhttp://connect.microsoft.com/SqlInstance/feedback/details/481594/log-growth-not-working-properly-with-specific-growth-sizes-vlfs-also-not-created-appropriately\nhttps://connect.microsoft.com/SqlInstance/feedback/details/357502/transaction-log-file-size-will-not-grow-exactly-4gb-when-filegrowth-4gb\n\nHow it works?\nThe transaction log will grow in chunks until it reaches the desired size.\nExample: If you have a log file with 8192MB and you say that the target size is 81920MB (80GB) it will grow in chunks of 8192MB until it reaches 81920MB. 8192 -\u003e 16384 -\u003e 24576 ... 73728 -\u003e 81920",
        "Tags": [
                     "Storage",
                     "Backup"
                 ],
        "Alias": "Expand-SqlTLogResponsibly",
        "Author": "Claudio Silva (@ClaudioESSilva)",
        "Synopsis": "This command will help you to automatically grow your transaction log file in a responsible way (preventing the generation of too many VLFs).",
        "Name": "Expand-DbaTLogResponsibly",
        "Links": "https://dbatools.io/Expand-DbaTLogResponsibly",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExpand-DbaTLogResponsibly -SqlInstance sqlcluster -Database db1 -TargetLogSizeMB 50000\nGrows the transaction log for database db1 on sqlcluster to 50000 MB and calculates the increment size.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExpand-DbaTLogResponsibly -SqlInstance sqlcluster -Database db1, db2 -TargetLogSizeMB 10000 -IncrementSizeMB 200\nGrows the transaction logs for databases db1 and db2 on sqlcluster to 1000MB and sets the growth increment to 200MB.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eExpand-DbaTLogResponsibly -SqlInstance sqlcluster -Database db1 -TargetLogSizeMB 10000 -LogFileId 9\nGrows the transaction log file with FileId 9 of the db1 database on sqlcluster instance to 10000MB.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eExpand-DbaTLogResponsibly -SqlInstance sqlcluster -Database (Get-Content D:\\DBs.txt) -TargetLogSizeMB 50000\nGrows the transaction log of the databases specified in the file \u0027D:\\DBs.txt\u0027 on sqlcluster instance to 50000MB.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eExpand-DbaTLogResponsibly -SqlInstance SqlInstance -Database db1,db2 -TargetLogSizeMB 100 -IncrementSizeMB 10 -ShrinkLogFile -ShrinkSizeMB 10 -BackupDirectory R:\\MSSQL\\Backup\nGrows the transaction logs for databases db1 and db2 on SQL server SQLInstance to 100MB, sets the incremental growth to 10MB, shrinks the transaction log to 10MB and uses the directory \r\nR:\\MSSQL\\Backup for the required backups.",
        "Syntax": "Expand-DbaTLogResponsibly [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-TargetLogSizeMB] \u003cInt32\u003e [[-IncrementSizeMB] \u003cInt32\u003e] [[-LogFileId] \u003cInt32\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nExpand-DbaTLogResponsibly [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-TargetLogSizeMB] \u003cInt32\u003e [[-IncrementSizeMB] \u003cInt32\u003e] [[-LogFileId] \u003cInt32\u003e] [-ShrinkLogFile] [-ShrinkSizeMB] \u003cInt32\u003e [[-BackupDirectory] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaAvailabilityGroup",
        "Description": "Exports SQL Server Availability Groups creation scripts to a T-SQL file. This is a function that is not available in SSMS.",
        "Tags": [
                     "Hadr",
                     "HA",
                     "AG",
                     "AvailabilityGroup"
                 ],
        "Alias": "",
        "Author": "Chris Sommer (@cjsommer), cjsommer.com",
        "Synopsis": "Exports SQL Server Availability Groups to a T-SQL file.",
        "Name": "Export-DbaAvailabilityGroup",
        "Links": "https://dbatools.io/Export-DbaAvailabilityGroup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaAvailabilityGroup -SqlInstance sql2012\nExports all Availability Groups from SQL server \"sql2012\". Output scripts are written to the Documents\\SqlAgExports directory by default.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExport-DbaAvailabilityGroup -SqlInstance sql2012 -Path C:\\temp\\availability_group_exports\nExports all Availability Groups from SQL server \"sql2012\". Output scripts are written to the C:\\temp\\availability_group_exports directory.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eExport-DbaAvailabilityGroup -SqlInstance sql2012 -Path \u0027C:\\dir with spaces\\availability_group_exports\u0027 -AvailabilityGroups AG1,AG2\nExports Availability Groups AG1 and AG2 from SQL server \"sql2012\". Output scripts are written to the C:\\dir with spaces\\availability_group_exports directory.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eExport-DbaAvailabilityGroup -SqlInstance sql2014 -Path C:\\temp\\availability_group_exports -NoClobber\nExports all Availability Groups from SQL server \"sql2014\". Output scripts are written to the C:\\temp\\availability_group_exports directory. If the export file already exists it will not be overwritten.",
        "Syntax": "Export-DbaAvailabilityGroup [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-AvailabilityGroup] \u003cObject[]\u003e] [[-ExcludeAvailabilityGroup] \u003cObject[]\u003e] [[-Path] \u003cString\u003e] [-NoClobber] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaCmsRegServer",
        "Description": "Exports registered servers and registered server groups to file",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Export-DbaRegisteredServer",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports registered servers and registered server groups to file",
        "Name": "Export-DbaCmsRegServer",
        "Links": "https://dbatools.io/Export-DbaCmsRegServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaCmsRegServer -SqlInstance sql2008\nExports all Registered Server and Registered Server Groups on sql2008 to an automatically generated file name in the current directory\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExport-DbaCmsRegServer -SqlInstance sql2008 -Group hr\\Seattle -Path C:\\temp\\Seattle.xml\nExports all Registered Server and Registered Server Groups with the Seattle group within the HR group on sql2008 to C:\\temp\\Seattle.xml\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2008, sql2012 | Export-DbaCmsRegServer\nExports all registered servers on sql2008 and sql2012. Warning - each one will have its own individual file. Consider piping groups.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sql2008, sql2012 | Export-DbaCmsRegServer\nExports all registered servers on sql2008 and sql2012, organized by group.",
        "Syntax": "Export-DbaCmsRegServer [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-InputObject] \u003cObject[]\u003e] [[-Path] \u003cString\u003e] [[-CredentialPersistenceType] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaCredential",
        "Description": "Exports credentials INCLUDING PASSWORDS, unless specified otherwise, to sql file.\n\nRequires remote Windows access if exporting the password.",
        "Tags": "Credential",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports credentials INCLUDING PASSWORDS, unless specified otherwise, to sql file.",
        "Name": "Export-DbaCredential",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaCredential -SqlInstance sql2017 -Path C:\\temp\\cred.sql\nExports credentials, including passwords, from sql2017 to the file C:\\temp\\cred.sql",
        "Syntax": "Export-DbaCredential [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Identity] \u003cString[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Path] \u003cString\u003e] [-ExcludePassword] [-Append] [[-InputObject] \u003cCredential[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaDacPackage",
        "Description": "Using SQLPackage, export a dacpac from an instance of SQL Server.\n\nNote - Extract from SQL Server is notoriously flaky - for example if you have three part references to external databases it will not work.\n\nFor help with the extract action parameters and properties, refer to https://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx",
        "Tags": [
                     "Migration",
                     "Database",
                     "Dacpac"
                 ],
        "Alias": "Export-DbaDacpac",
        "Author": "Richie lee (@richiebzzzt)",
        "Synopsis": "Exports a dacpac from a server.",
        "Name": "Export-DbaDacPackage",
        "Links": "https://dbatools.io/Export-DbaDacPackage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaDacPackage -SqlInstance sql2016 -Database SharePoint_Config\nExports the dacpac for SharePoint_Config on sql2016 to $home\\Documents\\SharePoint_Config.dacpac\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$moreprops = \"/p:VerifyExtraction=$true /p:CommandTimeOut=10\"\nPS C:\\\u003e Export-DbaDacPackage -SqlInstance sql2016 -Database SharePoint_Config -Path C:\\temp -ExtendedProperties $moreprops\nSets the CommandTimeout to 10 then extracts the dacpac for SharePoint_Config on sql2016 to C:\\temp\\SharePoint_Config.dacpac then verifies extraction.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eExport-DbaDacPackage -SqlInstance sql2016 -AllUserDatabases -ExcludeDatabase \"DBMaintenance\",\"DBMonitoring\" C:\\temp\nExports dacpac packages for all USER databases, excluding \"DBMaintenance\" \u0026 \"DBMonitoring\", on sql2016 and saves them to C:\\temp\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$moreparams = \"/OverwriteFiles:$true /Quiet:$true\"\nPS C:\\\u003e Export-DbaDacPackage -SqlInstance sql2016 -Database SharePoint_Config -Path C:\\temp -ExtendedParameters $moreparams\nUsing extended parameters to over-write the files and performs the extraction in quiet mode.",
        "Syntax": "Export-DbaDacPackage [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-AllUserDatabases] [[-Path] \u003cString\u003e] [[-ExtendedParameters] \u003cString\u003e] [[-ExtendedProperties] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaDiagnosticQuery",
        "Description": "The default output format of Invoke-DbaDiagnosticQuery is a custom object. It can also output to CSV and Excel.\nHowever, CSV output can generate a lot of files and Excel output depends on the ImportExcel module by Doug Finke (https://github.com/dfinke/ImportExcel)\nExport-DbaDiagnosticQuery can be used to convert from the default export type to the other available export types.",
        "Tags": "Query",
        "Alias": "",
        "Author": "Andre Kamman (@AndreKamman), http://clouddba.io",
        "Synopsis": "Export-DbaDiagnosticQuery can convert output generated by Invoke-DbaDiagnosticQuery to CSV or Excel",
        "Name": "Export-DbaDiagnosticQuery",
        "Links": "https://dbatools.io/Export-DbaDiagnosticQuery",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaDiagnosticQuery -SqlInstance sql2016 | Export-DbaDiagnosticQuery -Path c:\\temp\nConverts output from Invoke-DbaDiagnosticQuery to multiple CSV files\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$output = Invoke-DbaDiagnosticQuery -SqlInstance sql2016\nPS C:\\\u003e Export-DbaDiagnosticQuery -InputObject $output -ConvertTo Excel\nConverts output from Invoke-DbaDiagnosticQuery to Excel worksheet(s) in the Documents folder",
        "Syntax": "Export-DbaDiagnosticQuery [-InputObject] \u003cObject[]\u003e [[-ConvertTo] \u003cString\u003e] [[-Path] \u003cFileInfo\u003e] [[-Suffix] \u003cString\u003e] [-NoPlanExport] [-NoQueryExport] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaExecutionPlan",
        "Description": "Exports execution plans to disk. Can pipe from Get-DbaExecutionPlan\n\nThanks to\nhttps://www.simple-talk.com/sql/t-sql-programming/dmvs-for-query-plan-metadata/\nand\nhttp://www.scarydba.com/2017/02/13/export-plans-cache-sqlplan-file/\nfor the idea and query.",
        "Tags": [
                     "Performance",
                     "ExecutionPlan"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports execution plans to disk.",
        "Name": "Export-DbaExecutionPlan",
        "Links": "https://dbatools.io/Export-DbaExecutionPlan",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaExecutionPlan -SqlInstance sqlserver2014a -Path C:\\Temp\nExports all execution plans for sqlserver2014a. Files saved in to C:\\Temp\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExport-DbaExecutionPlan -SqlInstance sqlserver2014a -Database db1, db2 -SinceLastExecution \u00272016-07-01 10:47:00\u0027 -Path C:\\Temp\nExports all execution plans for databases db1 and db2 on sqlserver2014a since July 1, 2016 at 10:47 AM. Files saved in to C:\\Temp\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaExecutionPlan -SqlInstance sqlserver2014a | Export-DbaExecutionPlan -Path C:\\Temp\nGets all execution plans for sqlserver2014a. Using Pipeline exports them all to C:\\Temp\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaExecutionPlan -SqlInstance sqlserver2014a | Export-DbaExecutionPlan -Path C:\\Temp -WhatIf\nGets all execution plans for sqlserver2014a. Then shows what would happen if the results where piped to Export-DbaExecutionPlan",
        "Syntax": "Export-DbaExecutionPlan [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nExport-DbaExecutionPlan -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] -Path \u003cString\u003e [-SinceCreation \u003cDateTime\u003e] [-SinceLastExecution \u003cDateTime\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nExport-DbaExecutionPlan [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] -Path \u003cString\u003e -PipedObject \u003cObject[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaInstance",
        "Description": "Export-DbaInstance consolidates most of the export scripts in dbatools into one command.\n\nThis is useful when you\u0027re looking to Export entire instances. It less flexible than using the underlying functions.\nThink of it as an easy button. Unless an -Exclude is specified, it exports:\n\nAll databases.\nAll logins.\nAll database mail objects.\nAll credentials.\nAll objects within the Job Server (SQL Agent).\nAll linked servers.\nAll groups and servers within Central Management Server.\nAll SQL Server configuration objects (everything in sp_configure).\nAll user objects in system databases.\nAll system triggers.\nAll system backup devices.\nAll Audits.\nAll Endpoints.\nAll Extended Events.\nAll Policy Management objects.\nAll Resource Governor objects.\nAll Server Audit Specifications.\nAll Custom Errors (User Defined Messages).\nAll Server Roles.\nAll Availability Groups.",
        "Tags": "Export",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports SQL Server *ALL* databases, logins, database mail profiles/accounts, credentials, SQL Agent objects, linked servers,\nCentral Management Server objects, server configuration settings (sp_configure), user objects in systems databases,\nsystem triggers and backup devices from one SQL Server to another.\n\nFor more granular control, please use one of the -Exclude parameters and use the other functions available within the dbatools module.",
        "Name": "Export-DbaInstance",
        "Links": "https://dbatools.io/Export-DbaInstance",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaInstance -SqlInstance sqlserver\\instance\nAll databases, logins, job objects and sp_configure options will be exported from\r\nsqlserver\\instance to an automatically generated folder name in Documents.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExport-DbaInstance -SqlInstance sqlcluster -Exclude Databases, Logins -Path C:\\dr\\sqlcluster\nExports everything but logins and database restore scripts to C:\\dr\\sqlcluster",
        "Syntax": "Export-DbaInstance [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Path] \u003cString\u003e] [-NoRecovery] [-IncludeDbMasterKey] [[-Exclude] \u003cString[]\u003e] [[-BatchSeparator] \u003cString\u003e] [[-ScriptingOption] \u003cScriptingOptions\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaLinkedServer",
        "Description": "Exports linked servers INCLUDING PASSWORDS, unless specified otherwise, to sql file.\n\nRequires remote Windows access if exporting the password.",
        "Tags": "LinkedServer",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports linked servers INCLUDING PASSWORDS, unless specified otherwise, to sql file.",
        "Name": "Export-DbaLinkedServer",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaLinkedServer -SqlInstance sql2017 -Path C:\\temp\\ls.sql\nExports the linked servers, including passwords, from sql2017 to the file C:\\temp\\ls.sql\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExport-DbaLinkedServer -SqlInstance sql2017 -Path C:\\temp\\ls.sql -ExcludePassword\nExports the linked servers, without passwords, from sql2017 to the file C:\\temp\\ls.sql",
        "Syntax": "Export-DbaLinkedServer [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-LinkedServer] \u003cString[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Path] \u003cString\u003e] [-ExcludePassword] [-Append] [[-InputObject] \u003cLinkedServer[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaLogin",
        "Description": "Exports Windows and SQL Logins to a T-SQL file. Export includes login, SID, password, default database, default language, server permissions, server roles, db permissions, db roles.",
        "Tags": [
                     "Export",
                     "Login"
                 ],
        "Alias": "Export-SqlLogin",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports Windows and SQL Logins to a T-SQL file. Export includes login, SID, password, default database, default language, server permissions, server roles, db permissions, db roles.",
        "Name": "Export-DbaLogin",
        "Links": "https://dbatools.io/Export-DbaLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaLogin -SqlInstance sql2005 -Path C:\\temp\\sql2005-logins.sql\nExports the logins for SQL Server \"sql2005\" and writes them to the file \"C:\\temp\\sql2005-logins.sql\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExport-DbaLogin -SqlInstance sqlserver2014a -Exclude realcajun -SqlCredential $scred -Path C:\\temp\\logins.sql -Append\nAuthenticates to sqlserver2014a using SQL Authentication. Exports all logins except for realcajun to C:\\temp\\logins.sql, and appends to the file if it exists. If not, the file will be created.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eExport-DbaLogin -SqlInstance sqlserver2014a -Login realcajun, netnerds -Path C:\\temp\\logins.sql\nExports ONLY logins netnerds and realcajun FROM sqlserver2014a to the file C:\\temp\\logins.sql\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eExport-DbaLogin -SqlInstance sqlserver2014a -Login realcajun, netnerds -Database HR, Accounting\nExports ONLY logins netnerds and realcajun FROM sqlserver2014a with the permissions on databases HR and Accounting\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eExport-DbaLogin -SqlInstance sqlserver2008 -Login realcajun, netnerds -Path C:\\temp\\login.sql -ExcludeGoBatchSeparator\nExports ONLY logins netnerds and realcajun FROM sqlserver2008 server, to the C:\\temp\\login.sql file without the \u0027GO\u0027 batch separator.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eExport-DbaLogin -SqlInstance sqlserver2008 -Login realcajun -Path C:\\temp\\users.sql -DestinationVersion SQLServer2016\nExports login realcajun from sqlsever2008 to the file C:\\temp\\users.sql with syntax to run on SQL Server 2016",
        "Syntax": "Export-DbaLogin [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Login] \u003cObject[]\u003e] [[-ExcludeLogin] \u003cObject[]\u003e] [[-Database] \u003cObject[]\u003e] [[-Path] \u003cString\u003e] [-NoClobber] [-Append] [-NoDatabases] [-NoJobs] [-EnableException] [-ExcludeGoBatchSeparator] [[-DestinationVersion] \u003cString\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaPfDataCollectorSetTemplate",
        "Description": "Exports a Data Collector Set XML Template from Get-DbaPfDataCollectorSet. Exports to \"$home\\Documents\\Performance Monitor Templates\" by default.",
        "Tags": [
                     "Performance",
                     "DataCollector"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports a new Data Collector Set XML Template.",
        "Name": "Export-DbaPfDataCollectorSetTemplate",
        "Links": "https://dbatools.io/Export-DbaPfDataCollectorSetTemplate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Path C:\\temp\\pf\nExports all data collector sets from to the C:\\temp\\pf folder.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet ComputerName sql2017 -CollectorSet \u0027System Correlation\u0027 | Export-DbaPfDataCollectorSetTemplate -Path C:\\temp\nExports the \u0027System Correlation\u0027 data collector set from sql2017 to C:\\temp.",
        "Syntax": "Export-DbaPfDataCollectorSetTemplate [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-Path] \u003cString\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaRepServerSetting",
        "Description": "Exports replication server settings to file.",
        "Tags": "Replication",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports replication server settings to file.",
        "Name": "Export-DbaRepServerSetting",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaRepServerSetting -SqlInstance sql2017 -Path C:\\temp\\replication.sql\nExports the replication settings on sql2017 to the file C:\\temp\\replication.sql\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaRepServer -SqlInstance sql2017 | Export-DbaRepServerSettings -Path C:\\temp\\replication.sql\nExports the replication settings on sql2017 to the file C:\\temp\\replication.sql",
        "Syntax": "Export-DbaRepServerSetting [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Path] \u003cString\u003e] [[-ScriptOption] \u003cObject[]\u003e] [[-InputObject] \u003cReplicationServer[]\u003e] [[-Encoding] \u003cString\u003e] [-Passthru] [-NoClobber] [-Append] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaScript",
        "Description": "Exports scripts from SQL Management Objects",
        "Tags": [
                     "Migration",
                     "Backup",
                     "Export"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports scripts from SQL Management Objects (SMO)",
        "Name": "Export-DbaScript",
        "Links": "https://dbatools.io/Export-DbaScript",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance sql2016 | Export-DbaScript\nExports all jobs on the SQL Server sql2016 instance using a trusted connection - automatically determines filename as .\\sql2016-Job-Export-date.sql\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance sql2016 | Export-DbaScript -Path C:\\temp\\export.sql -Append\nExports all jobs on the SQL Server sql2016 instance using a trusted connection - Will append the output to the file C:\\temp\\export.sql if it already exists\r\nScript does not include Batch Separator and will not compile\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbTable -SqlInstance sql2016 -Database MyDatabase -Table \u0027dbo.Table1\u0027, \u0027dbo.Table2\u0027 -SqlCredential sqladmin | Export-DbaScript -Path C:\\temp\\export.sql\nExports only script for \u0027dbo.Table1\u0027 and \u0027dbo.Table2\u0027 in MyDatabase to C:temp\\export.sql and uses the SQL login \"sqladmin\" to login to sql2016\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance sql2016 -Job syspolicy_purge_history, \u0027Hourly Log Backups\u0027 -SqlCredential sqladmin | Export-DbaScript -Path C:\\temp\\export.sql -NoPrefix\nExports only syspolicy_purge_history and \u0027Hourly Log Backups\u0027 to C:temp\\export.sql and uses the SQL login \"sqladmin\" to login to sql2016\r\nSuppress the output of a Prefix\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$options = New-DbaScriptingOption\nPS C:\\\u003e $options.ScriptSchema = $true\r\nPS C:\\\u003e $options.IncludeDatabaseContext = $true\r\nPS C:\\\u003e $options.IncludeHeaders = $false\r\nPS C:\\\u003e $Options.NoCommandTerminator = $false\r\nPS C:\\\u003e $Options.ScriptBatchTerminator = $true\r\nPS C:\\\u003e $Options.AnsiFile = $true\r\nPS C:\\\u003e Get-DbaAgentJob -SqlInstance sql2016 -Job syspolicy_purge_history, \u0027Hourly Log Backups\u0027 -SqlCredential sqladmin | Export-DbaScript -Path C:\\temp\\export.sql -ScriptingOptionsObject $options\nExports only syspolicy_purge_history and \u0027Hourly Log Backups\u0027 to C:temp\\export.sql and uses the SQL login \"sqladmin\" to login to sql2016\r\nAppends a batch separator at end of each script.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance sql2014 | Export-DbaScript -Passthru | ForEach-Object { $_.Replace(\u0027sql2014\u0027,\u0027sql2016\u0027) } | Set-Content -Path C:\\temp\\export.sql\nExports jobs and replaces all instances of the servername \"sql2014\" with \"sql2016\" then writes to C:\\temp\\export.sql\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$options = New-DbaScriptingOption\nPS C:\\\u003e $options.ScriptSchema = $true\r\nPS C:\\\u003e $options.IncludeDatabaseContext = $true\r\nPS C:\\\u003e $options.IncludeHeaders = $false\r\nPS C:\\\u003e $Options.NoCommandTerminator = $false\r\nPS C:\\\u003e $Options.ScriptBatchTerminator = $true\r\nPS C:\\\u003e $Options.AnsiFile = $true\r\nPS C:\\\u003e $Databases = Get-DbaDatabase -SqlInstance sql2016 -ExcludeDatabase master, model, msdb, tempdb\r\nPS C:\\\u003e foreach ($db in $Databases) {\r\n\u003e\u003e Export-DbaScript -InputObject $db -Path C:\\temp\\export.sql -Append -Encoding UTF8 -ScriptingOptionsObject $options -NoPrefix\r\n\u003e\u003e }\nExports Script for each database on sql2016 excluding system databases\r\nUses Scripting options to ensure Batch Terminator is set\r\nWill append the output to the file C:\\temp\\export.sql if it already exists",
        "Syntax": "Export-DbaScript [-InputObject] \u003cObject[]\u003e [[-ScriptingOptionsObject] \u003cScriptingOptions\u003e] [[-Path] \u003cString\u003e] [[-Encoding] \u003cString\u003e] [[-BatchSeparator] \u003cString\u003e] [-NoPrefix] [-Passthru] [-NoClobber] [-Append] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaSpConfigure",
        "Description": "Exports advanced sp_configure global configuration options to sql file.",
        "Tags": [
                     "SpConfig",
                     "Configure",
                     "Configuration"
                 ],
        "Alias": "Export-SqlSpConfigure",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports advanced sp_configure global configuration options to sql file.",
        "Name": "Export-DbaSpConfigure",
        "Links": "https://dbatools.io/Export-DbaSpConfigure",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaSpConfigure -SqlInstance sourceserver\nExports the SPConfigure settings on sourceserver. As no Path was defined outputs to My Documents folder with default name format of Servername-MMDDYYYYhhmmss-sp_configure.sql\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExport-DbaSpConfigure -SqlInstance sourceserver -Path C:\\temp\nExports the SPConfigure settings on sourceserver to the directory C:\\temp using the default name format\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$cred = Get-Credential sqladmin\nPS C:\\\u003e Export-DbaSpConfigure -SqlInstance sourceserver -SqlCredential $cred -Path C:\\temp\\sp_configure.sql\nExports the SPConfigure settings on sourceserver to the file C:\\temp\\sp_configure.sql. Uses SQL Authentication to connect. Will require SysAdmin rights if needs to set \u0027show advanced options\u0027\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e\u0027Server1\u0027, \u0027Server2\u0027 | Export-DbaSpConfigure -Path C:\\temp\\configure.sql\nExports the SPConfigure settings for Server1 and Server2 using pipeline. As more than 1 Server adds prefix of Servername and date to the file name and saves to file like \r\nC:\\temp\\Servername-MMDDYYYYhhmmss-configure.sql",
        "Syntax": "Export-DbaSpConfigure [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Path] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaUser",
        "Description": "Exports users creation and its permissions to a T-SQL file or host. Export includes user, create and add to role(s), database level permissions, object level permissions.",
        "Tags": [
                     "User",
                     "Export"
                 ],
        "Alias": "Export-SqlUser",
        "Author": "Claudio Silva (@ClaudioESSilva)",
        "Synopsis": "Exports users creation and its permissions to a T-SQL file or host.",
        "Name": "Export-DbaUser",
        "Links": "https://dbatools.io/Export-DbaUser",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaUser -SqlInstance sql2005 -Path C:\\temp\\sql2005-users.sql\nExports SQL for the users in server \"sql2005\" and writes them to the file \"C:\\temp\\sql2005-users.sql\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eExport-DbaUser -SqlInstance sqlserver2014a $scred -Path C:\\temp\\users.sql -Append\nAuthenticates to sqlserver2014a using SQL Authentication. Exports all users to C:\\temp\\users.sql, and appends to the file if it exists. If not, the file will be created.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eExport-DbaUser -SqlInstance sqlserver2014a -User User1, User2 -Path C:\\temp\\users.sql\nExports ONLY users User1 and User2 from sqlsever2014a to the file C:\\temp\\users.sql\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eExport-DbaUser -SqlInstance sqlserver2008 -User User1 -Path C:\\temp\\users.sql -DestinationVersion SQLServer2016\nExports user User1 from sqlsever2008 to the file C:\\temp\\users.sql with syntax to run on SQL Server 2016\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eExport-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -Path C:\\temp\\users.sql\nExports ONLY users from db1 and db2 database on sqlserver2008 server, to the C:\\temp\\users.sql file.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$options = New-DbaScriptingOption\nPS C:\\\u003e $options.ScriptDrops = $false\r\nPS C:\\\u003e $options.WithDependencies = $true\r\nPS C:\\\u003e Export-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -Path C:\\temp\\users.sql -ScriptingOptionsObject $options\nExports ONLY users from db1 and db2 database on sqlserver2008 server, to the C:\\temp\\users.sql file.\r\nIt will not script drops but will script dependencies.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eExport-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -Path C:\\temp\\users.sql -ExcludeGoBatchSeparator\nExports ONLY users from db1 and db2 database on sqlserver2008 server, to the C:\\temp\\users.sql file without the \u0027GO\u0027 batch separator.",
        "Syntax": "Export-DbaUser [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-User] \u003cObject[]\u003e] [[-DestinationVersion] \u003cString\u003e] [[-Path] \u003cString\u003e] [-NoClobber] [-Append] [-EnableException] [[-ScriptingOptionsObject] \u003cScriptingOptions\u003e] [-ExcludeGoBatchSeparator] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaXECsv",
        "Description": "Exports Extended Events to a CSV file.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Gianluca Sartori (@spaghettidba)",
        "Synopsis": "Exports Extended Events to a CSV file.",
        "Name": "Export-DbaXECsv",
        "Links": "https://dbatools.io/Export-DbaXECsv",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-ChildItem -Path C:\\temp\\sample.xel | Export-DbaXECsv -Path c:\\temp\\sample.csv\nWrites Extended Events data to the file \"C:\\temp\\events.csv\".\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2014 -Session deadlocks | Export-DbaXECsv -Path c:\\temp\\events.csv\nWrites Extended Events data to the file \"C:\\temp\\events.csv\".",
        "Syntax": "Export-DbaXECsv [-InputObject] \u003cObject[]\u003e [-Path] \u003cString\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Export-DbaXESessionTemplate",
        "Description": "Exports an XESession XML Template either from the Target SQL Server or XE Session(s) output by Get-DbaXESession. Exports to \"$home\\Documents\\SQL Server Management Studio\\Templates\\XEventTemplates\" by default",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exports an XESession XML Template using XE Session(s) output by Get-DbaXESession",
        "Name": "Export-DbaXESessionTemplate",
        "Links": "https://dbatools.io/Export-DbaXESessionTemplate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eExport-DbaXESessionTemplate -SqlInstance sql2017 -Path C:\\temp\\xe\nExports an XESession XML Template for all Extended Event Sessions on sql2017 to the C:\\temp\\xe folder.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2017 -Session system_health | Export-DbaXESessionTemplate -Path C:\\temp\\xe\nGets the system_health Extended Events Session from sql2017 and then exports as an XESession XML Template to C:\\temp\\xe",
        "Syntax": "Export-DbaXESessionTemplate [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Session] \u003cObject[]\u003e] [[-Path] \u003cString\u003e] [[-InputObject] \u003cSession[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaAgentJob",
        "Description": "This command filters SQL Agent jobs giving the DBA a list of jobs that may need attention or could possibly be options for removal.",
        "Tags": [
                     "Agent",
                     "Job"
                 ],
        "Alias": "",
        "Author": "Stephen Bennett (https://sqlnotesfromtheunderground.wordpress.com/)",
        "Synopsis": "Find-DbaAgentJob finds agent job/s that fit certain search filters.",
        "Name": "Find-DbaAgentJob",
        "Links": "https://dbatools.io/Find-DbaAgentJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaAgentJob -SqlInstance Dev01 -JobName *backup*\nReturns all agent job(s) that have backup in the name\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaAgentJob -SqlInstance Dev01, Dev02 -JobName Mybackup\nReturns all agent job(s) that are named exactly Mybackup\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaAgentJob -SqlInstance Dev01 -LastUsed 10\nReturns all agent job(s) that have not ran in 10 days\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaAgentJob -SqlInstance Dev01 -IsDisabled -IsNoEmailNotification -IsNotScheduled\nReturns all agent job(s) that are either disabled, have no email notification or don\u0027t have a schedule. returned with detail\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$servers | Find-DbaAgentJob -IsFailed | Start-DbaAgentJob\nFinds all failed job then starts them. Consider using a -WhatIf at the end of Start-DbaAgentJob to see what it\u0027ll do first\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eFind-DbaAgentJob -SqlInstance Dev01 -LastUsed 10 -Exclude \"Yearly - RollUp Workload\", \"SMS - Notification\"\nReturns all agent jobs that have not ran in the last 10 days ignoring jobs \"Yearly - RollUp Workload\" and \"SMS - Notification\"\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eFind-DbaAgentJob -SqlInstance Dev01 -Category \"REPL-Distribution\", \"REPL-Snapshot\" | Format-Table -AutoSize -Wrap\nReturns all job/s on Dev01 that are in either category \"REPL-Distribution\" or \"REPL-Snapshot\"\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eFind-DbaAgentJob -SqlInstance Dev01, Dev02 -IsFailed -Since \u00272016-07-01 10:47:00\u0027\nReturns all agent job(s) on Dev01 and Dev02 that have failed since July of 2016 (and still have history in msdb)\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance CMSServer -Group Production | Find-DbaAgentJob -Disabled -IsNotScheduled | Format-Table -AutoSize -Wrap\nQueries CMS server to return all SQL instances in the Production folder and then list out all agent jobs that have either been disabled or have no schedule.",
        "Syntax": "Find-DbaAgentJob [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-JobName \u003cString[]\u003e] [-ExcludeJobName \u003cString[]\u003e] [-StepName \u003cString[]\u003e] [-LastUsed \u003cInt32\u003e] [-IsDisabled] [-IsFailed] [-IsNotScheduled] [-IsNoEmailNotification] [-Category \u003cString[]\u003e] [-Owner \u003cString\u003e] [-Since \u003cDateTime\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaBackup",
        "Description": "Provides all of the same functionality for finding SQL backups to remove from disk as a standard maintenance plan would.\n\nAs an addition you have the ability to check the Archive bit on files before deletion. This will allow you to ensure backups have been archived to your archive location before removal.",
        "Tags": "Backup",
        "Alias": "",
        "Author": "Chris Sommer (@cjsommer), www.cjsommer.com",
        "Synopsis": "Finds SQL Server backups on disk.",
        "Name": "Find-DbaBackup",
        "Links": "https://dbatools.io/Find-DbaBackup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaBackup -Path \u0027C:\\MSSQL\\SQL Backup\\\u0027 -BackupFileExtension trn -RetentionPeriod 48h\nSearches for all trn files in C:\\MSSQL\\SQL Backup\\ and all subdirectories that are more than 48 hours old will be included.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaBackup -Path \u0027C:\\MSSQL\\Backup\\\u0027 -BackupFileExtension bak -RetentionPeriod 7d -CheckArchiveBit\nSearches for all bak files in C:\\MSSQL\\Backup\\ and all subdirectories that are more than 7 days old will be included, but only if the files have been backed up to another location as verified by \r\nchecking the Archive bit.",
        "Syntax": "Find-DbaBackup [-Path] \u003cString\u003e [-BackupFileExtension] \u003cString\u003e [-RetentionPeriod] \u003cString\u003e [-CheckArchiveBit] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaCommand",
        "Description": "Finds dbatools commands searching through the inline help text, building a consolidated json index and querying it because Get-Help is too slow",
        "Tags": [
                     "Find",
                     "Help",
                     "Command"
                 ],
        "Alias": "",
        "Author": "Simone Bizzotto (@niphold)",
        "Synopsis": "Finds dbatools commands searching through the inline help text",
        "Name": "Find-DbaCommand",
        "Links": "https://dbatools.io/Find-DbaCommand",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaCommand \"snapshot\"\nFor lazy typers: finds all commands searching the entire help for \"snapshot\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaCommand -Pattern \"snapshot\"\nFor rigorous typers: finds all commands searching the entire help for \"snapshot\"\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaCommand -Tag copy\nFinds all commands tagged with \"copy\"\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaCommand -Tag copy,user\nFinds all commands tagged with BOTH \"copy\" and \"user\"\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eFind-DbaCommand -Author chrissy\nFinds every command whose author contains our beloved \"chrissy\"\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eFind-DbaCommand -Author chrissy -Tag copy\nFinds every command whose author contains our beloved \"chrissy\" and it tagged as \"copy\"\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eFind-DbaCommand -Pattern snapshot -Rebuild\nFinds all commands searching the entire help for \"snapshot\", rebuilding the index (good for developers)",
        "Syntax": "Find-DbaCommand [[-Pattern] \u003cString\u003e] [[-Tag] \u003cString[]\u003e] [[-Author] \u003cString\u003e] [[-MinimumVersion] \u003cString\u003e] [[-MaximumVersion] \u003cString\u003e] [-Rebuild] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaDatabase",
        "Description": "Allows you to search SQL Server instances for database that have either the same name, owner or service broker guid.\n\nThere a several reasons for the service broker guid not matching on a restored database primarily using alter database new broker. or turn off broker to return a guid of 0000-0000-0000-0000.",
        "Tags": "Database",
        "Alias": "",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Find database/s on multiple servers that match criteria you input",
        "Name": "Find-DbaDatabase",
        "Links": "https://dbatools.io/Find-DbaDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaDatabase -SqlInstance \"DEV01\", \"DEV02\", \"UAT01\", \"UAT02\", \"PROD01\", \"PROD02\" -Pattern Report\nReturns all database from the SqlInstances that have a database with Report in the name\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaDatabase -SqlInstance \"DEV01\", \"DEV02\", \"UAT01\", \"UAT02\", \"PROD01\", \"PROD02\" -Pattern TestDB -Exact | Select-Object *\nReturns all database from the SqlInstances that have a database named TestDB with a detailed output.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaDatabase -SqlInstance \"DEV01\", \"DEV02\", \"UAT01\", \"UAT02\", \"PROD01\", \"PROD02\" -Property ServiceBrokerGuid -Pattern \u0027-faeb-495a-9898-f25a782835f5\u0027 | Select-Object *\nReturns all database from the SqlInstances that have the same Service Broker GUID with a detailed output",
        "Syntax": "Find-DbaDatabase [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Property] \u003cString\u003e] [-Pattern] \u003cString\u003e [-Exact] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaDbGrowthEvent",
        "Description": "Finds any database AutoGrow events in the Default Trace.\n\nThe following events are included:\n92 - Data File Auto Grow\n93 - Log File Auto Grow\n94 - Data File Auto Shrink\n95 - Log File Auto Shrink",
        "Tags": [
                     "AutoGrow",
                     "Growth",
                     "Database"
                 ],
        "Alias": "Find-DbaDatabaseGrowthEvent",
        "Author": "Aaron Nelson",
        "Synopsis": "Finds any database AutoGrow events in the Default Trace.",
        "Name": "Find-DbaDbGrowthEvent",
        "Links": "https://dbatools.io/Find-DbaDatabaseGrowthEvent",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaDatabaseGrowthEvent -SqlInstance localhost\nReturns any database AutoGrow events in the Default Trace with UTC time for the instance for every database on the localhost instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaDatabaseGrowthEvent -SqlInstance localhost -UseLocalTime\nReturns any database AutoGrow events in the Default Trace with the local time of the instance for every database on the localhost instance.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaDatabaseGrowthEvent -SqlInstance ServerA\\SQL2016, ServerA\\SQL2014\nReturns any database AutoGrow events in the Default Traces for every database on ServerA\\sql2016 \u0026 ServerA\\SQL2014.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaDatabaseGrowthEvent -SqlInstance ServerA\\SQL2016 | Format-Table -AutoSize -Wrap\nReturns any database AutoGrow events in the Default Trace for every database on the ServerA\\SQL2016 instance in a table format.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eFind-DbaDatabaseGrowthEvent -SqlInstance ServerA\\SQL2016 -EventType Shrink\nReturns any database Auto Shrink events in the Default Trace for every database on the ServerA\\SQL2016 instance.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eFind-DbaDatabaseGrowthEvent -SqlInstance ServerA\\SQL2016 -EventType Growth -FileType Data\nReturns any database Auto Growth events on data files in the Default Trace for every database on the ServerA\\SQL2016 instance.",
        "Syntax": "Find-DbaDbGrowthEvent [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-EventType] \u003cString\u003e] [[-FileType] \u003cString\u003e] [-UseLocalTime] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaDisabledIndex",
        "Description": "This command will help you to find disabled indexes on a database or a list of databases.",
        "Tags": "Index",
        "Alias": "",
        "Author": "Jason Squires, sqlnotnull.com",
        "Synopsis": "Find Disabled indexes",
        "Name": "Find-DbaDisabledIndex",
        "Links": "https://dbatools.io/Find-DbadisabledIndex",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaDisabledIndex -SqlInstance sql2005\nGenerates the SQL statements to drop the selected disabled indexes on server \"sql2005\".\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaDisabledIndex -SqlInstance sqlserver2016 -SqlCredential $cred\nGenerates the SQL statements to drop the selected disabled indexes on server \"sqlserver2016\", using SQL Authentication to connect to the database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaDisabledIndex -SqlInstance sqlserver2016 -Database db1, db2\nGenerates the SQL Statement to drop selected indexes in databases db1 \u0026 db2 on server \"sqlserver2016\".\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaDisabledIndex -SqlInstance sqlserver2016\nGenerates the SQL statements to drop selected indexes on all user databases.",
        "Syntax": "Find-DbaDisabledIndex [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-NoClobber] [-Append] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaDuplicateIndex",
        "Description": "This command will help you to find duplicate and overlapping indexes on a database or a list of databases.\nOn SQL Server 2008 and higher, the IsFiltered property will also be checked\nAlso tells how much space you can save by dropping the index.\nWe show the type of compression so you can make a more considered decision.\nFor now only supports CLUSTERED and NONCLUSTERED indexes.\nYou can select the indexes you want to drop on the grid view and when clicking OK, the DROP statement will be generated.\n\nOutput:\nTableName\nIndexName\nKeyColumns\nIncludedColumns\nIndexSizeMB\nIndexType\nCompressionDescription (When 2008+)\n[RowCount]\nIsDisabled\nIsFiltered (When 2008+)",
        "Tags": "Index",
        "Alias": "Find-SqlDuplicateIndex",
        "Author": "Claudio Silva (@ClaudioESSilva)",
        "Synopsis": "Find duplicate and overlapping indexes.",
        "Name": "Find-DbaDuplicateIndex",
        "Links": "https://dbatools.io/Find-DbaDuplicateIndex",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaDuplicateIndex -SqlInstance sql2005 | Out-File -FilePath C:\\temp\\sql2005-DuplicateIndexes.sql\nGenerates SQL statements to drop the selected duplicate indexes in server \"sql2005\" and writes them to the file \"C:\\temp\\sql2005-DuplicateIndexes.sql\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaDuplicateIndex -SqlInstance sql2005 | Out-File -FilePath C:\\temp\\sql2005-DuplicateIndexes.sql -Append\nGenerates SQL statements to drop the selected duplicate indexes and writes/appends them to the file \"C:\\temp\\sql2005-DuplicateIndexes.sql\"\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaDuplicateIndex -SqlInstance sqlserver2014a -SqlCredential $cred\nFinds exact duplicate indexes on all user databases present on sqlserver2014a, using SQL authentication.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaDuplicateIndex -SqlInstance sqlserver2014a -Database db1, db2\nFinds exact duplicate indexes on the db1 and db2 databases.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eFind-DbaDuplicateIndex -SqlInstance sqlserver2014a -IncludeOverlapping\nFinds both duplicate and overlapping indexes on all user databases.",
        "Syntax": "Find-DbaDuplicateIndex [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [-IncludeOverlapping] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaInstance",
        "Description": "This function searches for SQL Server Instances.\n\nIt supports a variety of scans for this purpose which can be separated in two categories:\n- Discovery\n- Scan\n\nDiscovery:\nThis is where it compiles a list of computers / addresses to check.\nIt supports several methods of generating such lists (including Active Directory lookup or IP Ranges), but also supports specifying a list of computers to check.\n- For details on discovery, see the documentation on the \u0027-DiscoveryType\u0027 parameter\n- For details on explicitly providing a list, see the documentation on the \u0027-ComputerName\u0027 parameter\n\nScan:\nOnce a list of computers has been provided, this command will execute a variety of actions to determine any instances present for each of them.\nThis is described in more detail in the documentation on the \u0027-ScanType\u0027 parameter.\nAdditional parameters allow more granular control over individual scans (e.g. Credentials to use).\n\nNote on logging and auditing:\nThe Discovery phase is un-problematic since it is non-intrusive, however during the scan phase, all targeted computers may be accessed repeatedly.\nThis may cause issues with security teams, due to many logon events and possibly failed authentication.\nThis action constitutes a network scan, which may be illegal depending on the nation you are in and whether you own the network you scan.\nIf you are unsure whether you may use this command in your environment, check the detailed description on the \u0027-ScanType\u0027 parameter and contact your IT security team for advice.",
        "Tags": [
                     "Instance",
                     "Connect",
                     "SqlServer"
                 ],
        "Alias": "",
        "Author": "Scott Sutherland, 2018 NetSPI | Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Search for SQL Server Instances.",
        "Name": "Find-DbaInstance",
        "Links": "https://dbatools.io/Find-DbaInstance",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaInstance -DiscoveryType Domain,DataSourceEnumeration\nPerforms a network search for SQL Instances by:\r\n- Looking up the Service Principal Names of computers in active directory\r\n- Using the UDP broadcast based auto-discovery of SSMS\r\nAfter that it will extensively scan all hosts thus discovered for instances.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaInstance -DiscoveryType All\nPerforms a network search for SQL Instances, using all discovery protocols:\r\n- Active directory search for Service Principal Names\r\n- SQL Instance Enumeration (same as SSMS does)\r\n- All IPAddresses in the current computer\u0027s subnets of all connected network interfaces\r\nNote: This scan will take a long time, due to including the IP Scan\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-ADComputer -Filter \"*\" | Find-DbaInstance\nScans all computers in the domain for SQL Instances, using a deep probe:\r\n- Tries resolving the name in DNS\r\n- Tries pinging the computer\r\n- Tries listing all SQL Services using CIM/WMI\r\n- Tries discovering all instances via the browser service\r\n- Tries connecting to the default TCP Port (1433)\r\n- Tries connecting to the TCP port of each discovered instance\r\n- Tries to establish a SQL connection to the server using default windows credentials\r\n- Tries looking up the Service Principal Names for each instance\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-Content .\\servers.txt | Find-DbaInstance -SqlCredential $cred -ScanType Browser,SqlConnect\nReads all servers from the servers.txt file (one server per line),\r\nthen scans each of them for instances using the browser service\r\nand finally attempts to connect to each instance found using the specified credentials.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eFind-DbaInstance -ComputerName localhost | Get-DbaDatabase | Format-Table -Wrap\nScans localhost for instances using the browser service, traverses all instances for all databases and displays all information in a formatted table.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eFind-DbaInstance -ComputerName localhost | Get-DbaDatabase | Select-Object SqlInstance, Name, Status, RecoveryModel, SizeMB, Compatibility, Owner, LastFullBackup, LastDiffBackup, LastLogBackup \r\n| Format-Table -Wrap\nScans localhost for instances using the browser service, traverses all instances for all databases and displays a subset of the important information in a formatted table.",
        "Syntax": "Find-DbaInstance -ComputerName \u003cDbaInstanceParameter[]\u003e [-Credential \u003cPSCredential\u003e] [-SqlCredential \u003cPSCredential\u003e] [-ScanType {TCPPort | SqlConnect | SqlService | DNSResolve | SPN | Browser | Ping | Default | All}] [-DomainController \u003cString\u003e] [-TCPPort \u003cInt32[]\u003e] [-MinimumConfidence {None | Low | Medium | High}] [-EnableException] [\u003cCommonParameters\u003e]\nFind-DbaInstance -DiscoveryType {IPRange | Domain | DataSourceEnumeration | All} [-Credential \u003cPSCredential\u003e] [-SqlCredential \u003cPSCredential\u003e] [-ScanType {TCPPort | SqlConnect | SqlService | DNSResolve | SPN | Browser | Ping | Default | All}] [-IpAddress \u003cString[]\u003e] [-DomainController \u003cString\u003e] [-TCPPort \u003cInt32[]\u003e] [-MinimumConfidence {None | Low | Medium | High}] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaLoginInGroup",
        "Description": "Outputs all the active directory groups members for a server, or limits it to find a specific AD user in the groups",
        "Tags": [
                     "Login",
                     "Group",
                     "Security"
                 ],
        "Alias": "",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/ | Simone Bizzotto (@niphlod)",
        "Synopsis": "Finds Logins in Active Directory groups that have logins on the SQL Instance.",
        "Name": "Find-DbaLoginInGroup",
        "Links": "https://dbatools.io/Find-DbaLoginInGroup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaLoginInGroup -SqlInstance DEV01 -Login \"MyDomain\\Stephen.Bennett\"\nReturns all active directory groups with logins on Sql Instance DEV01 that contain the AD user Stephen.Bennett.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaLoginInGroup -SqlInstance DEV01\nReturns all active directory users within all windows AD groups that have logins on the instance.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaLoginInGroup -SqlInstance DEV01 | Where-Object Login -like \u0027*stephen*\u0027\nReturns all active directory users within all windows AD groups that have logins on the instance whose login contains \"stephen\"",
        "Syntax": "Find-DbaLoginInGroup [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Login] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaOrphanedFile",
        "Description": "This command searches all directories associated with SQL database files for database files that are not currently in use by the SQL Server instance.\n\nBy default, it looks for orphaned .mdf, .ldf and .ndf files in the root\\data directory, the default data path, the default log path, the system paths and any directory in use by any attached directory.\n\nYou can specify additional filetypes using the -FileType parameter, and additional paths to search using the -Path parameter.",
        "Tags": [
                     "Orphan",
                     "Database",
                     "DatabaseFile"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Find-DbaOrphanedFile finds orphaned database files. Orphaned database files are files not associated with any attached database.",
        "Name": "Find-DbaOrphanedFile",
        "Links": "https://dbatools.io/Find-DbaOrphanedFile",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaOrphanedFile -SqlInstance sqlserver2014a\nConnects to sqlserver2014a, authenticating with Windows credentials, and searches for orphaned files. Returns server name, local filename, and unc path to file.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaOrphanedFile -SqlInstance sqlserver2014a -SqlCredential $cred\nConnects to sqlserver2014a, authenticating with SQL Server authentication, and searches for orphaned files. Returns server name, local filename, and unc path to file.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaOrphanedFile -SqlInstance sql2014 -Path \u0027E:\\Dir1\u0027, \u0027E:\\Dir2\u0027\nFinds the orphaned files in \"E:\\Dir1\" and \"E:Dir2\" in addition to the default directories.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaOrphanedFile -SqlInstance sql2014 -LocalOnly\nReturns only the local file paths for orphaned files.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eFind-DbaOrphanedFile -SqlInstance sql2014 -RemoteOnly\nReturns only the remote file path for orphaned files.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eFind-DbaOrphanedFile -SqlInstance sql2014, sql2016 -FileType fsf, mld\nFinds the orphaned ending with \".fsf\" and \".mld\" in addition to the default filetypes \".mdf\", \".ldf\", \".ndf\" for both the servers sql2014 and sql2016.",
        "Syntax": "Find-DbaOrphanedFile [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cObject\u003e] [[-Path] \u003cString[]\u003e] [[-FileType] \u003cString[]\u003e] [-LocalOnly] [-RemoteOnly] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaSimilarTable",
        "Description": "This function can either run against specific databases or all databases searching all/specific tables and views including in system databases.\nTypically one would use this to find for example archive version(s) of a table whose structures are similar.\nThis can also be used to find tables/views that are very similar to a given table/view structure to see where a table/view might be used.\n\nMore information can be found here: https://sqljana.wordpress.com/2017/03/31/sql-server-find-tables-with-similar-table-structure/",
        "Tags": "Table",
        "Alias": "",
        "Author": "Jana Sattainathan (@SQLJana), http://sqljana.wordpress.com",
        "Synopsis": "Returns all tables/views that are similar in structure by comparing the column names of matching and matched tables/views",
        "Name": "Find-DbaSimilarTable",
        "Links": "https://dbatools.io/Find-DbaSimilarTable",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaSimilarTable -SqlInstance DEV01\nSearches all user database tables and views for each, returns all tables or views with their matching tables/views and match percent\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaSimilarTable -SqlInstance DEV01 -Database AdventureWorks\nSearches AdventureWorks database and lists tables/views and their corresponding matching tables/views with match percent\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaSimilarTable -SqlInstance DEV01 -Database AdventureWorks -SchemaName HumanResource\nSearches AdventureWorks database and lists tables/views in the HumanResource schema with their corresponding matching tables/views with match percent\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaSimilarTable -SqlInstance DEV01 -Database AdventureWorks -SchemaName HumanResource -Table Employee\nSearches AdventureWorks database and lists tables/views in the HumanResource schema and table Employee with its corresponding matching tables/views with match percent\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eFind-DbaSimilarTable -SqlInstance DEV01 -Database AdventureWorks -MatchPercentThreshold 60\nSearches AdventureWorks database and lists all tables/views with its corresponding matching tables/views with match percent greater than or equal to 60",
        "Syntax": "Find-DbaSimilarTable [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-SchemaName \u003cString\u003e] [-TableName \u003cString\u003e] [-ExcludeViews] [-IncludeSystemDatabases] [-MatchPercentThreshold \u003cInt32\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaStoredProcedure",
        "Description": "This function can either run against specific databases or all databases searching all user or user and system stored procedures.",
        "Tags": [
                     "StoredProcedure",
                     "Proc"
                 ],
        "Alias": "",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Returns all stored procedures that contain a specific case-insensitive string or regex pattern.",
        "Name": "Find-DbaStoredProcedure",
        "Links": "https://dbatools.io/Find-DbaStoredProcedure",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaStoredProcedure -SqlInstance DEV01 -Pattern whatever\nSearches all user databases stored procedures for \"whatever\" in the text body\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaStoredProcedure -SqlInstance sql2016 -Pattern \u0027\\w+@\\w+\\.\\w+\u0027\nSearches all databases for all stored procedures that contain a valid email pattern in the text body\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaStoredProcedure -SqlInstance DEV01 -Database MyDB -Pattern \u0027some string\u0027 -Verbose\nSearches in \"mydb\" database stored procedures for \"some string\" in the text body\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaStoredProcedure -SqlInstance sql2016 -Database MyDB -Pattern RUNTIME -IncludeSystemObjects\nSearches in \"mydb\" database stored procedures for \"runtime\" in the text body",
        "Syntax": "Find-DbaStoredProcedure [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] -Pattern \u003cString\u003e [-IncludeSystemObjects] [-IncludeSystemDatabases] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaTrigger",
        "Description": "This function search on Instance, Database and Object level.\nIf you specify one or more databases, search on Server level will not be preformed.",
        "Tags": "Trigger",
        "Alias": "",
        "Author": "Claudio Silva (@ClaudioESSilva)",
        "Synopsis": "Returns all triggers that contain a specific case-insensitive string or regex pattern.",
        "Name": "Find-DbaTrigger",
        "Links": "https://dbatools.io/Find-DbaTrigger",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaTrigger -SqlInstance DEV01 -Pattern whatever\nSearches all user databases triggers for \"whatever\" in the text body\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaTrigger -SqlInstance sql2016 -Pattern \u0027\\w+@\\w+\\.\\w+\u0027\nSearches all databases for all triggers that contain a valid email pattern in the text body\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaTrigger -SqlInstance DEV01 -Database MyDB -Pattern \u0027some string\u0027 -Verbose\nSearches in \"mydb\" database triggers for \"some string\" in the text body\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaTrigger -SqlInstance sql2016 -Database MyDB -Pattern RUNTIME -IncludeSystemObjects\nSearches in \"mydb\" database triggers for \"runtime\" in the text body",
        "Syntax": "Find-DbaTrigger [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] -Pattern \u003cString\u003e [-TriggerLevel \u003cString\u003e] [-IncludeSystemObjects] [-IncludeSystemDatabases] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaUnusedIndex",
        "Description": "This command will help you to find Unused indexes on a database or a list of databases\n\nAlso tells how much space you can save by dropping the index.\nWe show the type of compression so you can make a more considered decision.\nFor now only supported for CLUSTERED and NONCLUSTERED indexes\n\nYou can select the indexes you want to drop on the grid view and by clicking OK the drop statement will be generated.",
        "Tags": "Index",
        "Alias": "Find-SqlUnusedIndex",
        "Author": "Aaron Nelson (@SQLvariant), SQLvariant.com",
        "Synopsis": "Find Unused indexes",
        "Name": "Find-DbaUnusedIndex",
        "Links": "https://dbatools.io/Find-DbaUnusedIndex",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaUnusedIndex -SqlInstance sql2005 -Path C:\\temp\\sql2005-UnusedIndexes.sql\nGenerates the SQL statements to drop the selected unused indexes on server \"sql2005\". The statements are written to the file \"C:\\temp\\sql2005-UnusedIndexes.sql\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaUnusedIndex -SqlInstance sql2005 -Path C:\\temp\\sql2005-UnusedIndexes.sql -Append\nGenerates the SQL statements to drop the selected unused indexes on server \"sql2005\". The statements are written to the file \"C:\\temp\\sql2005-UnusedIndexes.sql\", appending if the file already exists.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaUnusedIndex -SqlInstance sqlserver2016 -SqlCredential $cred\nGenerates the SQL statements to drop the selected unused indexes on server \"sqlserver2016\", using SQL Authentication to connect to the database.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaUnusedIndex -SqlInstance sqlserver2016 -Database db1, db2\nGenerates the SQL Statement to drop the selected unused indexes in databases db1 \u0026 db2 on server \"sqlserver2016\".\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eFind-DbaUnusedIndex -SqlInstance sqlserver2016\nGenerates the SQL statements to drop the selected unused indexes on all user databases.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eFine-DbaUnusedIndex -SqlInstance sqlserver2016 -IgnoreUptime\nGenerates the SQL statements to drop the selected unused indexes on all user databases even if the instance has been online for less than 7 days.\r\nNote that results may not have enough detail for all indexes, so care should be taken when using them or the generated scripts. Best practice is to allow a full week to capture the majority of index \r\nuse cases",
        "Syntax": "Find-DbaUnusedIndex [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-Path] \u003cString\u003e] [-NoClobber] [-Append] [-IgnoreUptime] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaUserObject",
        "Description": "Looks at the below list of objects to see if they are either owned by a user or a specific user (using the parameter -Pattern)\nDatabase Owner\nAgent Job Owner\nUsed in Credential\nUSed in Proxy\nSQL Agent Steps using a Proxy\nEndpoints\nServer Roles\nDatabase Schemas\nDatabase Roles\nDatabase Assembles\nDatabase Synonyms",
        "Tags": "Object",
        "Alias": "",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Searches SQL Server to find user-owned objects (ie. not dbo or sa) or for any object owned by a specific user specified by the Pattern parameter.",
        "Name": "Find-DbaUserObject",
        "Links": "https://dbatools.io/Find-DbaUserObject",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaUserObject -SqlInstance DEV01 -Pattern ad\\stephen\nSearches user objects for owner ad\\stephen\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaUserObject -SqlInstance DEV01 -Verbose\nShows all user owned (non-sa, non-dbo) objects and verbose output",
        "Syntax": "Find-DbaUserObject [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Pattern \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Find-DbaView",
        "Description": "This function can either run against specific databases or all databases searching all user or user and system views.",
        "Tags": "View",
        "Alias": "",
        "Author": "Cláudio Silva (@ClaudioESSilva)",
        "Synopsis": "Returns all views that contain a specific case-insensitive string or regex pattern.",
        "Name": "Find-DbaView",
        "Links": "https://dbatools.io/Find-DbaView",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eFind-DbaView -SqlInstance DEV01 -Pattern whatever\nSearches all user databases views for \"whatever\" in the text body\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eFind-DbaView -SqlInstance sql2016 -Pattern \u0027\\w+@\\w+\\.\\w+\u0027\nSearches all databases for all views that contain a valid email pattern in the text body\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaView -SqlInstance DEV01 -Database MyDB -Pattern \u0027some string\u0027 -Verbose\nSearches in \"mydb\" database views for \"some string\" in the text body\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eFind-DbaView -SqlInstance sql2016 -Database MyDB -Pattern RUNTIME -IncludeSystemObjects\nSearches in \"mydb\" database views for \"runtime\" in the text body",
        "Syntax": "Find-DbaView [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] -Pattern \u003cString\u003e [-IncludeSystemObjects] [-IncludeSystemDatabases] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Format-DbaBackupInformation",
        "Description": "Performs various mapping on Backup History, ready restoring\nOptions include changing restore paths, backup paths, database name and many others",
        "Tags": [
                     "DisasterRecovery",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Transforms the data in a dbatools BackupHistory object for a restore",
        "Name": "Format-DbaBackupInformation",
        "Links": "https://dbatools.io/Format-DbaBackupInformation",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$History | Format-DbaBackupInformation -ReplaceDatabaseName NewDb\nChanges as database name references to NewDb, both in the database name and any restore paths. Note, this will fail if the BackupHistory object contains backups for more than 1 database\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$History | Format-DbaBackupInformation -ReplaceDatabaseName @{\u0027OldB\u0027=\u0027NewDb\u0027;\u0027ProdHr\u0027=\u0027DevHr\u0027}\nWill change all occurrences of original database name in the backup history (names and restore paths) using the mapping in the hashtable.\r\nIn this example any occurrence of OldDb will be replaced with NewDb and ProdHr with DevPR\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$History | Format-DbaBackupInformation -DataFileDirectory \u0027D:\\DataFiles\\\u0027 -LogFileDirectory \u0027E:\\LogFiles\\\nThis example with change the restore path for all data files (everything that is not a log file) to d:\\datafiles\r\nAnd all Transaction Log files will be restored to E:\\Logfiles\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$History | Format-DbaBackupInformation -RebaseBackupFolder f:\\backups\nThis example changes the location that SQL Server will look for the backups. This is useful if you\u0027ve moved the backups to a different location",
        "Syntax": "Format-DbaBackupInformation [-BackupHistory] \u003cObject[]\u003e [[-ReplaceDatabaseName] \u003cObject\u003e] [-ReplaceDbNameInFile] [[-DataFileDirectory] \u003cString\u003e] [[-LogFileDirectory] \u003cString\u003e] [[-DestinationFileStreamDirectory] \u003cString\u003e] [[-DatabaseNamePrefix] \u003cString\u003e] [[-DatabaseFilePrefix] \u003cString\u003e] [[-DatabaseFileSuffix] \u003cString\u003e] [[-RebaseBackupFolder] \u003cString\u003e] [-Continue] [[-FileMapping] \u003cHashtable\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgDatabase",
        "Description": "Default view provides most common set of properties for information on the database in an Availability Group(s).\n\nInformation returned on the database will be specific to that replica, whether it is primary or a secondary.\n\nThis command will return an SMO object, but it is the AvailabilityDatabases object and not the Server.Databases object.",
        "Tags": [
                     "Hadr",
                     "HA",
                     "AG",
                     "AvailabilityGroup",
                     "Replica"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), https://wsmelton.github.io",
        "Synopsis": "Outputs the databases involved in the Availability Group(s) found on the server.",
        "Name": "Get-DbaAgDatabase",
        "Links": "https://dbatools.io/Get-DbaAgDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgDatabase -SqlInstance sqlserver2014a\nReturns basic information on all the databases in each Availability Group found on sqlserver2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgDatabase -SqlInstance sqlserver2014a -AvailabilityGroup AG-a\nReturns basic information on all the databases in the Availability Group AG-a on sqlserver2014a\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAgDatabase -SqlInstance sqlserver2014a -AvailabilityGroup AG-a -Database AG-Database\nReturns basic information on the database AG-Database found in the Availability Group AG-a on server sqlserver2014a",
        "Syntax": "Get-DbaAgDatabase [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-AvailabilityGroup] \u003cObject[]\u003e] [[-Database] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentAlert",
        "Description": "This function returns SQL Agent alerts.",
        "Tags": [
                     "Agent",
                     "SMO"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Returns all SQL Agent alerts on a SQL Server Agent.",
        "Name": "Get-DbaAgentAlert",
        "Links": "https://dbatools.io/Get-DbaAgentAlert",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentAlert -SqlInstance ServerA,ServerB\\instanceB\nReturns all SQL Agent alerts on serverA and serverB\\instanceB\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027serverA\u0027,\u0027serverB\\instanceB\u0027 | Get-DbaAgentAlert\nReturns all SQL Agent alerts on serverA and serverB\\instanceB",
        "Syntax": "Get-DbaAgentAlert [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentJob",
        "Description": "The Get-DbaAgentJob returns connected SMO object for SQL Agent Job information for each instance(s) of SQL Server.",
        "Tags": [
                     "Job",
                     "Agent"
                 ],
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets SQL Agent Job information for each instance(s) of SQL Server.",
        "Name": "Get-DbaAgentJob",
        "Links": "https://dbatools.io/Get-DbaAgentJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance localhost\nReturns all SQL Agent Jobs on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance localhost, sql2016\nReturns all SQl Agent Jobs for the local and sql2016 SQL Server instances\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance localhost -Job BackupData, BackupDiff\nReturns all SQL Agent Jobs named BackupData and BackupDiff from the local SQL Server instance.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance localhost -ExcludeJob BackupDiff\nReturns all SQl Agent Jobs for the local SQL Server instances, except the BackupDiff Job.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance localhost -NoDisabledJobs\nReturns all SQl Agent Jobs for the local SQL Server instances, excluding the disabled jobs.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$servers | Get-DbaAgentJob | Out-GridView -PassThru | Start-DbaAgentJob -WhatIf\nFind all of your Jobs from SQL Server instances in the $servers collection, select the jobs you want to start then see jobs would start if you ran Start-DbaAgentJob",
        "Syntax": "Get-DbaAgentJob [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cObject[]\u003e] [-ExcludeJob \u003cObject[]\u003e] [-NoDisabledJobs] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentJobCategory",
        "Description": "Get-DbaAgentJobCategory makes it possible to retrieve the job categories.",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobCategory"
                 ],
        "Alias": "Get-DbaJobCategory",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Get-DbaAgentJobCategory retrieves the job categories.",
        "Name": "Get-DbaAgentJobCategory",
        "Links": "https://dbatools.io/Get-DbaAgentJobCategory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentJobCategory -SqlInstance sql1\nReturn all the job categories.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentJobCategory -SqlInstance sql1 -Category \u0027Log Shipping\u0027\nReturn all the job categories that have the name \u0027Log Shipping\u0027.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAgentJobCategory -SqlInstance sstad-pc -CategoryType MultiServerJob\nReturn all the job categories that have a type MultiServerJob.",
        "Syntax": "Get-DbaAgentJobCategory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Category] \u003cString[]\u003e] [[-CategoryType] \u003cString\u003e] [-Force] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentJobHistory",
        "Description": "Get-DbaAgentJobHistory returns all information on the executions still available on each instance(s) of SQL Server submitted.\nThe cleanup of SQL Agent history determines how many records are kept.\n\nhttps://msdn.microsoft.com/en-us/library/ms201680.aspx\nhttps://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.agent.jobhistoryfilter(v=sql.120).aspx",
        "Tags": [
                     "Job",
                     "Agent"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDbaKlaas) | Simone Bizzotto (@niphold)",
        "Synopsis": "Gets execution history of SQL Agent Job on instance(s) of SQL Server.",
        "Name": "Get-DbaAgentJobHistory",
        "Links": "https://dbatools.io/Get-DbaAgentJobHistory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentJobHistory -SqlInstance localhost\nReturns all SQL Agent Job execution results on the local default SQL Server instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentJobHistory -SqlInstance localhost, sql2016\nReturns all SQL Agent Job execution results for the local and sql2016 SQL Server instances.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\\Inst2K17\u0027 | Get-DbaAgentJobHistory\nReturns all SQL Agent Job execution results for sql1 and sql2\\Inst2K17.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaAgentJobHistory -SqlInstance sql2\\Inst2K17 | Select-Object *\nReturns all properties for all SQl Agent Job execution results on sql2\\Inst2K17.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaAgentJobHistory -SqlInstance sql2\\Inst2K17 -Job \u0027Output File Cleanup\u0027\nReturns all properties for all SQl Agent Job execution results of the \u0027Output File Cleanup\u0027 job on sql2\\Inst2K17.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaAgentJobHistory -SqlInstance sql2\\Inst2K17 -Job \u0027Output File Cleanup\u0027 -WithOutputFile\nReturns all properties for all SQl Agent Job execution results of the \u0027Output File Cleanup\u0027 job on sql2\\Inst2K17,\r\nwith additional properties that show the output filename path\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaAgentJobHistory -SqlInstance sql2\\Inst2K17 -NoJobSteps\nReturns the SQL Agent Job execution results for the whole jobs on sql2\\Inst2K17, leaving out job step execution results.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eGet-DbaAgentJobHistory -SqlInstance sql2\\Inst2K17 -StartDate \u00272017-05-22\u0027 -EndDate \u00272017-05-23 12:30:00\u0027\nReturns the SQL Agent Job execution results between 2017/05/22 00:00:00 and 2017/05/23 12:30:00 on sql2\\Inst2K17.\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance sql2016 | Where-Object Name -Match backup | Get-DbaAgentJobHistory\nGets all jobs with the name that match the regex pattern \"backup\" and then gets the job history from those. You can also use -Like *backup* in this example.",
        "Syntax": "Get-DbaAgentJobHistory [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cObject[]\u003e] [-ExcludeJob \u003cObject[]\u003e] [-StartDate \u003cDateTime\u003e] [-EndDate \u003cDateTime\u003e] [-NoJobSteps] [-WithOutputFile] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaAgentJobHistory -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cObject[]\u003e] [-ExcludeJob \u003cObject[]\u003e] [-StartDate \u003cDateTime\u003e] [-EndDate \u003cDateTime\u003e] [-NoJobSteps] [-WithOutputFile] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaAgentJobHistory [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cObject[]\u003e] [-ExcludeJob \u003cObject[]\u003e] [-StartDate \u003cDateTime\u003e] [-EndDate \u003cDateTime\u003e] [-NoJobSteps] [-WithOutputFile] -JobCollection \u003cJob\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentJobOutputFile",
        "Description": "This function returns for one or more SQL Instances the output file value for each step of one or many agent job with the Job Names\nprovided dynamically. It will not return anything if there is no Output File",
        "Tags": [
                     "Agent",
                     "Job"
                 ],
        "Alias": "",
        "Author": "Rob Sewell (https://sqldbawithabeard.com) | Simone Bizzotto (@niphold)",
        "Synopsis": "Returns the Output File for each step of one or many agent job with the Job Names provided dynamically if\nrequired for one or more SQL Instances",
        "Name": "Get-DbaAgentJobOutputFile",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentJobOutputFile -SqlInstance SERVERNAME -Job \u0027The Agent Job\u0027\nThis will return the configured paths to the output files for each of the job step of the The Agent Job Job\r\non the SERVERNAME instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentJobOutputFile -SqlInstance SERVERNAME\nThis will return the configured paths to the output files for each of the job step of all the Agent Jobs\r\non the SERVERNAME instance\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAgentJobOutputFile -SqlInstance SERVERNAME,SERVERNAME2 -Job \u0027The Agent Job\u0027\nThis will return the configured paths to the output files for each of the job step of the The Agent Job Job\r\non the SERVERNAME instance and SERVERNAME2\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$Servers = \u0027SERVER\u0027,\u0027SERVER\\INSTANCE1\u0027\nGet-DbaAgentJobOutputFile -SqlInstance $Servers -Job \u0027The Agent Job\u0027 -OpenFile\nThis will return the configured paths to the output files for each of the job step of the The Agent Job Job\r\non the SERVER instance and the SERVER\\INSTANCE1 and open the files if they are available\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaAgentJobOutputFile -SqlInstance SERVERNAME | Out-GridView\nThis will return the configured paths to the output files for each of the job step of all the Agent Jobs\r\non the SERVERNAME instance and Pipe them to Out-GridView\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e(Get-DbaAgentJobOutputFile -SqlInstance SERVERNAME | Out-GridView -PassThru).FileName | Invoke-Item\nThis will return the configured paths to the output files for each of the job step of all the Agent Jobs\r\non the SERVERNAME instance and Pipe them to Out-GridView and enable you to choose the output\r\nfile and open it\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaAgentJobOutputFile -SqlInstance SERVERNAME -Verbose\nThis will return the configured paths to the output files for each of the job step of all the Agent Jobs\r\non the SERVERNAME instance and also show the job steps without an output file",
        "Syntax": "Get-DbaAgentJobOutputFile [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Job \u003cObject[]\u003e] [-ExcludeJob \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentJobStep",
        "Description": "The Get-DbaAgentJobStep returns connected SMO object for SQL Agent Job Step for each instance(s) of SQL Server.",
        "Tags": [
                     "Job",
                     "Agent"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDbaKlaas), http://powerdba.eu",
        "Synopsis": "Gets SQL Agent Job Step information for each instance(s) of SQL Server.",
        "Name": "Get-DbaAgentJobStep",
        "Links": "https://dbatools.io/Get-DbaAgentJobStep",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentJobStep -SqlInstance localhost\nReturns all SQL Agent Job Steps on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentJobStep -SqlInstance localhost, sql2016\nReturns all SQL Agent Job Steps for the local and sql2016 SQL Server instances\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAgentJobStep -SqlInstance localhost -Job BackupData, BackupDiff\nReturns all SQL Agent Job Steps for the jobs named BackupData and BackupDiff from the local SQL Server instance.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaAgentJobStep -SqlInstance localhost -ExcludeJob BackupDiff\nReturns all SQL Agent Job Steps for the local SQL Server instances, except for the BackupDiff Job.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaAgentJobStep -SqlInstance localhost -NoDisabledJobs\nReturns all SQL Agent Job Steps for the local SQL Server instances, excluding the disabled jobs.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$servers | Get-DbaAgentJobStep\nFind all of your Job Steps from SQL Server instances in the $servers collection",
        "Syntax": "Get-DbaAgentJobStep [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cObject[]\u003e] [-ExcludeJob \u003cObject[]\u003e] [-NoDisabledJobs] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentLog",
        "Description": "Gets the \"SQL Agent Error Log\" of an instance. Returns all 10 error logs by default.",
        "Tags": "Logging",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets the \"SQL Agent Error Log\" of an instance",
        "Name": "Get-DbaAgentLog",
        "Links": "https://dbatools.io/Get-DbaAgentLog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentLog -SqlInstance sql01\\sharepoint\nReturns the entire error log for the SQL Agent on sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentLog -SqlInstance sql01\\sharepoint -LogNumber 3, 6\nReturns log numbers 3 and 6 for the SQL Agent on sql01\\sharepoint\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaAgentLog -LogNumber 0\nReturns the most recent SQL Agent error logs for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaAgentLog [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-LogNumber] \u003cInt32[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentOperator",
        "Description": "This function returns SQL Agent operators.",
        "Tags": [
                     "Agent",
                     "Operator"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Returns all SQL Agent operators on a SQL Server Agent.",
        "Name": "Get-DbaAgentOperator",
        "Links": "https://dbatools.io/Get-DbaAgentOperator",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentOperator -SqlInstance ServerA,ServerB\\instanceB\nReturns any SQL Agent operators on serverA and serverB\\instanceB\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027ServerA\u0027,\u0027ServerB\\instanceB\u0027 | Get-DbaAgentOperator\nReturns all SQL Agent operators on serverA and serverB\\instanceB\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAgentOperator -SqlInstance ServerA -Operator Dba1,Dba2\nReturns only the SQL Agent Operators Dba1 and Dba2 on ServerA.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaAgentOperator -SqlInstance ServerA,ServerB -ExcludeOperator Dba3\nReturns all the SQL Agent operators on ServerA and ServerB, except the Dba3 operator.",
        "Syntax": "Get-DbaAgentOperator [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Operator \u003cObject[]\u003e] [-ExcludeOperator \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentProxy",
        "Description": "This function returns SQL Agent proxies.",
        "Tags": [
                     "Agent",
                     "SMO"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns all SQL Agent proxies on a SQL Server Agent.",
        "Name": "Get-DbaAgentProxy",
        "Links": "https://dbatools.io/Get-DbaAgentProxy",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentProxy -SqlInstance ServerA,ServerB\\instanceB\nReturns all SQL Agent proxies on serverA and serverB\\instanceB\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027serverA\u0027,\u0027serverB\\instanceB\u0027 | Get-DbaAgentProxy\nReturns all SQL Agent proxies on serverA and serverB\\instanceB",
        "Syntax": "Get-DbaAgentProxy [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Proxy \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgentSchedule",
        "Description": "This function returns SQL Agent Shared Schedules.",
        "Tags": [
                     "Agent",
                     "Schedule"
                 ],
        "Alias": "",
        "Author": "Chris McKeown (@devopsfu), http://www.devopsfu.com",
        "Synopsis": "Returns all SQL Agent Shared Schedules on a SQL Server Agent.",
        "Name": "Get-DbaAgentSchedule",
        "Links": "https://dbatools.io/Get-DbaAgentSchedule",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgentSchedule -SqlInstance localhost\nReturns all SQL Agent Shared Schedules on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentSchedule -SqlInstance localhost, sql2016\nReturns all SQL Agent Shared Schedules for the local and sql2016 SQL Server instances\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAgentSchedule -SqlInstance sql2016 -Schedule \"Maintenance10min\",\"Maintenance60min\"\nReturns the \"Maintenance10min\" \u0026 \"Maintenance60min\" schedules from the sql2016 SQL Server instance",
        "Syntax": "Get-DbaAgentSchedule [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-Schedule \u003cObject[]\u003e] [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgHadr",
        "Description": "Gets the Hadr setting, from the service level, and returns true or false for the specified SQL Server instance.",
        "Tags": [
                     "Hadr",
                     "HA",
                     "AG",
                     "AvailabilityGroup"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), http://wsmelton.github.io",
        "Synopsis": "Gets the Hadr service setting on the specified SQL Server instance.",
        "Name": "Get-DbaAgHadr",
        "Links": "https://dbatools.io/Get-DbaAgHadr",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgHadr -SqlInstance sql2016\nReturns a status of the Hadr setting for sql2016 SQL Server instance.",
        "Syntax": "Get-DbaAgHadr [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgListener",
        "Description": "Default view provides most common set of properties for information on the database in an Availability Group(s).\n\nInformation returned on the database will be specific to that replica, whether it is primary or a secondary.\n\nThis command will return an SMO object, but it is the AvailabilityDatabases object and not the Server.Databases object.",
        "Tags": [
                     "AG",
                     "HA",
                     "AvailabilityGroup",
                     "Listener"
                 ],
        "Alias": "",
        "Author": "Viorel Ciucu (@viorelciucu)",
        "Synopsis": "Outputs the name of the Listener for the Availability Group(s) found on the server.",
        "Name": "Get-DbaAgListener",
        "Links": "https://dbatools.io/Get-DbaAgListener",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgListener -SqlInstance sqlserver2014a\nReturns basic information on the listener found on sqlserver2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgListener -SqlInstance sqlserver2014a -AvailabilityGroup AG-a\nReturns basic information on the listener found on sqlserver2014a in the Availability Group AG-a",
        "Syntax": "Get-DbaAgListener [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-AvailabilityGroup] \u003cString[]\u003e] [[-Listener] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAgReplica",
        "Description": "Default view provides most common set of properties for information on the Availability Group(s)\u0027 Replica.",
        "Tags": [
                     "AG",
                     "HA",
                     "AvailabilityGroup",
                     "Replica"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton) | Chrissy LeMaire (@ctrlb)",
        "Synopsis": "Outputs the Availability Group(s)\u0027 Replica object found on the server.",
        "Name": "Get-DbaAgReplica",
        "Links": "https://dbatools.io/Get-DbaAgReplica",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAgReplica -SqlInstance sqlserver2014a\nReturns basic information on all the Availability Group(s) replica(s) found on sqlserver2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgReplica -SqlInstance sqlserver2014a -AvailabilityGroup AG-a\nShows basic information on the replica(s) found on Availability Group AG-a on sqlserver2014a\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAgReplica -SqlInstance sqlserver2014a | Select-Object *\nPS C:\\\u003e Returns full object properties on all Availability Group(s) replica(s) on sqlserver2014a",
        "Syntax": "Get-DbaAgReplica [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-AvailabilityGroup] \u003cObject[]\u003e] [[-Replica] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAvailabilityGroup",
        "Description": "Default view provides most common set of properties for information on the Availability Group(s).",
        "Tags": [
                     "Hadr",
                     "HA",
                     "AG",
                     "AvailabilityGroup"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton) | Chrissy LeMaire (@ctrlb)",
        "Synopsis": "Outputs the Availability Group(s) object found on the server.",
        "Name": "Get-DbaAvailabilityGroup",
        "Links": "https://dbatools.io/Get-DbaAvailabilityGroup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAvailabilityGroup -SqlInstance sqlserver2014a\nReturns basic information on all the Availability Group(s) found on sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAvailabilityGroup -SqlInstance sqlserver2014a -AvailabilityGroup AG-a\nShows basic information on the Availability Group AG-a on sqlserver2014a.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaAvailabilityGroup -SqlInstance sqlserver2014a | Select *\nReturns full object properties on all Availability Group(s) on sqlserver2014a.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaAvailabilityGroup -SqlInstance sqlserver2014a -AvailabilityGroup AG-a -IsPrimary\nReturns true/false if the server, sqlserver2014a, is the primary replica for AG-a Availability Group.",
        "Syntax": "Get-DbaAvailabilityGroup [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-AvailabilityGroup] \u003cObject[]\u003e] [-IsPrimary] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaAvailableCollation",
        "Description": "The Get-DbaAvailableCollation function returns the list of collations available on each SQL Server.\nOnly the connect permission is required to get this information.",
        "Tags": [
                     "Collation",
                     "Configuration"
                 ],
        "Alias": "",
        "Author": "Bryan Hamby (@galador)",
        "Synopsis": "Function to get available collations for a given SQL Server",
        "Name": "Get-DbaAvailableCollation",
        "Links": "https://dbatools.io/Get-DbaAvailableCollation",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaAvailableCollation -SqlInstance sql2016\nGets all the collations from server sql2016 using NT authentication",
        "Syntax": "Get-DbaAvailableCollation [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaBackupDevice",
        "Description": "The Get-DbaBackupDevice command gets SQL Backup Device information for each instance(s) of SQL Server.",
        "Tags": "Backup",
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets SQL Backup Device information for each instance(s) of SQL Server.",
        "Name": "Get-DbaBackupDevice",
        "Links": "https://dbatools.io/Get-DbaBackupDevice",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaBackupDevice -SqlInstance localhost\nReturns all Backup Devices on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaBackupDevice -SqlInstance localhost, sql2016\nReturns all Backup Devices for the local and sql2016 SQL Server instances",
        "Syntax": "Get-DbaBackupDevice [-SqlInstance] \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaBackupHistory",
        "Description": "Returns backup history details for some or all databases on a SQL Server.\n\nYou can even get detailed information (including file path) for latest full, differential and log files.\n\nBackups taken with the CopyOnly option will NOT be returned, unless the IncludeCopyOnly switch is present\n\nReference: http://www.sqlhub.com/2011/07/find-your-backup-history-in-sql-server.html",
        "Tags": [
                     "DisasterRecovery",
                     "Backup"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@ctrlb) | Stuart Moore (@napalmgram)",
        "Synopsis": "Returns backup history details for databases on a SQL Server.",
        "Name": "Get-DbaBackupHistory",
        "Links": "https://dbatools.io/Get-DbaBackupHistory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance SqlInstance2014a\nReturns server name, database, username, backup type, date for all database backups still in msdb history on SqlInstance2014a. This may return many rows; consider using filters that are included in \r\nother examples.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$cred = Get-Credential sqladmin\nGet-DbaBackupHistory -SqlInstance SqlInstance2014a -SqlCredential $cred\nDoes the same as above but connect to SqlInstance2014a as SQL user \"sqladmin\"\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance SqlInstance2014a -Database db1, db2 -Since \u00272016-07-01 10:47:00\u0027\nReturns backup information only for databases db1 and db2 on SqlInstance2014a since July 1, 2016 at 10:47 AM.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014, pubs -Force | Format-Table\nReturns information only for AdventureWorks2014 and pubs and formats the results as a table.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -Last\nReturns information about the most recent full, differential and log backups for AdventureWorks2014 on sql2014.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -Last -DeviceType Disk\nReturns information about the most recent full, differential and log backups for AdventureWorks2014 on sql2014, but only for backups to disk.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -Last -DeviceType 148,107\nReturns information about the most recent full, differential and log backups for AdventureWorks2014 on sql2014, but only for backups with device_type 148 and 107.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -LastFull\nReturns information about the most recent full backup for AdventureWorks2014 on sql2014.\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -Type Full\nReturns information about all Full backups for AdventureWorks2014 on sql2014.\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2016 | Get-DbaBackupHistory\nReturns database backup information for every database on every server listed in the Central Management Server on sql2016.\n-------------------------- EXAMPLE 11 --------------------------\nPS C:\\\u003eGet-DbaBackupHistory -SqlInstance SqlInstance2014a, sql2016 -Force\nReturns detailed backup history for all databases on SqlInstance2014a and sql2016.",
        "Syntax": "Get-DbaBackupHistory -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-IncludeCopyOnly] [-DeviceType \u003cString[]\u003e] [-Raw] [-LastLsn \u003cBigInteger\u003e] [-Type \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaBackupHistory -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-IncludeCopyOnly] [-Force] [-Since \u003cDateTime\u003e] [-DeviceType \u003cString[]\u003e] [-Raw] [-LastLsn \u003cBigInteger\u003e] [-Type \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaBackupHistory -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-IncludeCopyOnly] [-Last] [-LastFull] [-LastDiff] [-LastLog] [-DeviceType \u003cString[]\u003e] [-Raw] [-LastLsn \u003cBigInteger\u003e] [-Type \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaBackupInformation",
        "Description": "Upon being passed a list of potential backups files this command will scan the files, select those that contain SQL Server\nbackup sets. It will then filter those files down to a set\n\nThe function defaults to working on a remote instance. This means that all paths passed in must be relative to the remote instance.\nXpDirTree will be used to perform the file scans\n\nVarious means can be used to pass in a list of files to be considered. The default is to non recursively scan the folder\npassed in.",
        "Tags": [
                     "DisasterRecovery",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@ctrlb) | Stuart Moore (@napalmgram)",
        "Synopsis": "Scan backup files and creates a set, compatible with Restore-DbaDatabase",
        "Name": "Get-DbaBackupInformation",
        "Links": "https://dbatools.io/Get-DbaBackupInformation",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaBackupInformation -SqlInstance Server1 -Path c:\\backups\\ -DirectoryRecurse\nWill use the Server1 instance to recursively read all backup files under c:\\backups, and return a dbatools BackupHistory object\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaBackupInformation -SqlInstance Server1 -Path c:\\backups\\ -DirectoryRecurse -ExportPath c:\\store\\BackupHistory.xml\nPS C:\\\u003e robocopy c:\\store\\ \\\\remoteMachine\\C$\\store\\ BackupHistory.xml\r\nPS C:\\\u003e Get-DbaBackupInformation -Import -Path c:\\store\\BackupHistory.xml | Restore-DbaDatabase -SqlInstance Server2 -TrustDbBackupHistory\nThis example creates backup history output from server1 and copies the file to the remote machine in order to preserve backup history. It is then used to restore the databases onto server2.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaBackupInformation -SqlInstance Server1 -Path c:\\backups\\ -DirectoryRecurse -ExportPath C:\\store\\BackupHistory.xml -PassThru | Restore-DbaDatabase -SqlInstance Server2 \r\n-TrustDbBackupHistory\nIn this example we gather backup information, export it to an xml file, and then pass it on through to Restore-DbaDatabase.\r\nThis allows us to repeat the restore without having to scan all the backup files again\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-ChildItem c:\\backups\\ -recurse -files | Where-Object {$_.extension -in (\u0027.bak\u0027,\u0027.trn\u0027) -and $_.LastWriteTime -gt (get-date).AddMonths(-1)} | Get-DbaBackupInformation -SqlInstance Server1 \r\n-ExportPath C:\\backupHistory.xml\nThis lets you keep a record of all backup history from the last month on hand to speed up refreshes\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\\\network\\backups\nPS C:\\\u003e $Backups += Get-DbaBackupInformation -SqlInstance Server2 -NoXpDirTree -Path c:\\backups\nScan the unc folder \\\\network\\backups with Server1, and then scan the C:\\backups folder on\r\nServer2 not using xp_dirtree, adding the results to the first set.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\\\network\\backups -MaintenanceSolution\nWhen MaintenanceSolution is indicated we know we are dealing with the output from Ola Hallengren backup scripts. So we make sure that a FULL folder exists in the first level of Path, if not we \r\nshortcut scanning all the files as we have nothing to work with\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\\\network\\backups -MaintenanceSolution -IgnoreLogBackup\nAs we know we are dealing with an Ola Hallengren style backup folder from the MaintenanceSolution switch, when IgnoreLogBackup is also included we can ignore the LOG folder to skip any scanning of \r\nlog backups. Note this also means they WON\u0027T be restored",
        "Syntax": "Get-DbaBackupInformation -Path \u003cObject[]\u003e -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-DatabaseName \u003cString[]\u003e] [-SourceInstance \u003cString[]\u003e] [-NoXpDirTree] [-DirectoryRecurse] [-EnableException] [-MaintenanceSolution] [-IgnoreLogBackup] [-ExportPath \u003cString\u003e] [-AzureCredential \u003cString\u003e] [-Anonymise] [-NoClobber] [-PassThru] [\u003cCommonParameters\u003e]\nGet-DbaBackupInformation -Path \u003cObject[]\u003e [-DatabaseName \u003cString[]\u003e] [-SourceInstance \u003cString[]\u003e] [-EnableException] [-MaintenanceSolution] [-IgnoreLogBackup] [-ExportPath \u003cString\u003e] [-AzureCredential \u003cString\u003e] [-Import] [-Anonymise] [-NoClobber] [-PassThru] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaBuildReference",
        "Description": "Returns info about the specific build of a SQL instance, including the SP, the CU and the reference KB, wherever possible.\nIt also includes End Of Support dates as specified on Microsoft Life Cycle Policy",
        "Tags": "SqlBuild",
        "Alias": "Get-DbaSqlBuildReference",
        "Author": "Simone Bizzotto (@niphold) | Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Returns SQL Server Build infos on a SQL instance",
        "Name": "Get-DbaBuildReference",
        "Links": "https://dbatools.io/Get-DbaBuildReference",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaBuildReference -Build \"12.00.4502\"\nReturns information about a build identified by \"12.00.4502\" (which is SQL 2014 with SP1 and CU11)\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaBuildReference -Build \"12.00.4502\" -Update\nReturns information about a build trying to fetch the most up to date index online. When the online version is newer, the local one gets overwritten\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaBuildReference -Build \"12.0.4502\",\"10.50.4260\"\nReturns information builds identified by these versions strings\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlserver2014a | Get-DbaBuildReference\nIntegrate with other cmdlets to have builds checked for all your registered servers on sqlserver2014a",
        "Syntax": "Get-DbaBuildReference [[-Build] \u003cVersion[]\u003e] [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-Update] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaClientAlias",
        "Description": "Gets SQL Server alias by reading HKLM:\\SOFTWARE\\Microsoft\\MSSQLServer\\Client",
        "Tags": "Alias",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets any SQL Server alias for the specified server(s)",
        "Name": "Get-DbaClientAlias",
        "Links": "https://dbatools.io/Get-DbaClientAlias",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaClientAlias\nGets all SQL Server client aliases on the local computer\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaClientAlias -ComputerName workstationx\nGets all SQL Server client aliases on Workstationx\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaClientAlias -ComputerName workstationx -Credential ad\\sqldba\nLogs into workstationx as ad\\sqldba then retrieves all SQL Server client aliases on Workstationx\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e\u0027Server1\u0027, \u0027Server2\u0027 | Get-DbaClientAlias\nGets all SQL Server client aliases on Server1 and Server2",
        "Syntax": "Get-DbaClientAlias [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaClientProtocol",
        "Description": "Gets the SQL Server related client protocols on one or more computers.\n\nRequires Local Admin rights on destination computer(s).\nThe client protocols can be enabled and disabled when retrieved via WSMan.",
        "Tags": "Protocol",
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Gets the SQL Server related client protocols on a computer.",
        "Name": "Get-DbaClientProtocol",
        "Links": "https://dbatools.io/Get-DbaClientProtocol",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaClientProtocol -ComputerName sqlserver2014a\nGets the SQL Server related client protocols on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Get-DbaClientProtocol\nGets the SQL Server related client protocols on computers sql1, sql2 and sql3.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaClientProtocol -ComputerName sql1,sql2 | Out-GridView\nGets the SQL Server related client protocols on computers sql1 and sql2, and shows them in a grid view.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e(Get-DbaClientProtocol -ComputerName sql2 | Where { $_.DisplayName = \u0027via\u0027 }).Disable()\nDisables the VIA ClientNetworkProtocol on computer sql2.\r\nIf successful, return code 0 is shown.",
        "Syntax": "Get-DbaClientProtocol [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaCmConnection",
        "Description": "Retrieves windows management connections from the cache",
        "Tags": [
                     "ComputerManagement",
                     "CIM"
                 ],
        "Alias": "",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Retrieves windows management connections from the cache",
        "Name": "Get-DbaCmConnection",
        "Links": "https://dbatools.io/Get-DbaCmConnection",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCmConnection\nList all cached connections.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmConnection sql2014\nList the cached connection - if any - to the server sql2014.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmConnection -UserName \"*charles*\"\nList all cached connection that use a username containing \"charles\" as default or override credentials.",
        "Syntax": "Get-DbaCmConnection [[-ComputerName] \u003cString[]\u003e] [-UserName \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaCmObject",
        "Description": "This function centralizes all requests for information retrieved from Get-WmiObject or Get-CimInstance.\nIt uses different protocols as available in this order:\n- Cim over WinRM\n- Cim over DCOM\n- Wmi\n- Wmi over PowerShell Remoting\nIt remembers channels that didn\u0027t work and will henceforth avoid them. It remembers invalid credentials and will avoid reusing them.\nMuch of its behavior can be configured using Test-DbaWmConnection.",
        "Tags": [
                     "ComputerManagement",
                     "CIM"
                 ],
        "Alias": "",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Retrieves Wmi/Cim-Style information from computers.",
        "Name": "Get-DbaCmObject",
        "Links": "https://dbatools.io/Get-DbaCmObject",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCmObject win32_OperatingSystem\nRetrieves the common operating system information from the local computer.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmObject -Computername \"sql2014\" -ClassName Win32_OperatingSystem -Credential $cred -DoNotUse CimRM\nRetrieves the common operating system information from the server sql2014.\r\nIt will use the Credentials stored in $cred to connect, unless they are known to not work, in which case they will default to windows credentials (unless another default has been set).",
        "Syntax": "Get-DbaCmObject [-ClassName] \u003cString\u003e [-ComputerName \u003cDbaCmConnectionParameter[]\u003e] [-Credential \u003cPSCredential\u003e] [-Namespace \u003cString\u003e] [-DoNotUse {None | CimRM | CimDCOM | Wmi | PowerShellRemoting}] [-Force] [-SilentlyContinue] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaCmObject [-Query] \u003cString\u003e [-ComputerName \u003cDbaCmConnectionParameter[]\u003e] [-Credential \u003cPSCredential\u003e] [-Namespace \u003cString\u003e] [-DoNotUse {None | CimRM | CimDCOM | Wmi | PowerShellRemoting}] [-Force] [-SilentlyContinue] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaCmsRegServer",
        "Description": "Returns an array of servers found in the CMS.",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Get-DbaCmsRegServerName,Get-DbaRegisteredServer,Get-SqlRegisteredServerName",
        "Author": "Bryan Hamby (@galador)",
        "Synopsis": "Gets list of SQL Server objects stored in SQL Server Central Management Server (CMS).",
        "Name": "Get-DbaCmsRegServer",
        "Links": "https://dbatools.io/Get-DbaCmsRegServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlserver2014a\nGets a list of servers from the CMS on sqlserver2014a, using Windows Credentials.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlserver2014a -IncludeSelf\nGets a list of servers from the CMS on sqlserver2014a and includes sqlserver2014a in the output results.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlserver2014a -SqlCredential $credential | Select-Object -Unique -ExpandProperty ServerName\nReturns only the server names from the CMS on sqlserver2014a, using SQL Authentication to authenticate to the server.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlserver2014a -Group HR, Accounting\nGets a list of servers in the HR and Accounting groups from the CMS on sqlserver2014a.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlserver2014a -Group HR\\Development\nReturns a list of servers in the HR and sub-group Development from the CMS on sqlserver2014a.",
        "Syntax": "Get-DbaCmsRegServer [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cString[]\u003e] [[-ServerName] \u003cString[]\u003e] [[-Group] \u003cObject[]\u003e] [[-ExcludeGroup] \u003cObject[]\u003e] [[-Id] \u003cInt32[]\u003e] [-IncludeSelf] [-ExcludeCmsServer] [-ResolveNetworkName] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaCmsRegServerGroup",
        "Description": "Returns an array of Server Groups found in the CMS.",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Get-DbaRegisteredServerGroup",
        "Author": "Tony Wilhelm (@tonywsql)",
        "Synopsis": "Gets list of Server Groups objects stored in SQL Server Central Management Server (CMS).",
        "Name": "Get-DbaCmsRegServerGroup",
        "Links": "https://dbatools.io/Get-DbaCmsRegServerGroup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sqlserver2014a\nGets the top level groups from the CMS on sqlserver2014a, using Windows Credentials.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sqlserver2014a -SqlCredential $credential\nGets the top level groups from the CMS on sqlserver2014a, using alternative credentials to authenticate to the server.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sqlserver2014a -Group HR, Accounting\nGets the HR and Accounting groups from the CMS on sqlserver2014a.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sqlserver2014a -Group HR\\Development\nReturns the sub-group Development of the HR group from the CMS on sqlserver2014a.",
        "Syntax": "Get-DbaCmsRegServerGroup [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Group] \u003cObject[]\u003e] [[-ExcludeGroup] \u003cObject[]\u003e] [[-Id] \u003cInt32[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaCmsRegServerStore",
        "Description": "Returns a SQL Server Registered Server Store object - useful for working with Central Management Store",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Get-DbaRegisteredServerStore",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns a SQL Server Registered Server Store Object",
        "Name": "Get-DbaCmsRegServerStore",
        "Links": "https://dbatools.io/Get-DbaCmsRegServerStore",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerStore -SqlInstance sqlserver2014a\nReturns a SQL Server Registered Server Store Object from sqlserver2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerStore -SqlInstance sqlserver2014a -SqlCredential sqladmin\nReturns a SQL Server Registered Server Store Object from sqlserver2014a by logging in with the sqladmin login",
        "Syntax": "Get-DbaCmsRegServerStore [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaComputerCertificate",
        "Description": "Gets computer certificates on localhost that are candidates for using with SQL Server\u0027s network encryption",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Simplifies finding computer certificates that are candidates for using with SQL Server\u0027s network encryption",
        "Name": "Get-DbaComputerCertificate",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaComputerCertificate\nGets computer certificates on localhost that are candidates for using with SQL Server\u0027s network encryption\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaComputerCertificate -ComputerName sql2016\nGets computer certificates on sql2016 that are candidates for using with SQL Server\u0027s network encryption\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaComputerCertificate -ComputerName sql2016 -Thumbprint 8123472E32AB412ED4288888B83811DB8F504DED, 04BFF8B3679BB01A986E097868D8D494D70A46D6\nGets computer certificates on sql2016 that match thumbprints 8123472E32AB412ED4288888B83811DB8F504DED or 04BFF8B3679BB01A986E097868D8D494D70A46D6",
        "Syntax": "Get-DbaComputerCertificate [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Store] \u003cString\u003e] [[-Folder] \u003cString\u003e] [[-Path] \u003cString\u003e] [[-Thumbprint] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaComputerSystem",
        "Description": "Gets computer system information from the server and returns as an object.",
        "Tags": "ServerInfo",
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), https://wsmelton.github.io",
        "Synopsis": "Gets computer system information from the server.",
        "Name": "Get-DbaComputerSystem",
        "Links": "https://dbatools.io/Get-DbaComputerSystem",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaComputerSystem\nReturns information about the local computer\u0027s computer system\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaComputerSystem -ComputerName sql2016\nReturns information about the sql2016\u0027s computer system\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaComputerSystem -ComputerName sql2016 -IncludeAws\nReturns information about the sql2016\u0027s computer system and includes additional properties around the EC2 instance.",
        "Syntax": "Get-DbaComputerSystem [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-IncludeAws] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaConnection",
        "Description": "Returns a bunch of information from dm_exec_connections which, according to Microsoft:\n\"Returns information about the connections established to this instance of SQL Server and the details of each connection. Returns server wide connection information for SQL Server. Returns current database connection information for SQL Database.\"",
        "Tags": "Connection",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns a bunch of information from dm_exec_connections.",
        "Name": "Get-DbaConnection",
        "Links": "https://dbatools.io/Get-DbaConnection",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaConnection -SqlInstance sql2016, sql2017\nReturns client connection information from sql2016 and sql2017",
        "Syntax": "Get-DbaConnection [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaCpuUsage",
        "Description": "\"If there are a lot of processes running on your instance and the CPU is very high,\nthen it\u0027s hard to find the exact process eating up your CPU using just the SQL Server\ntools. One way to correlate the data between what is running within SQL Server and at\nthe Windows level is to use SPID and KPID values to get the exact process.\"\n\nThis command automates that process.\n\nReferences: https://www.mssqltips.com/sqlservertip/2454/how-to-find-out-how-much-cpu-a-sql-server-process-is-really-using/\n\nNote: This command returns results from all SQL instances on the destination server but the process\ncolumn is specific to -SqlInstance passed.",
        "Tags": "CPU",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Provides detailed CPU usage information about a SQL Server\u0027s process",
        "Name": "Get-DbaCpuUsage",
        "Links": "https://dbatools.io/Get-DbaCpuUsage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCpuUsage -SqlInstance sql2017\nLogs into the SQL Server instance \"sql2017\" and also the Computer itself (via WMI) to gather information\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$usage = Get-DbaCpuUsage -SqlInstance sql2017\nPS C:\\\u003e $usage.Process\nExplores the processes (from Get-DbaProcess) associated with the usage results\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCpuUsage -SqlInstance sql2017 -SqlCredential sqladmin -Credential ad\\sqldba\nLogs into the SQL instance using the SQL Login \u0027sqladmin\u0027 and then Windows instance as \u0027ad\\sqldba\u0027",
        "Syntax": "Get-DbaCpuUsage [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Threshold] \u003cInt32\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaCredential",
        "Description": "The Get-DbaCredential command gets SQL Credential information for each instance(s) of SQL Server.",
        "Tags": "Credential",
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets SQL Credential information for each instance(s) of SQL Server.",
        "Name": "Get-DbaCredential",
        "Links": "https://dbatools.io/Get-DbaCredential",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCredential -SqlInstance localhost\nReturns all SQL Credentials on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCredential -SqlInstance localhost, sql2016 -Name \u0027PowerShell Proxy\u0027\nReturns the SQL Credentials named \u0027PowerShell Proxy\u0027 for the local and sql2016 SQL Server instances\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCredential -SqlInstance localhost, sql2016 -Identity ad\\powershell\nReturns the SQL Credentials for the account \u0027ad\\powershell\u0027 on the local and sql2016 SQL Server instances",
        "Syntax": "Get-DbaCredential [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Name \u003cString[]\u003e] [-ExcludeName \u003cString[]\u003e] [-Identity \u003cString[]\u003e] [-ExcludeIdentity \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaCustomError",
        "Description": "The Get-DbaCustomError command gets SQL Custom Error Message information for each instance(s) of SQL Server.",
        "Tags": [
                     "Error",
                     "CustomError"
                 ],
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets SQL Custom Error Message information for each instance(s) of SQL Server.",
        "Name": "Get-DbaCustomError",
        "Links": "https://dbatools.io/Get-DbaCustomError",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCustomError -SqlInstance localhost\nReturns all Custom Error Message(s) on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCustomError -SqlInstance localhost, sql2016\nReturns all Custom Error Message(s) for the local and sql2016 SQL Server instances",
        "Syntax": "Get-DbaCustomError [-SqlInstance] \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDatabase",
        "Description": "The Get-DbaDatabase command gets SQL database information for each database that is present on the target instance(s) of\nSQL Server. If the name of the database is provided, the command will return only the specific database information.",
        "Tags": "Database",
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com | Klaas Vandenberghe (@PowerDbaKlaas) | Simone Bizzotto ( @niphlod )",
        "Synopsis": "Gets SQL Database information for each database that is present on the target instance(s) of SQL Server.",
        "Name": "Get-DbaDatabase",
        "Links": "https://dbatools.io/Get-DbaDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance localhost\nReturns all databases on the local default SQL Server instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance localhost -ExcludeAllUserDb\nReturns only the system databases on the local default SQL Server instance.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance localhost -ExcludeAllSystemDb\nReturns only the user databases on the local default SQL Server instance.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e\u0027localhost\u0027,\u0027sql2016\u0027 | Get-DbaDatabase\nReturns databases on multiple instances piped into the function.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance SQL1\\SQLExpress -RecoveryModel full,Simple\nReturns only the user databases in Full or Simple recovery model from SQL Server instance SQL1\\SQLExpress.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance SQL1\\SQLExpress -Status Normal\nReturns only the user databases with status \u0027normal\u0027 from SQL Server instance SQL1\\SQLExpress.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance SQL1\\SQLExpress -IncludeLastUsed\nReturns the databases from SQL Server instance SQL1\\SQLExpress and includes the last used information\r\nfrom the sys.dm_db_index_usage_stats DMV.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance SQL1\\SQLExpress,SQL2 -ExcludeDatabase model,master\nReturns all databases except master and model from SQL Server instances SQL1\\SQLExpress and SQL2.\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance SQL1\\SQLExpress,SQL2 -Encrypted\nReturns only databases using TDE from SQL Server instances SQL1\\SQLExpress and SQL2.\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance SQL1\\SQLExpress,SQL2 -Access ReadOnly\nReturns only read only databases from SQL Server instances SQL1\\SQLExpress and SQL2.\n-------------------------- EXAMPLE 11 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance SQL2,SQL3 -Database OneDB,OtherDB\nReturns databases \u0027OneDb\u0027 and \u0027OtherDB\u0027 from SQL Server instances SQL2 and SQL3 if databases by those names exist on those instances.",
        "Syntax": "Get-DbaDatabase [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-ExcludeAllUserDb] [-ExcludeAllSystemDb] [-Owner \u003cString[]\u003e] [-Encrypted] [-Status \u003cString[]\u003e] [-Access \u003cString\u003e] [-RecoveryModel \u003cString[]\u003e] [-NoFullBackup] [-NoFullBackupSince \u003cDateTime\u003e] [-NoLogBackup] [-NoLogBackupSince \u003cDateTime\u003e] [-EnableException] [-IncludeLastUsed] [-OnlyAccessible] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbAssembly",
        "Description": "The Get-DbaDbAssembly command gets SQL Database Assembly information for each instance(s) of SQL Server.",
        "Tags": [
                     "Assembly",
                     "Database"
                 ],
        "Alias": "Get-DbaDatabaseAssembly",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets SQL Database Assembly information for each instance(s) of SQL Server.",
        "Name": "Get-DbaDbAssembly",
        "Links": "https://dbatools.io/Get-DbaDbAssembly",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbAssembly -SqlInstance localhost\nReturns all Database Assembly on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbAssembly -SqlInstance localhost, sql2016\nReturns all Database Assembly for the local and sql2016 SQL Server instances",
        "Syntax": "Get-DbaDbAssembly [-SqlInstance] \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbCertificate",
        "Description": "Gets database certificates",
        "Tags": "Certificate",
        "Alias": "Get-DbaDatabaseCertificate",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets database certificates",
        "Name": "Get-DbaDbCertificate",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbCertificate -SqlInstance sql2016\nGets all certificates\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbCertificate -SqlInstance Server1 -Database db1\nGets the certificate for the db1 database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbCertificate -SqlInstance Server1 -Database db1 -Certificate cert1\nGets the cert1 certificate within the db1 database",
        "Syntax": "Get-DbaDbCertificate [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-Certificate] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbCheckConstraint",
        "Description": "Gets database Checks constraints.",
        "Tags": "Database",
        "Alias": "",
        "Author": "Cláudio Silva (@ClaudioESSilva), https://claudioessilva.eu",
        "Synopsis": "Gets database Check constraints.",
        "Name": "Get-DbaDbCheckConstraint",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbCheckConstraint -SqlInstance sql2016\nGets all database check constraints.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbCheckConstraint -SqlInstance Server1 -Database db1\nGets the check constraints for the db1 database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbCheckConstraint -SqlInstance Server1 -ExcludeDatabase db1\nGets the check constraints for all databases except db1.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbCheckConstraint -SqlInstance Server1 -ExcludeSystemTable\nGets the check constraints for all databases that are not system objects.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaDbCheckConstraint\nGets the check constraints for the databases on Sql1 and Sql2/sqlexpress.",
        "Syntax": "Get-DbaDbCheckConstraint [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-ExcludeSystemTable] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbCompression",
        "Description": "This function gets the current size and compression for all objects in the specified database(s), if no database is specified it will return all objects in all user databases.",
        "Tags": [
                     "Compression",
                     "Table",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Jess Pomfret (@jpomfret), jesspomfret.com",
        "Synopsis": "Gets tables and indexes size and current compression settings.",
        "Name": "Get-DbaDbCompression",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbCompression -SqlInstance localhost\nReturns objects size and current compression level for all user databases.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbCompression -SqlInstance localhost -Database TestDatabase\nReturns objects size and current compression level for objects within the TestDatabase database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbCompression -SqlInstance localhost -ExcludeDatabase TestDatabases\nReturns objects size and current compression level for objects in all databases except the TestDatabase database.",
        "Syntax": "Get-DbaDbCompression [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbEncryption",
        "Description": "Shows if a database has Transparent Data Encryption (TDE), any certificates, asymmetric keys or symmetric keys with details for each.",
        "Tags": [
                     "Encryption",
                     "Database"
                 ],
        "Alias": "Get-DbaDatabaseEncryption",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Returns a summary of encryption used on databases passed to it.",
        "Name": "Get-DbaDbEncryption",
        "Links": "https://dbatools.io/Get-DbaDbEncryption",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbEncryption -SqlInstance DEV01\nList all encryption found on the instance by database\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbEncryption -SqlInstance DEV01 -Database MyDB\nList all encryption found for the MyDB database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbEncryption -SqlInstance DEV01 -ExcludeDatabase MyDB\nList all encryption found for all databases except MyDB.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbEncryption -SqlInstance DEV01 -IncludeSystemDBs\nList all encryption found for all databases including the system databases.",
        "Syntax": "Get-DbaDbEncryption [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-IncludeSystemDBs] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbExtentDiff",
        "Description": "This is only an implementation of the script created by Paul S. Randal to find what percentage of a database has changed since the last full backup.\nhttps://www.sqlskills.com/blogs/paul/new-script-how-much-of-the-database-has-changed-since-the-last-full-backup/",
        "Tags": [
                     "Backup",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Viorel Ciucu, cviorel.com",
        "Synopsis": "What percentage of a database has changed since the last full backup",
        "Name": "Get-DbaDbExtentDiff",
        "Links": "http://dbatools.io/Get-DbaDbExtentDiff",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbExtentDiff -SqlInstance SQL2016 -Database DBA\nGet the changes for the DBA database.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbExtentDiff -SqlInstance $SQL2017N1, $SQL2017N2, $SQL2016 -Database DB01 -SqlCredential $Cred\nGet the changes for the DB01 database on multiple servers.",
        "Syntax": "Get-DbaDbExtentDiff [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbFeatureUsage",
        "Description": "Shows features that are enabled in the database but not supported on all editions of SQL Server.\n\nBasically checks for Enterprise feature usage.\n\nThis feature must be removed before the database can be migrated to all available editions of SQL Server.",
        "Tags": "Deprecated",
        "Alias": "",
        "Author": "Brandon Abshire, netnerds.net",
        "Synopsis": "Shows features that are enabled in the database but not supported on all editions of SQL Server. Basically checks for Enterprise feature usage.",
        "Name": "Get-DbaDbFeatureUsage",
        "Links": "https://dbatools.io/Get-DbaDbFeatureUsage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2008 -Database testdb, db2 | Get-DbaDbFeatureUsage\nShows features that are enabled in the testdb and db2 databases but\r\nnot supported on the all the editions of SQL Server.",
        "Syntax": "Get-DbaDbFeatureUsage [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-ExcludeDatabase] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbFile",
        "Description": "Returns detailed information about database files. Does not use SMO - SMO causes enumeration and this command avoids that.",
        "Tags": "Database",
        "Alias": "Get-DbaDatabaseFile",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Returns detailed information about database files.",
        "Name": "Get-DbaDbFile",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbFile -SqlInstance sql2016\nWill return an object containing all file groups and their contained files for every database on the sql2016 SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbFile -SqlInstance sql2016 -Database Impromptu\nWill return an object containing all file groups and their contained files for the Impromptu Database on the sql2016 SQL Server instance\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbFile -SqlInstance sql2016 -Database Impromptu, Trading\nWill return an object containing all file groups and their contained files for the Impromptu and Trading databases on the sql2016 SQL Server instance",
        "Syntax": "Get-DbaDbFile [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-InputObject \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaDbFile -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-InputObject \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbForeignKey",
        "Description": "Gets database Foreign Keys.",
        "Tags": [
                     "Database",
                     "ForeignKey",
                     "Table"
                 ],
        "Alias": "",
        "Author": "Claudio Silva (@ClaudioESSilva), https://claudioessilva.eu",
        "Synopsis": "Gets database Foreign Keys.",
        "Name": "Get-DbaDbForeignKey",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbForeignKey -SqlInstance sql2016\nGets all database Foreign Keys.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbForeignKey -SqlInstance Server1 -Database db1\nGets the Foreign Keys for the db1 database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbForeignKey -SqlInstance Server1 -ExcludeDatabase db1\nGets the Foreign Keys for all databases except db1.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbForeignKey -SqlInstance Server1 -ExcludeSystemTable\nGets the Foreign Keys from all tables that are not system objects from all databases.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaDbForeignKey\nGets the Foreign Keys for the databases on Sql1 and Sql2/sqlexpress.",
        "Syntax": "Get-DbaDbForeignKey [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-ExcludeSystemTable] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbLogShipError",
        "Description": "When your log shipping fails it\u0027s sometimes hard to see why is fails.\nUsing this function you\u0027ll be able to find out what went wrong in a short amount of time.",
        "Tags": "LogShipping",
        "Alias": "Get-DbaLogShippingError",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Get-DbaDbLogShipError returns all the log shipping errors that occurred",
        "Name": "Get-DbaDbLogShipError",
        "Links": "https://dbatools.io/Get-DbaDbLogShipError",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbLogShipError -SqlInstance sql1\nGet all the log shipping errors that occurred\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbLogShipError -SqlInstance sql1 -Action Backup\nGet the errors that have something to do with the backup of the databases\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbLogShipError -SqlInstance sql1 -Secondary\nGet the errors that occurred on the secondary instance.\r\nThis will return the copy of the restore actions because those only occur on the secondary instance\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbLogShipError -SqlInstance sql1 -DateTimeFrom \"01/05/2018\"\nGet the errors that have occurred from \"01/05/2018\". This can also be of format \"yyyy-MM-dd\"\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaDbLogShipError -SqlInstance sql1 -Secondary -DateTimeFrom \"01/05/2018\" -DateTimeTo \"2018-01-07\"\nGet the errors that have occurred between \"01/05/2018\" and \"01/07/2018\".\r\nSee that is doesn\u0027t matter how the date is represented.",
        "Syntax": "Get-DbaDbLogShipError [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-ExcludeDatabase] \u003cString[]\u003e] [[-Action] \u003cString[]\u003e] [[-DateTimeFrom] \u003cDateTime\u003e] [[-DateTimeTo] \u003cDateTime\u003e] [-Primary] [-Secondary] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMail",
        "Description": "Gets the database mail from SQL Server",
        "Tags": [
                     "DatabaseMail",
                     "DBMail",
                     "Mail"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets the database mail from SQL Server",
        "Name": "Get-DbaDbMail",
        "Links": "https://dbatools.io/Get-DbaDbMail",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMail -SqlInstance sql01\\sharepoint\nReturns the db mail server object on sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMail -SqlInstance sql01\\sharepoint | Select *\nReturns the db mail server object on sql01\\sharepoint then return a bunch more columns\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaDbMail\nReturns the db mail server object for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaDbMail [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDBMailAccount",
        "Description": "Gets database mail accounts from SQL Server",
        "Tags": [
                     "DatabaseMail",
                     "DBMail",
                     "Mail"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets database mail accounts from SQL Server",
        "Name": "Get-DbaDBMailAccount",
        "Links": "https://dbatools.io/Get-DbaDbMailAccount",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDBMailAccount -SqlInstance sql01\\sharepoint\nReturns DBMail accounts on sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDBMailAccount -SqlInstance sql01\\sharepoint -Account \u0027The DBA Team\u0027\nReturns The DBA Team DBMail account from sql01\\sharepoint\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDBMailAccount -SqlInstance sql01\\sharepoint | Select *\nReturns the DBMail accounts on sql01\\sharepoint then return a bunch more columns\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaDBMail | Get-DbaDBMailAccount\nReturns the db DBMail accounts for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaDBMailAccount [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Account] \u003cString[]\u003e] [[-ExcludeAccount] \u003cString[]\u003e] [[-InputObject] \u003cSqlMail[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMailConfig",
        "Description": "Gets database mail configs from SQL Server",
        "Tags": [
                     "DatabaseMail",
                     "DBMail",
                     "Mail"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets database mail configs from SQL Server",
        "Name": "Get-DbaDbMailConfig",
        "Links": "https://dbatools.io/Get-DbaDbMailConfig",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMailConfig -SqlInstance sql01\\sharepoint\nReturns DBMail configs on sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMailConfig -SqlInstance sql01\\sharepoint -Name ProhibitedExtensions\nReturns the ProhibitedExtensions configuration on sql01\\sharepoint\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbMailConfig -SqlInstance sql01\\sharepoint | Select *\nReturns the DBMail configs on sql01\\sharepoint then return a bunch more columns\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaDbMail | Get-DbaDbMailConfig\nReturns the DBMail configs for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaDbMailConfig [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cString[]\u003e] [[-InputObject] \u003cSqlMail[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMailHistory",
        "Description": "Gets the history of mail sent from a SQL instance",
        "Tags": [
                     "DatabaseMail",
                     "DBMail",
                     "Mail"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets the history of mail sent from a SQL instance",
        "Name": "Get-DbaDbMailHistory",
        "Links": "https://dbatools.io/Get-DbaDbMailHistory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMailHistory -SqlInstance sql01\\sharepoint\nReturns the entire DBMail history on sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMailHistory -SqlInstance sql01\\sharepoint | Select *\nReturns the entire DBMail history on sql01\\sharepoint then return a bunch more columns\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaDbMailHistory\nReturns the all DBMail history for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaDbMailHistory [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Since] \u003cDateTime\u003e] [[-Status] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMailLog",
        "Description": "Gets the DBMail log from a SQL instance",
        "Tags": [
                     "DatabaseMail",
                     "DBMail",
                     "Mail"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets the DBMail log from a SQL instance",
        "Name": "Get-DbaDbMailLog",
        "Links": "https://dbatools.io/Get-DbaDbMailLog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMailLog -SqlInstance sql01\\sharepoint\nReturns the entire DBMail log on sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMailLog -SqlInstance sql01\\sharepoint | Select *\nReturns the entire DBMail log on sql01\\sharepoint, includes all returned information.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaDbMailLog -Type Error, Information\nReturns only the Error and Information DBMail log for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaDbMailLog [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Since] \u003cDateTime\u003e] [[-Type] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMailProfile",
        "Description": "Gets database mail profiles from SQL Server",
        "Tags": [
                     "DatabaseMail",
                     "DBMail",
                     "Mail"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets database mail profiles from SQL Server",
        "Name": "Get-DbaDbMailProfile",
        "Links": "https://dbatools.io/Get-DbaDbMailProfile",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMailProfile -SqlInstance sql01\\sharepoint\nReturns DBMail profiles on sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMailProfile -SqlInstance sql01\\sharepoint -Profile \u0027The DBA Team\u0027\nReturns The DBA Team DBMail profile from sql01\\sharepoint\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbMailProfile -SqlInstance sql01\\sharepoint | Select *\nReturns the DBMail profiles on sql01\\sharepoint then return a bunch more columns\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaDbMail | Get-DbaDbMailProfile\nReturns the DBMail profiles for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaDbMailProfile [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Profile] \u003cString[]\u003e] [[-ExcludeProfile] \u003cString[]\u003e] [[-InputObject] \u003cSqlMail[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMailServer",
        "Description": "Gets database mail servers from SQL Server",
        "Tags": [
                     "DatabaseMail",
                     "DBMail",
                     "Mail"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets database mail servers from SQL Server",
        "Name": "Get-DbaDbMailServer",
        "Links": "https://dbatools.io/Get-DbaDbMailServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMailServer -SqlInstance sql01\\sharepoint\nReturns all DBMail servers on sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMailServer -SqlInstance sql01\\sharepoint -Server DbaTeam\nReturns The DBA Team DBMail server from sql01\\sharepoint\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbMailServer -SqlInstance sql01\\sharepoint | Select *\nReturns the DBMail servers on sql01\\sharepoint then return a bunch more columns\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaDbMail | Get-DbaDbMailServer\nReturns the DBMail servers for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaDbMailServer [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Server] \u003cString[]\u003e] [[-Account] \u003cString[]\u003e] [[-InputObject] \u003cSqlMail[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMasterKey",
        "Description": "Gets specified database master key",
        "Tags": [
                     "Certificate",
                     "Database"
                 ],
        "Alias": "Get-DbaDatabaseMasterKey",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets specified database master key",
        "Name": "Get-DbaDbMasterKey",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMasterKey -SqlInstance sql2016\nGets all master database keys\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMasterKey -SqlInstance Server1 -Database db1\nGets the master key for the db1 database",
        "Syntax": "Get-DbaDbMasterKey [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMemoryUsage",
        "Description": "This command can be utilized to determine which databases on a given instance are consuming buffer pool memory.\n\nThis command is based on query provided by Aaron Bertrand.\nReference: https://www.mssqltips.com/sqlservertip/2393/determine-sql-server-memory-use-by-database-and-object/",
        "Tags": [
                     "Memory",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), https://wsmelton.github.io",
        "Synopsis": "Determine buffer pool usage by database.",
        "Name": "Get-DbaDbMemoryUsage",
        "Links": "https://dbatools.io/Get-DbaDbMemoryUsage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMemoryUsage -SqlInstance sqlserver2014a\nReturns the buffer pool consumption for all user databases\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMemoryUsage -SqlInstance sqlserver2014a -IncludeSystemDb\nReturns the buffer pool consumption for all user databases and system databases\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbMemoryUsage -SqlInstance sql1 -IncludeSystemDb -Database tempdb\nReturns the buffer pool consumption for tempdb database only\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaMemoryUsage -SqlInstance sql2 -IncludeSystemDb -Exclude \u0027master\u0027,\u0027model\u0027,\u0027msdb\u0027,\u0027ResourceDb\u0027\nReturns the buffer pool consumption for all user databases and tempdb database",
        "Syntax": "Get-DbaDbMemoryUsage [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-IncludeSystemDb] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMirror",
        "Description": "Gets properties of database mirrors and mirror witnesses.",
        "Tags": [
                     "Mirror",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets properties of database mirrors and mirror witnesses.",
        "Name": "Get-DbaDbMirror",
        "Links": "https://dbatools.io/Get-DbaDbMirror",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMirror -SqlInstance localhost\nGets properties of database mirrors and mirror witnesses on localhost\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMirror -SqlInstance localhost, sql2016\nGets properties of database mirrors and mirror witnesses on localhost and sql2016 SQL Server instances",
        "Syntax": "Get-DbaDbMirror [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbMirrorMonitor",
        "Description": "Returns status rows for a monitored database from the status table in which database mirroring monitoring history is stored and allows you to choose whether the procedure obtains the latest status beforehand.\n\nBasically executes sp_dbmmonitorresults.",
        "Tags": [
                     "Mirror",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns status rows for a monitored database from the status table in which database mirroring monitoring history is stored and allows you to choose whether the procedure obtains the latest status beforehand.",
        "Name": "Get-DbaDbMirrorMonitor",
        "Links": "https://dbatools.io/Get-DbaDbMirrorMonitor",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbMirrorMonitor -SqlInstance sql2008, sql2012\nReturns last two hours\u0027 worth of status rows for a monitored database from the status table on sql2008 and sql2012.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbMirrorMonitor -SqlInstance sql2005 -LimitResults LastDay -Update\nUpdates monitor stats then returns the last 24 hours worth of status rows for a monitored database from the status table on sql2008 and sql2012.",
        "Syntax": "Get-DbaDbMirrorMonitor [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-Update] [[-LimitResults] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbPageInfo",
        "Description": "Get-DbaDbPageInfo is able to return information about the pages in a database.\nIt\u0027s possible to return the information for multiple databases and filter on specific databases, schemas and tables.",
        "Tags": [
                     "Database",
                     "Page"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Get-DbaDbPageInfo will return page information for a database",
        "Name": "Get-DbaDbPageInfo",
        "Links": "https://dbatools.io/Get-DbaDbPageInfo",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eet-DbaDbPageInfo -SqlInstance sql2017\nReturns page information for all databases on sql2017\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbPageInfo -SqlInstance sql2017, sql2016 -Database testdb\nReturns page information for the testdb on sql2017 and sql2016\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$servers | Get-DbaDatabase -Database testdb | Get-DbaDbPageInfo\nReturns page information for the testdb on all $servers",
        "Syntax": "Get-DbaDbPageInfo [[-SqlInstance] \u003cDbaInstanceParameter\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-Schema] \u003cString[]\u003e] [[-Table] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbPartitionFunction",
        "Description": "Gets database Partition Functions",
        "Tags": "Database",
        "Alias": "Get-DbaDatabasePartitionFunction",
        "Author": "Klaas Vandenberghe ( @PowerDbaKlaas )",
        "Synopsis": "Gets database Partition Functions",
        "Name": "Get-DbaDbPartitionFunction",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbPartitionFunction -SqlInstance sql2016\nGets all database Partition Functions\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbPartitionFunction -SqlInstance Server1 -Database db1\nGets the Partition Functions for the db1 database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbPartitionFunction -SqlInstance Server1 -ExcludeDatabase db1\nGets the Partition Functions for all databases except db1\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaDbPartitionFunction\nGets the Partition Functions for the databases on Sql1 and Sql2/sqlexpress",
        "Syntax": "Get-DbaDbPartitionFunction [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbPartitionScheme",
        "Description": "Gets database Partition Schemes",
        "Tags": "Database",
        "Alias": "Get-DbaDatabasePartitionScheme",
        "Author": "Klaas Vandenberghe (@PowerDbaKlaas)",
        "Synopsis": "Gets database Partition Schemes",
        "Name": "Get-DbaDbPartitionScheme",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbPartitionScheme -SqlInstance sql2016\nGets all database Partition Schemes\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbPartitionScheme -SqlInstance Server1 -Database db1\nGets the Partition Schemes for the db1 database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbPartitionScheme -SqlInstance Server1 -ExcludeDatabase db1\nGets the Partition Schemes for all databases except db1\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaDbPartitionScheme\nGets the Partition Schemes for the databases on Sql1 and Sql2/sqlexpress",
        "Syntax": "Get-DbaDbPartitionScheme [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbQueryStoreOption",
        "Description": "Retrieves and returns the Query Store configuration for every database that has the Query Store feature enabled.",
        "Tags": "QueryStore",
        "Alias": "Get-DbaDbQueryStoreOptions,Get-DbaQueryStoreConfig",
        "Author": "Enrico van de Laar (@evdlaar) | Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Get the Query Store configuration for Query Store enabled databases.",
        "Name": "Get-DbaDbQueryStoreOption",
        "Links": "https://dbatools.io/Get-DbaQueryStoreOptions",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbQueryStoreOption -SqlInstance ServerA\\sql\nReturns Query Store configuration settings for every database on the ServerA\\sql instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbQueryStoreOption -SqlInstance ServerA\\sql | Where-Object {$_.ActualState -eq \"ReadWrite\"}\nReturns the Query Store configuration for all databases on ServerA\\sql where the Query Store feature is in Read/Write mode.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbQueryStoreOption -SqlInstance localhost | format-table -AutoSize -Wrap\nReturns Query Store configuration settings for every database on the ServerA\\sql instance inside a table format.",
        "Syntax": "Get-DbaDbQueryStoreOption [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbRecoveryModel",
        "Description": "Get-DbaDbRecoveryModel displays the Recovery Model for all databases. This is the default, you can filter using -Database, -ExcludeDatabase, -RecoveryModel",
        "Tags": [
                     "Recovery",
                     "RecoveryModel",
                     "Simple",
                     "Full",
                     "Bulk",
                     "BulkLogged"
                 ],
        "Alias": "",
        "Author": "Viorel Ciucu (@viorelciucu), https://www.cviorel.com",
        "Synopsis": "Get-DbaDbRecoveryModel displays the Recovery Model.",
        "Name": "Get-DbaDbRecoveryModel",
        "Links": "https://dbatools.io/Get-DbaDbRecoveryModel",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel BulkLogged -Verbose\nGets all databases on SQL Server instance sql2014 having RecoveryModel set to BulkLogged.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbRecoveryModel -SqlInstance sql2014 -Database TestDB\nGets recovery model information for TestDB. If TestDB does not exist on the instance nothing is returned.",
        "Syntax": "Get-DbaDbRecoveryModel [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-RecoveryModel] \u003cString[]\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbRoleMember",
        "Description": "The Get-DbaDbRoleMember returns connected SMO object for database roles for each instance(s) of SQL Server.",
        "Tags": [
                     "Role",
                     "Database",
                     "Security",
                     "Login"
                 ],
        "Alias": "Get-DbaRoleMember",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Get members of database roles for each instance(s) of SQL Server.",
        "Name": "Get-DbaDbRoleMember",
        "Links": "https://dbatools.io/Get-DbaDbRoleMember",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbRoleMember -SqlInstance localhost\nReturns all members of all database roles on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbRoleMember -SqlInstance localhost, sql2016\nReturns all members of all database roles on the local and sql2016 SQL Server instances\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$servers = Get-Content C:\\servers.txt\nPS C:\\\u003e $servers | Get-DbaDbRoleMember\nReturns all members of all database roles for every server in C:\\servers.txt\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbRoleMember -SqlInstance localhost -Database msdb\nReturns non-system members of all roles in the msdb database on localhost.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaDbRoleMember -SqlInstance localhost -Database msdb -IncludeSystemUser -ExcludeFixedRole\nReturns all members of non-fixed roles in the msdb database on localhost.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaDbRoleMember -SqlInstance localhost -Database msdb -Role \u0027db_owner\u0027\nReturns all members of the db_owner role in the msdb database on localhost.",
        "Syntax": "Get-DbaDbRoleMember [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cString[]\u003e] [-ExcludeDatabase \u003cString[]\u003e] [-Role \u003cString[]\u003e] [-ExcludeRole \u003cString[]\u003e] [-ExcludeFixedRole] [-IncludeSystemUser] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbSharePoint",
        "Description": "Returns databases that are part of a SharePoint Farm, as found in the SharePoint Configuration database.\n\nBy default, this command checks SharePoint_Config. To use an alternate database, use the ConfigDatabase parameter.",
        "Tags": "SharePoint",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns databases that are part of a SharePoint Farm.",
        "Name": "Get-DbaDbSharePoint",
        "Links": "https://dbatools.io/Get-DbaDbSharePoint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbSharePoint -SqlInstance sqlcluster\nReturns databases that are part of a SharePoint Farm, as found in SharePoint_Config on sqlcluster\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sqlcluster -Database SharePoint_Config_2016 | Get-DbaDbSharePoint\nReturns databases that are part of a SharePoint Farm, as found in SharePoint_Config_2016 on sqlcluster",
        "Syntax": "Get-DbaDbSharePoint [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-ConfigDatabase] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbSnapshot",
        "Description": "Retrieves the list of database snapshot available, along with their base (the db they are the snapshot of) and creation time",
        "Tags": "Snapshot",
        "Alias": "Get-DbaDatabaseSnapshot",
        "Author": "Simone Bizzotto (@niphlod)",
        "Synopsis": "Get database snapshots with details",
        "Name": "Get-DbaDbSnapshot",
        "Links": "https://dbatools.io/Get-DbaDbSnapshot",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbSnapshot -SqlInstance sqlserver2014a\nReturns a custom object displaying Server, Database, DatabaseCreated, SnapshotOf, SizeMB, DatabaseCreated\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR, Accounting\nReturns information for database snapshots having HR and Accounting as base dbs\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbSnapshot -SqlInstance sqlserver2014a -Snapshot HR_snapshot, Accounting_snapshot\nReturns information for database snapshots HR_snapshot and Accounting_snapshot",
        "Syntax": "Get-DbaDbSnapshot [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-Snapshot] \u003cObject[]\u003e] [[-ExcludeSnapshot] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbSpace",
        "Description": "This function returns database file space information for a SQL Instance or group of SQL Instances. Information is based on a query against sys.database_files and the FILEPROPERTY function to query and return information.\n\nFile free space script borrowed and modified from Glenn Berry\u0027s DMV scripts (http://www.sqlskills.com/blogs/glenn/category/dmv-queries/)",
        "Tags": [
                     "Database",
                     "Space",
                     "Storage"
                 ],
        "Alias": "Get-DbaDatabaseFreeSpace,Get-DbaDatabaseSpace",
        "Author": "Michael Fal (@Mike_Fal), http://mikefal.net",
        "Synopsis": "Returns database file space information for database files on a SQL instance.",
        "Name": "Get-DbaDbSpace",
        "Links": "https://dbatools.io/Get-DbaDbSpace",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbSpace -SqlInstance localhost\nReturns all user database files and free space information for the localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbSpace -SqlInstance localhost | Where-Object {$_.PercentUsed -gt 80}\nReturns all user database files and free space information for the local host. Filters the output object by any files that have a percent used of greater than 80%.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027localhost\u0027,\u0027localhost\\namedinstance\u0027 | Get-DbaDbSpace\nReturns all user database files and free space information for the localhost and localhost\\namedinstance SQL Server instances. Processes data via the pipeline.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbSpace -SqlInstance localhost -Database db1, db2\nReturns database files and free space information for the db1 and db2 on localhost.",
        "Syntax": "Get-DbaDbSpace [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-IncludeSystemDBs] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbState",
        "Description": "Gets some common \"states\" on databases:\n- \"RW\" options : READ_ONLY or READ_WRITE\n- \"Status\" options : ONLINE, OFFLINE, EMERGENCY, RESTORING\n- \"Access\" options : SINGLE_USER, RESTRICTED_USER, MULTI_USER\n\nReturns an object with SqlInstance, Database, RW, Status, Access",
        "Tags": "Database",
        "Alias": "Get-DbaDatabaseState",
        "Author": "Simone Bizzotto (@niphold)",
        "Synopsis": "Gets various options for databases, hereby called \"states\"",
        "Name": "Get-DbaDbState",
        "Links": "https://dbatools.io/Get-DbaDbState",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbState -SqlInstance sqlserver2014a\nGets options for all databases of the sqlserver2014a instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbState -SqlInstance sqlserver2014a -Database HR, Accounting\nGets options for both HR and Accounting database of the sqlserver2014a instance\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbState -SqlInstance sqlserver2014a -Exclude HR\nGets options for all databases of the sqlserver2014a instance except HR\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e\u0027sqlserver2014a\u0027, \u0027sqlserver2014b\u0027 | Get-DbaDbState\nGets options for all databases of sqlserver2014a and sqlserver2014b instances",
        "Syntax": "Get-DbaDbState [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbStoredProcedure",
        "Description": "Gets database Stored Procedures",
        "Tags": [
                     "Database",
                     "StoredProcedure",
                     "Proc"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDbaKlaas)",
        "Synopsis": "Gets database Stored Procedures",
        "Name": "Get-DbaDbStoredProcedure",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbStoredProcedure -SqlInstance sql2016\nGets all database Stored Procedures\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbStoredProcedure -SqlInstance Server1 -Database db1\nGets the Stored Procedures for the db1 database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbStoredProcedure -SqlInstance Server1 -ExcludeDatabase db1\nGets the Stored Procedures for all databases except db1\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbStoredProcedure -SqlInstance Server1 -ExcludeSystemSp\nGets the Stored Procedures for all databases that are not system objects\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaDbStoredProcedure\nGets the Stored Procedures for the databases on Sql1 and Sql2/sqlexpress",
        "Syntax": "Get-DbaDbStoredProcedure [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-ExcludeSystemSp] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbTable",
        "Description": "Shows table information around table row and data sizes and if it has any table type information.",
        "Tags": [
                     "Database",
                     "Tables"
                 ],
        "Alias": "Get-DbaTable",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Returns a summary of information on the tables",
        "Name": "Get-DbaDbTable",
        "Links": "https://dbatools.io/Get-DbaDbTable",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbTable -SqlInstance DEV01 -Database Test1\nReturn all tables in the Test1 database\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbTable -SqlInstance DEV01 -Database MyDB -Table MyTable\nReturn only information on the table MyTable from the database MyDB\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbTable -SqlInstance DEV01 -Table MyTable\nReturns information on table called MyTable if it exists in any database on the server, under any schema\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbTable -SqlInstance DEV01 -Table dbo.[First.Table]\nReturns information on table called First.Table on schema dbo if it exists in any database on the server\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\u0027localhost\u0027,\u0027localhost\\namedinstance\u0027 | Get-DbaDbTable -Database DBA -Table Commandlog\nReturns information on the CommandLog table in the DBA database on both instances localhost and the named instance localhost\\namedinstance",
        "Syntax": "Get-DbaDbTable [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-IncludeSystemDBs] [[-Table] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbTrigger",
        "Description": "Get all existing database triggers on one or more SQL instances.",
        "Tags": [
                     "Database",
                     "Trigger"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Get all existing database triggers on one or more SQL instances.",
        "Name": "Get-DbaDbTrigger",
        "Links": "https://dbatools.io/Get-DbaDbTrigger",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbTrigger -SqlInstance sql2017\nReturns all database triggers\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2017 -Database supa | Get-DbaDbTrigger\nReturns all triggers for database supa on sql2017\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbTrigger -SqlInstance sql2017 -Database supa\nReturns all triggers for database supa on sql2017",
        "Syntax": "Get-DbaDbTrigger [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbUdf",
        "Description": "Gets database User Defined Functions",
        "Tags": [
                     "Security",
                     "Database"
                 ],
        "Alias": "Get-DbaDatabaseUdf",
        "Author": "Klaas Vandenberghe (@PowerDbaKlaas)",
        "Synopsis": "Gets database User Defined Functions",
        "Name": "Get-DbaDbUdf",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbUdf -SqlInstance sql2016\nGets all database User Defined Functions\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbUdf -SqlInstance Server1 -Database db1\nGets the User Defined Functions for the db1 database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbUdf -SqlInstance Server1 -ExcludeDatabase db1\nGets the User Defined Functions for all databases except db1\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbUdf -SqlInstance Server1 -ExcludeSystemUdf\nGets the User Defined Functions for all databases that are not system objects (there can be 100+ system User Defined Functions in each DB)\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaDbUdf\nGets the User Defined Functions for the databases on Sql1 and Sql2/sqlexpress",
        "Syntax": "Get-DbaDbUdf [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-ExcludeSystemUdf] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbUser",
        "Description": "Gets database users",
        "Tags": [
                     "Security",
                     "Database"
                 ],
        "Alias": "Get-DbaDatabaseUser",
        "Author": "Klaas Vandenberghe (@PowerDbaKlaas)",
        "Synopsis": "Gets database users",
        "Name": "Get-DbaDbUser",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbUser -SqlInstance sql2016\nGets all database users\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbUser -SqlInstance Server1 -Database db1\nGets the users for the db1 database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbUser -SqlInstance Server1 -ExcludeDatabase db1\nGets the users for all databases except db1\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbUser -SqlInstance Server1 -ExcludeSystemUser\nGets the users for all databases that are not system objects, like \u0027dbo\u0027, \u0027guest\u0027 or \u0027INFORMATION_SCHEMA\u0027\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaDbUser\nGets the users for the databases on Sql1 and Sql2/sqlexpress",
        "Syntax": "Get-DbaDbUser [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-ExcludeSystemUser] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbView",
        "Description": "Gets database views for each SqlInstance.",
        "Tags": [
                     "Security",
                     "Database"
                 ],
        "Alias": "Get-DbaDatabaseView",
        "Author": "Klaas Vandenberghe (@PowerDbaKlaas)",
        "Synopsis": "Gets database views for each SqlInstance.",
        "Name": "Get-DbaDbView",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbView -SqlInstance sql2016\nGets all database views\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbView -SqlInstance Server1 -Database db1\nGets the views for the db1 database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbView -SqlInstance Server1 -ExcludeDatabase db1\nGets the views for all databases except db1\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbView -SqlInstance Server1 -ExcludeSystemView\nGets the views for all databases that are not system objects (there can be 400+ system views in each DB)\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaDbView\nGets the views for the databases on Sql1 and Sql2/sqlexpress",
        "Syntax": "Get-DbaDbView [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-ExcludeSystemView] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDbVirtualLogFile",
        "Description": "Having a transaction log file with too many virtual log files (VLFs) can hurt database performance.\n\nToo many VLFs can cause transaction log backups to slow down and can also slow down database recovery and, in extreme cases, even affect insert/update/delete performance.\n\nReferences:\nhttp://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/\nhttp://blogs.msdn.com/b/saponsqlserver/archive/2012/02/22/too-many-virtual-log-files-vlfs-can-cause-slow-database-recovery.aspx\n\nIf you\u0027ve got a high number of VLFs, you can use Expand-SqlTLogResponsibly to reduce the number.",
        "Tags": [
                     "VLF",
                     "Database",
                     "LogFile"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns database virtual log file information for database files on a SQL instance.",
        "Name": "Get-DbaDbVirtualLogFile",
        "Links": "https://dbatools.io/Get-DbaDbVirtualLogFile",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDbVirtualLogFile -SqlInstance sqlcluster\nReturns all user database virtual log file details for the sqlcluster instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDbVirtualLogFile -SqlInstance sqlserver | Group-Object -Property Database | Where-Object Count -gt 50\nReturns user databases that have 50 or more VLFs.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027sqlserver\u0027,\u0027sqlcluster\u0027 | Get-DbaDbVirtualLogFile\nReturns all VLF information for the sqlserver and sqlcluster SQL Server instances. Processes data via the pipeline.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbVirtualLogFile -SqlInstance sqlcluster -Database db1, db2\nReturns the VLF counts for the db1 and db2 databases on sqlcluster.",
        "Syntax": "Get-DbaDbVirtualLogFile [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-IncludeSystemDBs] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDefaultPath",
        "Description": "Gets the default SQL Server paths for data, logs and backups",
        "Tags": "Config",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets the default SQL Server paths for data, logs and backups",
        "Name": "Get-DbaDefaultPath",
        "Links": "https://dbatools.io/Get-DbaDefaultPath",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDefaultPath -SqlInstance sql01\\sharepoint\nReturns the default file paths for sql01\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaDefaultPath\nReturns the default file paths for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"",
        "Syntax": "Get-DbaDefaultPath [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDependency",
        "Description": "This function recursively finds all objects that depends on the input.\nIt will then retrieve rich information from them, including their creation scripts and the order in which it should be applied.\n\nBy using the \u0027Parents\u0027 switch, the function will instead retrieve all items that the input depends on (including their creation scripts).\n\nFor more details on dependency, see:\nhttps://technet.microsoft.com/en-us/library/ms345449(v=sql.105).aspx",
        "Tags": [
                     "Database",
                     "Dependent",
                     "Dependency",
                     "Object"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Finds object dependencies and their relevant creation scripts.",
        "Name": "Get-DbaDependency",
        "Links": "https://dbatools.io/Get-DbaDependency",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$table = (Get-DbaDatabase -SqlInstance sql2012 -Database Northwind).tables | Where Name -eq Customers\nPS C:\\\u003e $table | Get-DbaDependency\nReturns everything that depends on the \"Customers\" table",
        "Syntax": "Get-DbaDependency [[-InputObject] \u003cObject\u003e] [-AllowSystemObjects] [-Parents] [-IncludeSelf] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDeprecatedFeature",
        "Description": "Displays information relating to deprecated features for SQL Server 2005 and above.",
        "Tags": "Deprecated",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Displays information relating to deprecated features for SQL Server 2005 and above.",
        "Name": "Get-DbaDeprecatedFeature",
        "Links": "https://dbatools.io/Get-DbaDeprecatedFeature",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2008 -Database testdb, db2 | Get-DbaDeprecatedFeature\nCheck deprecated features on server sql2008 for only the testdb and db2 databases\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDeprecatedFeature -SqlInstance sql2008, sqlserver2012\nCheck deprecated features for all databases on the servers sql2008 and sqlserver2012.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDeprecatedFeature -SqlInstance sql2008 -Database TestDB\nCheck deprecated features on server sql2008 for only the TestDB database\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDeprecatedFeature -SqlInstance sql2008 -Database TestDB -Threshold 20\nCheck deprecated features on server sql2008 for only the TestDB database, limiting results to 20% utilization of seed range or higher",
        "Syntax": "Get-DbaDeprecatedFeature [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDetachedDatabaseInfo",
        "Description": "Gathers the following information from detached database files: database name, SQL Server version (compatibility level), collation, and file structure.\n\n\"Data files\" and \"Log file\" report the structure of the data and log files as they were when the database was detached. \"Database version\" is the compatibility level.\n\nMDF files are most easily read by using a SQL Server to interpret them. Because of this, you must specify a SQL Server and the path must be relative to the SQL Server.",
        "Tags": [
                     "Database",
                     "Detach"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Get detailed information about detached SQL Server database files.",
        "Name": "Get-DbaDetachedDatabaseInfo",
        "Links": "https://dbatools.io/Get-DbaDetachedDatabaseInfo",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDetachedDatabaseInfo -SqlInstance sql2016 -Path M:\\Archive\\mydb.mdf\nReturns information about the detached database file M:\\Archive\\mydb.mdf using the SQL Server instance sql2016. The M drive is relative to the SQL Server instance.",
        "Syntax": "Get-DbaDetachedDatabaseInfo [-SqlInstance] \u003cDbaInstanceParameter\u003e [-Path] \u003cString\u003e [[-SqlCredential] \u003cPSCredential\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDiskSpace",
        "Description": "Returns a custom object with server name, name of disk, label of disk, total size, free size, percent free, block size and filesystem.\n\nBy default, this function only shows drives of types 2 and 3 (removable disk and local disk).\n\nRequires Windows administrator access on SQL Servers",
        "Tags": [
                     "Storage",
                     "Disk"
                 ],
        "Alias": "Get-DiskSpace",
        "Author": "Chrissy LeMaire (@cl), netnerds.net | Jakob Bindslet",
        "Synopsis": "Displays disk information for all local disk on a server.",
        "Name": "Get-DbaDiskSpace",
        "Links": "https://dbatools.io/Get-DbaDiskSpace",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDiskSpace -ComputerName srv0042\nGet disk space for the server srv0042.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDiskSpace -ComputerName srv0042 -Unit MB\nGet disk space for the server srv0042 and displays in megabytes (MB).\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDiskSpace -ComputerName srv0042, srv0007 -Unit TB\nGet disk space from two servers and displays in terabytes (TB).\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDiskSpace -ComputerName srv0042 -Force\nGet all disk and volume space information.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaDiskSpace -ComputerName srv0042 -ExcludeDrive \u0027C:\\\u0027\nGet all disk and volume space information.",
        "Syntax": "Get-DbaDiskSpace [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Unit] \u003cString\u003e] [-CheckForSql] [[-SqlCredential] \u003cPSCredential\u003e] [[-ExcludeDrive] \u003cString[]\u003e] [-CheckFragmentation] [-Force] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaDump",
        "Description": "The type of dump included in the search include minidump, all-thread dump, or a full dump. The files have an extendion of .mdmp.",
        "Tags": [
                     "Engine",
                     "Corruption"
                 ],
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Locate a SQL Server that has generated any memory dump files.",
        "Name": "Get-DbaDump",
        "Links": "https://dbatools.io/Get-DbaDump",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDump -SqlInstance sql2016\nShows the detailed information for memory dump(s) located on sql2016 instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDump -SqlInstance sql2016 -SqlCredential sqladmin\nShows the detailed information for memory dump(s) located on sql2016 instance. Logs into the SQL Server using the SQL login \u0027sqladmin\u0027",
        "Syntax": "Get-DbaDump [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaEndpoint",
        "Description": "The Get-DbaEndpoint command gets SQL Endpoint(s) information for each instance(s) of SQL Server.",
        "Tags": "Endpoint",
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets SQL Endpoint(s) information for each instance(s) of SQL Server.",
        "Name": "Get-DbaEndpoint",
        "Links": "https://dbatools.io/Get-DbaEndpoint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaEndpoint -SqlInstance localhost\nReturns all Endpoint(s) on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaEndpoint -SqlInstance localhost, sql2016\nReturns all Endpoint(s) for the local and sql2016 SQL Server instances",
        "Syntax": "Get-DbaEndpoint [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Endpoint \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaErrorLog",
        "Description": "Gets the \"SQL Error Log\" of an instance. Returns all 10 error logs by default.",
        "Tags": [
                     "Instance",
                     "ErrorLog"
                 ],
        "Alias": "Get-DbaLog",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets the \"SQL Error Log\" of an instance",
        "Name": "Get-DbaErrorLog",
        "Links": "https://dbatools.io/Get-DbaErrorLog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaErrorLog -SqlInstance sql01\\sharepoint\nReturns every log entry from sql01\\sharepoint SQL Server instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaErrorLog -SqlInstance sql01\\sharepoint -LogNumber 3, 6\nReturns all log entries for log number 3 and 6 on sql01\\sharepoint SQL Server instance.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaErrorLog -SqlInstance sql01\\sharepoint -Source Logon\nReturns every log entry, with a source of Logon, from sql01\\sharepoint SQL Server instance.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaErrorLog -SqlInstance sql01\\sharepoint -LogNumber 3 -Text \"login failed\"\nReturns every log entry for log number 3, with \"login failed\" in the text, from sql01\\sharepoint SQL Server instance.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$servers = \"sql2014\",\"sql2016\", \"sqlcluster\\sharepoint\"\nPS C:\\\u003e $servers | Get-DbaErrorLog -LogNumber 0\nReturns the most recent SQL Server error logs for \"sql2014\",\"sql2016\" and \"sqlcluster\\sharepoint\"\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaErrorLog -SqlInstance sql01\\sharepoint -After \u00272016-11-14 00:00:00\u0027\nReturns every log entry found after the date 14 November 2016 from sql101\\sharepoint SQL Server instance.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaErrorLog -SqlInstance sql01\\sharepoint -Before \u00272016-08-16 00:00:00\u0027\nReturns every log entry found before the date 16 August 2016 from sql101\\sharepoint SQL Server instance.",
        "Syntax": "Get-DbaErrorLog [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-LogNumber] \u003cInt32[]\u003e] [[-Source] \u003cObject[]\u003e] [[-Text] \u003cString\u003e] [[-After] \u003cDateTime\u003e] [[-Before] \u003cDateTime\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaErrorLogConfig",
        "Description": "Pulls the configuration for the ErrorLog on a given SQL Server instance.\n\nIncludes error log path, number of log files configured and size (SQL Server 2012+ only)",
        "Tags": [
                     "Instance",
                     "ErrorLog"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), https://wsmelton.github.io",
        "Synopsis": "Pulls the configuration for the ErrorLog on a given SQL Server instance",
        "Name": "Get-DbaErrorLogConfig",
        "Links": "https://dbatools.io/Get-DbaErrorLogConfig",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaErrorLogConfig -SqlInstance server2017,server2014\nReturns error log configuration for server2017 and server2014",
        "Syntax": "Get-DbaErrorLogConfig [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaEstimatedCompletionTime",
        "Description": "Gets execution and estimated completion time information for queries\n\nPercent complete will show for the following commands\n\nALTER INDEX REORGANIZE\nAUTO_SHRINK option with ALTER DATABASE\nBACKUP DATABASE\nDBCC CHECKDB\nDBCC CHECKFILEGROUP\nDBCC CHECKTABLE\nDBCC INDEXDEFRAG\nDBCC SHRINKDATABASE\nDBCC SHRINKFILE\nRECOVERY\nRESTORE DATABASE\nROLLBACK\nTDE ENCRYPTION\n\nFor additional information, check out https://blogs.sentryone.com/loriedwards/patience-dm-exec-requests/ and https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql",
        "Tags": "Database",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets execution and estimated completion time information for queries",
        "Name": "Get-DbaEstimatedCompletionTime",
        "Links": "https://dbatools.io/Get-DbaEstimatedCompletionTime",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaEstimatedCompletionTime -SqlInstance sql2016\nGets estimated completion times for queries performed against the entire server\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaEstimatedCompletionTime -SqlInstance sql2016 | Select *\nGets estimated completion times for queries performed against the entire server PLUS the SQL query text of each command\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaEstimatedCompletionTime -SqlInstance sql2016 | Where-Object { $_.Text -match \u0027somequerytext\u0027 }\nGets results for commands whose queries only match specific text (match is like LIKE but way more powerful)\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaEstimatedCompletionTime -SqlInstance sql2016 -Database Northwind,pubs,Adventureworks2014\nGets estimated completion times for queries performed against the Northwind, pubs, and Adventureworks2014 databases",
        "Syntax": "Get-DbaEstimatedCompletionTime [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaExecutionPlan",
        "Description": "Gets execution plans and metadata. Can pipe to Export-DbaExecutionPlan\n\nThanks to following for the queries:\nhttps://www.simple-talk.com/sql/t-sql-programming/dmvs-for-query-plan-metadata/\nhttp://www.scarydba.com/2017/02/13/export-plans-cache-sqlplan-file/",
        "Tags": "Performance",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets execution plans and metadata",
        "Name": "Get-DbaExecutionPlan",
        "Links": "https://dbatools.io/Get-DbaExecutionPlan",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaExecutionPlan -SqlInstance sqlserver2014a\nGets all execution plans on sqlserver2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaExecutionPlan -SqlInstance sqlserver2014a -Database db1, db2 -SinceLastExecution \u00272016-07-01 10:47:00\u0027\nGets all execution plans for databases db1 and db2 on sqlserver2014a since July 1, 2016 at 10:47 AM.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaExecutionPlan -SqlInstance sqlserver2014a, sql2016 -Exclude db1 | Format-Table\nGets execution plan info for all databases except db1 on sqlserver2014a and sql2016 and makes the output pretty\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaExecutionPlan -SqlInstance sql2014 -Database AdventureWorks2014, pubs -Force\nGets super detailed information for execution plans on only for AdventureWorks2014 and pubs\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$servers = \"sqlserver2014a\",\"sql2016t\"\nPS C:\\\u003e $servers | Get-DbaExecutionPlan -Force\nGets super detailed information for execution plans on sqlserver2014a and sql2016",
        "Syntax": "Get-DbaExecutionPlan [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-SinceCreation] \u003cDateTime\u003e] [[-SinceLastExecution] \u003cDateTime\u003e] [-ExcludeEmptyQueryPlan] [-Force] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaFeature",
        "Description": "Runs the SQL Server feature discovery report (setup.exe /Action=RunDiscovery)\n\nInspired by Dave Mason\u0027s (@BeginTry) post at\nhttps://itsalljustelectrons.blogspot.be/2018/04/SQL-Server-Discovery-Report.html\n\nAssumptions:\n1. The sub-folder \"Microsoft SQL Server\" exists in $env:ProgramFiles,\neven if SQL was installed to a non-default path. This has been\nverified on SQL 2008R2 and SQL 2012. Further verification may be needed.\n2. The discovery report displays installed components for the version of SQL\nServer associated with setup.exe, along with installed components of all\nlesser versions of SQL Server that are installed.",
        "Tags": [
                     "Feature",
                     "Component"
                 ],
        "Alias": "Get-DbaSqlFeature",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Runs the SQL Server feature discovery report (setup.exe /Action=RunDiscovery)",
        "Name": "Get-DbaFeature",
        "Links": "https://dbatools.io/Get-DbaFeature",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaFeature -ComputerName sql2017, sql2016, sql2005\nGets all SQL Server features for all instances on sql2017, sql2016 and sql2005.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaFeature -Verbose\nGets all SQL Server features for all instances on localhost. Outputs to screen if no instances are found.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaFeature -ComputerName sql2017 -Credential ad\\sqldba\nGets all SQL Server features for all instances on sql2017 using the ad\\sqladmin credential (which has access to the Windows Server).",
        "Syntax": "Get-DbaFeature [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaFile",
        "Description": "This command searches all specified directories, allowing a DBA to see file information on a server without direct access\n\nYou can filter by extension using the -FileType parameter. By default, the default data directory will be returned. You can provide and additional paths to search using the -Path parameter.\n\nThanks to serg-52 for the query: https://www.sqlservercentral.com/Forums/Topic1642213-391-1.aspx",
        "Tags": "Discovery",
        "Alias": "",
        "Author": "Brandon Abshire, netnerds.net",
        "Synopsis": "Get-DbaFile finds files in any directory specified on a remote SQL Server",
        "Name": "Get-DbaFile",
        "Links": "https://dbatools.io/Get-DbaFile",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaFile -SqlInstance sqlserver2014a -Path E:\\Dir1\nLogs into the SQL Server \"sqlserver2014a\" using Windows credentials and searches E:\\Dir for all files\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaFile -SqlInstance sqlserver2014a -SqlCredential $cred -Path \u0027E:\\sql files\u0027\nLogs into the SQL Server \"sqlserver2014a\" using alternative credentials and returns all files in \u0027E:\\sql files\u0027\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$all = Get-DbaDefaultPath -SqlInstance sql2014\nPS C:\\\u003e Get-DbaFile -SqlInstance sql2014 -Path $all.Data, $all.Log, $all.Backup -Depth 3\nReturns the files in the default data, log and backup directories on sql2014, 3 directories deep (recursively).\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaFile -SqlInstance sql2014 -Path \u0027E:\\Dir1\u0027, \u0027E:\\Dir2\u0027\nReturns the files in \"E:\\Dir1\" and \"E:Dir2\" on sql2014\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaFile -SqlInstance -Path \u0027E:\\Dir1\u0027 sql2014, sql2016 -FileType fsf, mld\nFinds files in E:\\Dir1 ending with \".fsf\" and \".mld\" for both the servers sql2014 and sql2016.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaFile -SqlInstance -Path \u0027E:\\Dir1\u0027 sql2014, sql2016 -FileType fsf, mld\nFinds files in E:\\Dir1 ending with \".fsf\" and \".mld\" for both the servers sql2014 and sql2016.",
        "Syntax": "Get-DbaFile [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Path] \u003cString[]\u003e] [[-FileType] \u003cString[]\u003e] [[-Depth] \u003cInt32\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaForceNetworkEncryption",
        "Description": "Gets Force Encryption settings for a SQL Server instance. Note that this requires access to the Windows Server - not the SQL instance itself.\n\nThis setting is found in Configuration Manager.",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets Force Encryption settings for a SQL Server instance",
        "Name": "Get-DbaForceNetworkEncryption",
        "Links": "https://dbatools.io/Get-DbaForceNetworkEncryption",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaForceNetworkEncryption\nGets Force Encryption properties on the default (MSSQLSERVER) instance on localhost - requires (and checks for) RunAs admin.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaForceNetworkEncryption -SqlInstance sql01\\SQL2008R2SP2\nGets Force Network Encryption for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both login and view the registry.",
        "Syntax": "Get-DbaForceNetworkEncryption [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaHelpIndex",
        "Description": "This function will return detailed information on indexes (and optionally statistics) for all indexes in a database, or a given index should one be passed along.\nAs this uses SQL Server DMVs to access the data it will only work in 2005 and up (sorry folks still running SQL Server 2000).\nFor performance reasons certain statistics information will not be returned from SQL Server 2005 if an ObjectName is not provided.\n\nThe data includes:\n- ObjectName: the table containing the index\n- IndexType: clustered/non-clustered/columnstore and whether the index is unique/primary key\n- KeyColumns: the key columns of the index\n- IncludeColumns: any include columns in the index\n- FilterDefinition: any filter that may have been used in the index\n- DataCompression: row/page/none depending upon whether or not compression has been used\n- IndexReads: the number of reads of the index since last restart or index rebuild\n- IndexUpdates: the number of writes to the index since last restart or index rebuild\n- SizeKB: the size the index in KB\n- IndexRows: the number of the rows in the index (note filtered indexes will have fewer rows than exist in the table)\n- IndexLookups: the number of lookups that have been performed (only applicable for the heap or clustered index)\n- MostRecentlyUsed: when the index was most recently queried (default to 1900 for when never read)\n- StatsSampleRows: the number of rows queried when the statistics were built/rebuilt (not included in SQL Server 2005 unless ObjectName is specified)\n- StatsRowMods: the number of changes to the statistics since the last rebuild\n- HistogramSteps: the number of steps in the statistics histogram (not included in SQL Server 2005 unless ObjectName is specified)\n- StatsLastUpdated: when the statistics were last rebuilt (not included in SQL Server 2005 unless ObjectName is specified)",
        "Tags": "Index",
        "Alias": "",
        "Author": "Nic Cain, https://sirsql.net/",
        "Synopsis": "Returns size, row and configuration information for indexes in databases.",
        "Name": "Get-DbaHelpIndex",
        "Links": "https://dbatools.io/Get-DbaHelpIndex",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaHelpIndex -SqlInstance localhost -Database MyDB\nReturns information on all indexes on the MyDB database on the localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaHelpIndex -SqlInstance localhost -Database MyDB,MyDB2\nReturns information on all indexes on the MyDB \u0026 MyDB2 databases.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaHelpIndex -SqlInstance localhost -Database MyDB -ObjectName dbo.Table1\nReturns index information on the object dbo.Table1 in the database MyDB.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaHelpIndex -SqlInstance localhost -Database MyDB -ObjectName dbo.Table1 -IncludeStats\nReturns information on the indexes and statistics for the table dbo.Table1 in the MyDB database.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaHelpIndex -SqlInstance localhost -Database MyDB -ObjectName dbo.Table1 -IncludeDataTypes\nReturns the index information for the table dbo.Table1 in the MyDB database, and includes the data types for the key and include columns.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaHelpIndex -SqlInstance localhost -Database MyDB -ObjectName dbo.Table1 -Raw\nReturns the index information for the table dbo.Table1 in the MyDB database, and returns the numerical data without localized separators.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaHelpIndex -SqlInstance localhost -Database MyDB -IncludeStats -Raw\nReturns the index information for all indexes in the MyDB database as well as their statistics, and formats the numerical data without localized separators.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eGet-DbaHelpIndex -SqlInstance localhost -Database MyDB -IncludeFragmentation\nReturns the index information for all indexes in the MyDB database as well as their fragmentation\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2017 -Database MyDB | Get-DbaHelpIndex\nReturns the index information for all indexes in the MyDB database",
        "Syntax": "Get-DbaHelpIndex [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [[-ObjectName] \u003cString\u003e] [-IncludeStats] [-IncludeDataTypes] [-Raw] [-IncludeFragmentation] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaInstanceProperty",
        "Description": "The Get-DbaInstanceProperty command gets SQL Server instance properties from the SMO object sqlserver.",
        "Tags": [
                     "Instance",
                     "Configure",
                     "Configuration"
                 ],
        "Alias": "Get-DbaSqlInstanceProperty",
        "Author": "Klaas Vandenberghe (@powerdbaklaas)",
        "Synopsis": "Gets SQL Server instance properties of one or more instance(s) of SQL Server.",
        "Name": "Get-DbaInstanceProperty",
        "Links": "https://dbatools.io/Get-DbaInstanceProperty",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaInstanceProperty -SqlInstance localhost\nReturns SQL Server instance properties on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaInstanceProperty -SqlInstance sql2, sql4\\sqlexpress\nReturns SQL Server instance properties on default instance on sql2 and sqlexpress instance on sql4\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027sql2\u0027,\u0027sql4\u0027 | Get-DbaInstanceProperty\nReturns SQL Server instance properties on sql2 and sql4\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaInstanceProperty -SqlInstance sql2,sql4 -InstanceProperty DefaultFile\nReturns SQL Server instance property DefaultFile on instance sql2 and sql4\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaInstanceProperty -SqlInstance sql2,sql4 -ExcludeInstanceProperty DefaultFile\nReturns all SQL Server instance properties except DefaultFile on instance sql2 and sql4\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$cred = Get-Credential sqladmin\nPS C:\\\u003e Get-DbaInstanceProperty -SqlInstance sql2 -SqlCredential $cred\nConnects using sqladmin credential and returns SQL Server instance properties from sql2",
        "Syntax": "Get-DbaInstanceProperty [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-InstanceProperty \u003cObject[]\u003e] [-ExcludeInstanceProperty \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaInstanceUserOption",
        "Description": "The Get-DbaInstanceUserOption command gets SQL Instance user options from the SMO object sqlserver.",
        "Tags": [
                     "Instance",
                     "Configure",
                     "UserOption"
                 ],
        "Alias": "Get-DbaSqlInstanceUserOption",
        "Author": "Klaas Vandenberghe (@powerdbaklaas)",
        "Synopsis": "Gets SQL Instance user options of one or more instance(s) of SQL Server.",
        "Name": "Get-DbaInstanceUserOption",
        "Links": "https://dbatools.io/Get-DbaInstanceUserOption",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaInstanceUserOption -SqlInstance localhost\nReturns SQL Instance user options on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaInstanceUserOption -SqlInstance sql2, sql4\\sqlexpress\nReturns SQL Instance user options on default instance on sql2 and sqlexpress instance on sql4\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027sql2\u0027,\u0027sql4\u0027 | Get-DbaInstanceUserOption\nReturns SQL Instance user options on sql2 and sql4",
        "Syntax": "Get-DbaInstanceUserOption [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaLastBackup",
        "Description": "Retrieves and compares the date/time for the last known backups, as well as the creation date/time for the database.\n\nDefault output includes columns Server, Database, RecoveryModel, LastFullBackup, LastDiffBackup, LastLogBackup, SinceFull, SinceDiff, SinceLog, Status, DatabaseCreated, DaysSinceDbCreated.",
        "Tags": [
                     "DisasterRecovery",
                     "Backup"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Get date/time for last known backups of databases.",
        "Name": "Get-DbaLastBackup",
        "Links": "https://dbatools.io/Get-DbaLastBackup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaLastBackup -SqlInstance ServerA\\sql987\nReturns a custom object displaying Server, Database, RecoveryModel, LastFullBackup, LastDiffBackup, LastLogBackup, SinceFull, SinceDiff, SinceLog, Status, DatabaseCreated, DaysSinceDbCreated\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaLastBackup -SqlInstance ServerA\\sql987\nReturns a custom object with Server name, Database name, and the date the last time backups were performed.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaLastBackup -SqlInstance ServerA\\sql987 | Select *\nReturns a custom object with Server name, Database name, and the date the last time backups were performed, and also recoverymodel and calculations on how long ago backups were taken and what the \r\nstatus is.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaLastBackup -SqlInstance ServerA\\sql987 | Select * | Out-Gridview\nReturns a gridview displaying Server, Database, RecoveryModel, LastFullBackup, LastDiffBackup, LastLogBackup, SinceFull, SinceDiff, SinceLog, Status, DatabaseCreated, DaysSinceDbCreated.",
        "Syntax": "Get-DbaLastBackup [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaLastGoodCheckDb",
        "Description": "Retrieves and compares the date/time for the last known good DBCC CHECKDB, as well as the creation date/time for the database.\n\nThis function supports SQL Server 2005 and higher.\n\nPlease note that this script uses the DBCC DBINFO() WITH TABLERESULTS. DBCC DBINFO has several known weak points, such as:\n- DBCC DBINFO is an undocumented feature/command.\n- The LastKnowGood timestamp is updated when a DBCC CHECKFILEGROUP is performed.\n- The LastKnowGood timestamp is updated when a DBCC CHECKDB WITH PHYSICAL_ONLY is performed.\n- The LastKnowGood timestamp does not get updated when a database in READ_ONLY.\n\nAn empty ($null) LastGoodCheckDb result indicates that a good DBCC CHECKDB has never been performed.\n\nSQL Server 2008R2 has a \"bug\" that causes each databases to possess two dbi_dbccLastKnownGood fields, instead of the normal one.\n\nThis script will only display this function to only display the newest timestamp. If -Verbose is specified, the function will announce every time more than one dbi_dbccLastKnownGood fields is encountered.",
        "Tags": [
                     "CHECKDB",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Jakob Bindslet (jakob@bindslet.dk)",
        "Synopsis": "Get date/time for last known good DBCC CHECKDB",
        "Name": "Get-DbaLastGoodCheckDb",
        "Links": "https://dbatools.io/Get-DbaLastGoodCheckDb",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaLastGoodCheckDb -SqlInstance ServerA\\sql987\nReturns a custom object displaying Server, Database, DatabaseCreated, LastGoodCheckDb, DaysSinceDbCreated, DaysSinceLastGoodCheckDb, Status and DataPurityEnabled\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaLastGoodCheckDb -SqlInstance ServerA\\sql987 -SqlCredential sqladmin | Format-Table -AutoSize\nReturns a formatted table displaying Server, Database, DatabaseCreated, LastGoodCheckDb, DaysSinceDbCreated, DaysSinceLastGoodCheckDb, Status and DataPurityEnabled. Authenticates using SQL Server \r\nauthentication.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaLastGoodCheckDb -SqlInstance sql2016 -ExcludeDatabase \"TempDB\" | Format-Table -AutoSize\nReturns a formatted table displaying Server, Database, DatabaseCreated, LastGoodCheckDb, DaysSinceDbCreated, DaysSinceLastGoodCheckDb, Status and DataPurityEnabled. All databases except for \"TempDB\" \r\nwill be displayed in the output.",
        "Syntax": "Get-DbaLastGoodCheckDb [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaLinkedServer",
        "Description": "Retrieves information about each linked server on the instance",
        "Tags": [
                     "LinkedServer",
                     "Linked"
                 ],
        "Alias": "",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Gets all linked servers and summary of information from the sql servers listed",
        "Name": "Get-DbaLinkedServer",
        "Links": "https://dbatools.io/Get-DbaLinkedServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaLinkedServer -SqlInstance DEV01\nReturns all Linked Servers for the SQL Server instance DEV01",
        "Syntax": "Get-DbaLinkedServer [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-LinkedServer] \u003cObject[]\u003e] [[-ExcludeLinkedServer] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaLocaleSetting",
        "Description": "Gets the Locale settings on one or more computers.\n\nRequires Local Admin rights on destination computer(s).",
        "Tags": "OS",
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Gets the Locale settings on a computer.",
        "Name": "Get-DbaLocaleSetting",
        "Links": "https://dbatools.io/Get-DbaLocaleSetting",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaLocaleSetting -ComputerName sqlserver2014a\nGets the Locale settings on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Get-DbaLocaleSetting\nGets the Locale settings on computers sql1, sql2 and sql3.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaLocaleSetting -ComputerName sql1,sql2 -SqlCredential $credential | Out-Gridview\nGets the Locale settings on computers sql1 and sql2 using SQL Authentication to authenticate to the servers, and shows them in a grid view.",
        "Syntax": "Get-DbaLocaleSetting [[-ComputerName] \u003cString[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaLogin",
        "Description": "The Get-DbaLogin function returns an SMO Login object for the logins passed, if there are no users passed it will return all logins.",
        "Tags": [
                     "Login",
                     "Security"
                 ],
        "Alias": "",
        "Author": "Mitchell Hamann (@SirCaptainMitch) | Rob Sewell (@SQLDBaWithBeard)",
        "Synopsis": "Function to get an SMO login object of the logins for a given SQL Instance. Takes a server object from the pipe",
        "Name": "Get-DbaLogin",
        "Links": "https://dbatools.io/Get-DbaLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016\nGets all the logins from server sql2016 using NT authentication and returns the SMO login objects\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -SqlCredential $sqlcred\nGets all the logins for a given SQL Server using a passed credential object and returns the SMO login objects\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -SqlCredential $sqlcred -Login dbatoolsuser,TheCaptain\nGet specific logins from server sql2016 returned as SMO login objects.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -IncludeFilter \u0027##*\u0027,\u0027NT *\u0027\nGet all user objects from server sql2016 beginning with \u0027##\u0027 or \u0027NT \u0027, returned as SMO login objects.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -ExcludeLogin dbatoolsuser\nGet all user objects from server sql2016 except the login dbatoolsuser, returned as SMO login objects.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -WindowsLogins\nGet all user objects from server sql2016 that are Windows Logins\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -WindowsLogins -IncludeFilter *Rob*\nGet all user objects from server sql2016 that are Windows Logins and have Rob in the name\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -SQLLogins\nGet all user objects from server sql2016 that are SQLLogins\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -SQLLogins -IncludeFilter *Rob*\nGet all user objects from server sql2016 that are SQLLogins and have Rob in the name\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -NoSystem\nGet all user objects from server sql2016 that are not system objects\n-------------------------- EXAMPLE 11 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql2016 -ExcludeFilter \u0027##*\u0027,\u0027NT *\u0027\nGet all user objects from server sql2016 except any beginning with \u0027##\u0027 or \u0027NT \u0027, returned as SMO login objects.\n-------------------------- EXAMPLE 12 --------------------------\nPS C:\\\u003e\u0027sql2016\u0027, \u0027sql2014\u0027 | Get-DbaLogin -SqlCredential $sqlcred\nUsing Get-DbaLogin on the pipeline, you can also specify which names you would like with -Login.\n-------------------------- EXAMPLE 13 --------------------------\nPS C:\\\u003e\u0027sql2016\u0027, \u0027sql2014\u0027 | Get-DbaLogin -SqlCredential $sqlcred -Locked\nUsing Get-DbaLogin on the pipeline to get all locked logins on servers sql2016 and sql2014.\n-------------------------- EXAMPLE 14 --------------------------\nPS C:\\\u003e\u0027sql2016\u0027, \u0027sql2014\u0027 | Get-DbaLogin -SqlCredential $sqlcred -HasAccess -Disabled\nUsing Get-DbaLogin on the pipeline to get all Disabled logins that have access on servers sql2016 or sql2014.",
        "Syntax": "Get-DbaLogin [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Login \u003cObject[]\u003e] [-IncludeFilter \u003cObject[]\u003e] [-ExcludeLogin \u003cObject[]\u003e] [-ExcludeFilter \u003cObject[]\u003e] [-NoSystem] [-SQLLogins] [-WindowsLogins] [-HasAccess] [-Locked] [-Disabled] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaMaintenanceSolutionLog",
        "Description": "Ola wrote a .sql script to get the content from the commandLog table. However, if LogToTable=\u0027N\u0027, there will be no logging in that table. This function reads the text files that are written in the SQL Instance\u0027s Log directory.",
        "Tags": [
                     "Ola",
                     "Maintenance"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@powerdbaklaas) | Simone Bizzotto ( @niphlod )",
        "Synopsis": "Reads the log files generated by the IndexOptimize Agent Job from Ola Hallengren\u0027s MaintenanceSolution.",
        "Name": "Get-DbaMaintenanceSolutionLog",
        "Links": "https://dbatools.io/Get-DbaMaintenanceSolutionLog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a\nGets the outcome of the IndexOptimize job on sql instance sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -SqlCredential $credential\nGets the outcome of the IndexOptimize job on sqlserver2014a, using SQL Authentication.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027sqlserver2014a\u0027, \u0027sqlserver2020test\u0027 | Get-DbaMaintenanceSolutionLog\nGets the outcome of the IndexOptimize job on sqlserver2014a and sqlserver2020test.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -Path \u0027D:\\logs\\maintenancesolution\\\u0027\nGets the outcome of the IndexOptimize job on sqlserver2014a, reading the log files in their custom location.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -Since \u00272017-07-18\u0027\nGets the outcome of the IndexOptimize job on sqlserver2014a, starting from july 18, 2017.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -LogType IndexOptimize\nGets the outcome of the IndexOptimize job on sqlserver2014a, the other options are not yet available! sorry",
        "Syntax": "Get-DbaMaintenanceSolutionLog [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-LogType] \u003cString[]\u003e] [[-Since] \u003cDateTime\u003e] [[-Path] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaManagementObject",
        "Description": "The Get-DbaManagementObject returns an object with the Version and the\nAdd-Type Load Template for each version on the server.",
        "Tags": "SMO",
        "Alias": "Get-DbaSqlManagementObject",
        "Author": "Ben Miller (@DBAduck), http://dbaduck.com",
        "Synopsis": "Gets SQL Mangaement Object versions installed on the machine.",
        "Name": "Get-DbaManagementObject",
        "Links": "https://dbatools.io/Get-DbaManagementObject",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaManagementObject\nReturns all versions of SMO on the computer\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaManagementObject -VersionNumber 13\nReturns just the version specified. If the version does not exist then it will return nothing.",
        "Syntax": "Get-DbaManagementObject [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-VersionNumber] \u003cInt32\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaMaxMemory",
        "Description": "This command retrieves the SQL Server \u0027Max Server Memory\u0027 configuration setting as well as the total physical installed on the server.",
        "Tags": [
                     "MaxMemory",
                     "Memory"
                 ],
        "Alias": "Get-SqlMaxMemory",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets the \u0027Max Server Memory\u0027 configuration setting and the memory of the server. Works on SQL Server 2000-2014.",
        "Name": "Get-DbaMaxMemory",
        "Links": "https://dbatools.io/Get-DbaMaxMemory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaMaxMemory -SqlInstance sqlcluster,sqlserver2012\nGet memory settings for all servers within the SQL Server Central Management Server \"sqlcluster\".\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaMaxMemory -SqlInstance sqlcluster | Where-Object { $_.SqlMaxMB -gt $_.TotalMB }\nFind all servers in Server Central Management Server that have \u0027Max Server Memory\u0027 set to higher than the total memory of the server (think 2147483647)\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eFind-DbaInstance -ComputerName localhost | Get-DbaMaxMemory | Format-Table -AutoSize\nScans localhost for instances using the browser service, traverses all instances and displays memory settings in a formatted table.",
        "Syntax": "Get-DbaMaxMemory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaMemoryUsage",
        "Description": "Retrieves the amount of memory per performance counter. Default output includes columns Server, counter instance, counter, number of pages, memory in KB, memory in MB\nSSAS and SSIS are included.\n\nSSRS does not have memory counters, only memory shrinks and memory pressure state.\n\nThis function requires local admin role on the targeted computers.",
        "Tags": "Memory",
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Get amount of memory in use by *all* SQL Server components and instances",
        "Name": "Get-DbaMemoryUsage",
        "Links": "https://dbatools.io/Get-DbaMemoryUsage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaMemoryUsage -ComputerName ServerA\nReturns a custom object displaying Server, counter instance, counter, number of pages, memory in KB, memory in MB\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaMemoryUsage -ComputerName ServerA\\sql987 -Simple\nReturns a custom object with Server, counter instance, counter, number of pages, memory in KB, memory in MB\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaMemoryUsage -ComputerName ServerA\\sql987 | Out-Gridview\nReturns a gridview displaying Server, counter instance, counter, number of pages, memory in KB, memory in MB",
        "Syntax": "Get-DbaMemoryUsage [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-Simple] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaModule",
        "Description": "Quickly find modules (Stored Procs, Functions, Views, Constraints, Rules, Triggers, etc) that have been modified in a database, or across all databases.\nResults will exclude the module definition, but can be queried explicitly.",
        "Tags": [
                     "StoredProcedure",
                     "Trigger"
                 ],
        "Alias": "Get-DbaSqlModule",
        "Author": "Brandon Abshire, netnerds.net",
        "Synopsis": "Displays all objects in sys.sys_modules after specified modification date. Works on SQL Server 2008 and above.",
        "Name": "Get-DbaModule",
        "Links": "https://dbatools.io/Get-DbaModule",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaModule -SqlInstance sql2008, sqlserver2012\nReturn all modules for servers sql2008 and sqlserver2012 sorted by Database, Modify_Date ASC.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaModule -SqlInstance sql2008, sqlserver2012 | Select *\nShows hidden definition column (informative wall of text).\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaModule -SqlInstance sql2008 -Database TestDB -ModifiedSince \"2017-01-01 10:00:00\"\nReturn all modules on server sql2008 for only the TestDB database with a modified date after 1 January 2017 10:00:00 AM.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaModule -SqlInstance sql2008 -Type View, Trigger, ScalarFunction\nReturn all modules on server sql2008 for all databases that are triggers, views or scalar functions.",
        "Syntax": "Get-DbaModule [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-ModifiedSince] \u003cDateTime\u003e] [[-Type] \u003cString[]\u003e] [-NoSystemDb] [-NoSystemObjects] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaMsdtc",
        "Description": "Returns a custom object with Computer name, state of the MSDTC Service, security settings of MSDTC and CID\u0027s\n\nRequires: Windows administrator access on Servers",
        "Tags": [
                     "Msdtc",
                     "dtc"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@powerdbaklaas)",
        "Synopsis": "Displays information about the Distributed Transaction Coordinator (MSDTC) on a server",
        "Name": "Get-DbaMsdtc",
        "Links": "https://dbatools.io/Get-DbaMsdtc",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaMsdtc -ComputerName srv0042\nGet DTC status for the server srv0042\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$Computers = (Get-Content D:\\configfiles\\SQL\\MySQLInstances.txt | % {$_.split(\u0027\\\u0027)[0]})\nPS C:\\\u003e $Computers | Get-DbaMsdtc\nGet DTC status for all the computers in a .txt file\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaMsdtc -Computername $Computers | where { $_.dtcservicestate -ne \u0027running\u0027 }\nGet DTC status for all the computers where the MSDTC Service is not running\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaMsdtc -ComputerName srv0042 | Out-Gridview\nGet DTC status for the computer srv0042 and show in a grid view",
        "Syntax": "Get-DbaMsdtc [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaNetworkActivity",
        "Description": "Gets the Current traffic on every Network Interface on a computer.\nSee https://msdn.microsoft.com/en-us/library/aa394293(v=vs.85).aspx\n\nRequires Local Admin rights on destination computer(s).",
        "Tags": "Network",
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Gets the Current traffic on every Network Interface on a computer.",
        "Name": "Get-DbaNetworkActivity",
        "Links": "https://dbatools.io/Get-DbaNetworkActivity",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaNetworkActivity -ComputerName sqlserver2014a\nGets the Current traffic on every Network Interface on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Get-DbaNetworkActivity\nGets the Current traffic on every Network Interface on computers sql1, sql2 and sql3.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaNetworkActivity -ComputerName sql1,sql2 | Out-Gridview\nGets the Current traffic on every Network Interface on computers sql1 and sql2, and shows them in a grid view.",
        "Syntax": "Get-DbaNetworkActivity [[-ComputerName] \u003cString[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaNetworkCertificate",
        "Description": "Gets computer certificates on localhost that are candidates for using with SQL Server\u0027s network encryption",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Simplifies finding computer certificates that are candidates for using with SQL Server\u0027s network encryption",
        "Name": "Get-DbaNetworkCertificate",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaNetworkCertificate\nGets computer certificates on localhost that are candidates for using with SQL Server\u0027s network encryption\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaNetworkCertificate -ComputerName sql2016\nGets computer certificates on sql2016 that are being used for SQL Server network encryption",
        "Syntax": "Get-DbaNetworkCertificate [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaOpenTransaction",
        "Description": "This command is based on open transaction script published by Paul Randal.\nReference: https://www.sqlskills.com/blogs/paul/script-open-transactions-with-text-and-plans/",
        "Tags": [
                     "Database",
                     "Process",
                     "Session",
                     "ActivityMonitor"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Displays all open transactions.",
        "Name": "Get-DbaOpenTransaction",
        "Links": "https://dbatools.io/Get-DbaOpenTransaction",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaOpenTransaction -SqlInstance sqlserver2014a\nReturns open transactions for sqlserver2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaOpenTransaction -SqlInstance sqlserver2014a -SqlCredential sqladmin\nLogs into sqlserver2014a using the login \"sqladmin\"",
        "Syntax": "Get-DbaOpenTransaction [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaOperatingSystem",
        "Description": "Gets operating system information from the server and returns as an object.",
        "Tags": [
                     "ServerInfo",
                     "OperatingSystem"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), https://wsmelton.github.io",
        "Synopsis": "Gets operating system information from the server.",
        "Name": "Get-DbaOperatingSystem",
        "Links": "https://dbatools.io/Get-DbaOperatingSystem",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaOperatingSystem\nReturns information about the local computer\u0027s operating system\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaOperatingSystem -ComputerName sql2016\nReturns information about the sql2016\u0027s operating system\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$wincred = Get-Credential ad\\sqladmin\nPS C:\\\u003e \u0027sql2016\u0027, \u0027sql2017\u0027 | Get-DbaOperatingSystem -Credential $wincred\nReturns information about the sql2016 and sql2017 operating systems using alternative Windows credentials\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-Content .\\servers.txt | Get-DbaOperatingSystem\nReturns information about all the servers operating system that are stored in the file. Every line in the file can only contain one hostname for a server.",
        "Syntax": "Get-DbaOperatingSystem [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaOrphanUser",
        "Description": "An orphan user is defined by a user that does not have their matching login. (Login property = \"\").",
        "Tags": [
                     "Orphan",
                     "Database",
                     "User",
                     "Security",
                     "Login"
                 ],
        "Alias": "",
        "Author": "Claudio Silva (@ClaudioESSilva) | Garry Bargsley (@gbargsley) | Simone Bizzotto (@niphlod)",
        "Synopsis": "Get orphaned users.",
        "Name": "Get-DbaOrphanUser",
        "Links": "https://dbatools.io/Get-DbaOrphanUser",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaOrphanUser -SqlInstance localhost\\sql2016\nFinds all orphan users without matching Logins in all databases present on server \u0027localhost\\sql2016\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaOrphanUser -SqlInstance localhost\\sql2016 -SqlCredential $cred\nFinds all orphan users without matching Logins in all databases present on server \u0027localhost\\sql2016\u0027. SQL Server authentication will be used in connecting to the server.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaOrphanUser -SqlInstance localhost\\sql2016 -Database db1\nFinds orphan users without matching Logins in the db1 database present on server \u0027localhost\\sql2016\u0027.",
        "Syntax": "Get-DbaOrphanUser [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPageFileSetting",
        "Description": "This command uses CIM (or other, related computer management tools) to detect the page file configuration of the target computer(s).\n\nNote that this may require local administrator privileges for the relevant computers.",
        "Tags": "CIM",
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Returns information on the page file configuration of the target computer.",
        "Name": "Get-DbaPageFileSetting",
        "Links": "https://dbatools.io/Get-DbaPageFileSetting",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPageFileSetting -ComputerName ServerA,ServerB\nReturns a custom object displaying ComputerName, AutoPageFile, FileName, Status, LastModified, LastAccessed, AllocatedBaseSize, InitialSize, MaximumSize, PeakUsage, CurrentUsage for ServerA and \r\nServerB\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027ServerA\u0027 | Get-DbaPageFileSetting\nReturns a custom object displaying ComputerName, AutoPageFile, FileName, Status, LastModified, LastAccessed, AllocatedBaseSize, InitialSize, MaximumSize, PeakUsage, CurrentUsage for ServerA",
        "Syntax": "Get-DbaPageFileSetting [[-ComputerName] \u003cDbaInstanceParameter\u003e] [-Credential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPbmCategory",
        "Description": "Returns policy categories from policy based management from an instance.",
        "Tags": [
                     "Policy",
                     "PolicyBasedManagement",
                     "PBM"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns policy categories from policy based management from an instance.",
        "Name": "Get-DbaPbmCategory",
        "Links": "https://dbatools.io/Get-DbaPbmCategory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPbmCategory -SqlInstance sql2016\nReturns all policy categories from the sql2016 PBM server\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPbmCategory -SqlInstance sql2016 -SqlCredential $cred\nUses a credential $cred to connect and return all policy categories from the sql2016 PBM server",
        "Syntax": "Get-DbaPbmCategory [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Category] \u003cString[]\u003e] [[-InputObject] \u003cPolicyStore[]\u003e] [-ExcludeSystemObject] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPbmCategorySubscription",
        "Description": "Returns policy category subscriptions from policy based management from an instance.",
        "Tags": [
                     "Policy",
                     "PolicyBasedManagement",
                     "PBM"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns policy category subscriptions from policy based management from an instance.",
        "Name": "Get-DbaPbmCategorySubscription",
        "Links": "https://dbatools.io/Get-DbaPbmCategorySubscription",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPbmCategorySubscription -SqlInstance sql2016\nReturns all policy category subscriptions from the sql2016 PBM server\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPbmCategorySubscription -SqlInstance sql2016 -SqlCredential $cred\nUses a credential $cred to connect and return all policy category subscriptions from the sql2016 PBM server",
        "Syntax": "Get-DbaPbmCategorySubscription [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-InputObject] \u003cPolicyStore[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPbmCondition",
        "Description": "Returns conditions from policy based management from an instance.",
        "Tags": [
                     "Policy",
                     "PolicyBasedManagement",
                     "PBM"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns conditions from policy based management from an instance.",
        "Name": "Get-DbaPbmCondition",
        "Links": "https://dbatools.io/Get-DbaPbmCondition",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPbmCondition -SqlInstance sql2016\nReturns all conditions from the sql2016 PBM server\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPbmCondition -SqlInstance sql2016 -SqlCredential $cred\nUses a credential $cred to connect and return all conditions from the sql2016 PBM server",
        "Syntax": "Get-DbaPbmCondition [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Condition] \u003cString[]\u003e] [[-InputObject] \u003cPolicyStore[]\u003e] [-IncludeSystemObject] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPbmObjectSet",
        "Description": "Returns object sets from policy based management.",
        "Tags": [
                     "Policy",
                     "PolicyBasedManagement",
                     "PBM"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns object sets from policy based management.",
        "Name": "Get-DbaPbmObjectSet",
        "Links": "https://dbatools.io/Get-DbaPbmObjectSet",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPbmObjectSet -SqlInstance sql2016\nReturns all object sets from the sql2016 PBM instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPbmObjectSet -SqlInstance sql2016 -SqlCredential $cred\nUses a credential $cred to connect and return all object sets from the sql2016 PBM instance",
        "Syntax": "Get-DbaPbmObjectSet [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-ObjectSet] \u003cString[]\u003e] [[-InputObject] \u003cPolicyStore[]\u003e] [-IncludeSystemObject] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPbmPolicy",
        "Description": "Returns details of policies with the option to filter on Category and SystemObjects.",
        "Tags": [
                     "Policy",
                     "PolicyBasedManagement",
                     "PBM"
                 ],
        "Alias": "Get-DbaPolicy",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Returns polices from policy based management from an instance.",
        "Name": "Get-DbaPbmPolicy",
        "Links": "https://dbatools.io/Get-DbaPbmPolicy",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPbmPolicy -SqlInstance sql2016\nReturns all policies from sql2016 server\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPbmPolicy -SqlInstance sql2016 -SqlCredential $cred\nUses a credential $cred to connect and return all policies from sql2016 instance\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPbmPolicy -SqlInstance sql2016 -Category MorningCheck\nReturns all policies from sql2016 server that part of the PolicyCategory MorningCheck",
        "Syntax": "Get-DbaPbmPolicy [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Policy] \u003cString[]\u003e] [[-Category] \u003cString[]\u003e] [[-InputObject] \u003cPolicyStore[]\u003e] [-IncludeSystemObject] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPbmStore",
        "Description": "Returns the policy based management store.",
        "Tags": [
                     "Policy",
                     "PolicyBasedManagement",
                     "PBM"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns the policy based management store.",
        "Name": "Get-DbaPbmStore",
        "Links": "https://dbatools.io/Get-DbaPbmStore",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPbmStore -SqlInstance sql2016\nReturn the policy store from the sql2016 instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPbmStore -SqlInstance sql2016 -SqlCredential $cred\nUses a credential $cred to connect and return the policy store from the sql2016 instance",
        "Syntax": "Get-DbaPbmStore [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPermission",
        "Description": "Retrieves a list of permissions\n\nPermissions link principals to securables.\nPrincipals exist on Windows, Instance and Database level.\nSecurables exist on Instance and Database level.\nA permission state can be GRANT, DENY or REVOKE.\nThe permission type can be SELECT, CONNECT, EXECUTE and more.\n\nSee https://msdn.microsoft.com/en-us/library/ms191291.aspx for more information",
        "Tags": [
                     "Permissions",
                     "Databases"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Get a list of Server and Database level permissions",
        "Name": "Get-DbaPermission",
        "Links": "https://dbatools.io/Get-DbaPermission",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPermission -SqlInstance ServerA\\sql987\nReturns a custom object with Server name, Database name, permission state, permission type, grantee and securable.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPermission -SqlInstance ServerA\\sql987 | Format-Table -AutoSize\nReturns a formatted table displaying Server, Database, permission state, permission type, grantee, granteetype, securable and securabletype.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPermission -SqlInstance ServerA\\sql987 -NoSystemObjects -IncludeServerLevel\nReturns a custom object with Server name, Database name, permission state, permission type, grantee and securable\r\nin all databases and on the server level, but not on system securables.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPermission -SqlInstance sql2016 -Database master\nReturns a custom object with permissions for the master database.",
        "Syntax": "Get-DbaPermission [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-IncludeServerLevel] [-NoSystemObjects] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPfAvailableCounter",
        "Description": "Gathers list of all available counters on local or remote machines. Note, if you pass a credential object, it will be included in the output for easy reuse in your next piped command.\n\nThanks to Daniel Streefkerk for this super fast way of counters\nhttps://daniel.streefkerkonline.com/2016/02/18/use-powershell-to-list-all-windows-performance-counters-and-their-numeric-ids",
        "Tags": [
                     "Performance",
                     "DataCollector",
                     "PerfCounter"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gathers list of all available counters on local or remote machines.",
        "Name": "Get-DbaPfAvailableCounter",
        "Links": "https://dbatools.io/Get-DbaPfAvailableCounter",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPfAvailableCounter\nGets all available counters on the local machine.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfAvailableCounter -Pattern *sql*\nGets all counters matching sql on the local machine.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPfAvailableCounter -ComputerName sql2017 -Pattern *sql*\nGets all counters matching sql on the remote server sql2017.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfAvailableCounter -Pattern *sql*\nGets all counters matching sql on the local machine.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaPfAvailableCounter -Pattern *sql* | Add-DbaPfDataCollectorCounter -CollectorSet \u0027Test Collector Set\u0027 -Collector DataCollector01\nAdds all counters matching \"sql\" to the DataCollector01 within the \u0027Test Collector Set\u0027 CollectorSet.",
        "Syntax": "Get-DbaPfAvailableCounter [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Pattern] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPfDataCollector",
        "Description": "Gets Performance Monitor Data Collectors.",
        "Tags": [
                     "Performance",
                     "DataCollector",
                     "PerfCounter"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets Performance Monitor Data Collectors.",
        "Name": "Get-DbaPfDataCollector",
        "Links": "https://dbatools.io/Get-DbaPfDataCollector",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollector\nGets all Collectors on localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollector -ComputerName sql2017\nGets all Collectors on sql2017.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollector -ComputerName sql2017, sql2016 -Credential ad\\sqldba -CollectorSet \u0027System Correlation\u0027\nGets all Collectors for the \u0027System Correlation\u0027 CollectorSet on sql2017 and sql2016 using alternative credentials.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -CollectorSet \u0027System Correlation\u0027 | Get-DbaPfDataCollector\nGets all Collectors for the \u0027System Correlation\u0027 CollectorSet.",
        "Syntax": "Get-DbaPfDataCollector [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-Collector] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPfDataCollectorCounter",
        "Description": "Gets Performance Counters.",
        "Tags": [
                     "Performance",
                     "DataCollector",
                     "PerfCounter"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets Performance Counters.",
        "Name": "Get-DbaPfDataCollectorCounter",
        "Links": "https://dbatools.io/Get-DbaPfDataCollectorCounter",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounter\nGets all counters for all Collector Sets on localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounter -ComputerName sql2017\nGets all counters for all Collector Sets on on sql2017.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounter -ComputerName sql2017 -Counter \u0027\\Processor(_Total)\\% Processor Time\u0027\nGets the \u0027\\Processor(_Total)\\% Processor Time\u0027 counter on sql2017.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounter -ComputerName sql2017, sql2016 -Credential ad\\sqldba -CollectorSet \u0027System Correlation\u0027\nGets all counters for the \u0027System Correlation\u0027 CollectorSet on sql2017 and sql2016 using alternative credentials.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -CollectorSet \u0027System Correlation\u0027 | Get-DbaPfDataCollector | Get-DbaPfDataCollectorCounter\nGets all counters for the \u0027System Correlation\u0027 CollectorSet.",
        "Syntax": "Get-DbaPfDataCollectorCounter [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-Collector] \u003cString[]\u003e] [[-Counter] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPfDataCollectorCounterSample",
        "Description": "Gets Performance Counter Samples.",
        "Tags": [
                     "Performance",
                     "DataCollector",
                     "PerfCounter"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets Performance Counter Samples.",
        "Name": "Get-DbaPfDataCollectorCounterSample",
        "Links": "https://dbatools.io/Get-DbaPfDataCollectorCounterSample",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounterSample\nGets a single sample for all counters for all Collector Sets on localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounterSample -Counter \u0027\\Processor(_Total)\\% Processor Time\u0027\nGets a single sample for all counters for all Collector Sets on localhost.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounter -ComputerName sql2017, sql2016 | Out-GridView -PassThru | Get-DbaPfDataCollectorCounterSample -MaxSamples 10\nGets 10 samples for all counters for all Collector Sets for servers sql2016 and sql2017.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounterSample -ComputerName sql2017\nGets a single sample for all counters for all Collector Sets on sql2017.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounterSample -ComputerName sql2017, sql2016 -Credential ad\\sqldba -CollectorSet \u0027System Correlation\u0027\nGets a single sample for all counters for the \u0027System Correlation\u0027 CollectorSet on sql2017 and sql2016 using alternative credentials.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounterSample -CollectorSet \u0027System Correlation\u0027\nGets a single sample for all counters for the \u0027System Correlation\u0027 CollectorSet.",
        "Syntax": "Get-DbaPfDataCollectorCounterSample [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-Collector] \u003cString[]\u003e] [[-Counter] \u003cString[]\u003e] [-Continuous] [[-ListSet]] [[-MaxSamples] \u003cInt32\u003e] [[-SampleInterval] \u003cInt32\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPfDataCollectorSet",
        "Description": "Gets Performance Monitor Data Collector Set.",
        "Tags": [
                     "Performance",
                     "DataCollector",
                     "PerfCounter"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets Performance Monitor Data Collector Set.",
        "Name": "Get-DbaPfDataCollectorSet",
        "Links": "https://dbatools.io/Get-DbaPfDataCollectorSet",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet\nGets all Collector Sets on localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -ComputerName sql2017\nGets all Collector Sets on sql2017.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -ComputerName sql2017 -Credential ad\\sqldba -CollectorSet \u0027System Correlation\u0027\nGets the \u0027System Correlation\u0027 CollectorSet on sql2017 using alternative credentials.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet | Select-Object *\nDisplays extra columns and also exposes the original COM object in DataCollectorSetObject.",
        "Syntax": "Get-DbaPfDataCollectorSet [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPfDataCollectorSetTemplate",
        "Description": "Parses Perf Monitor XML templates. Defaults to parsing templates in the dbatools template repository (\\bin\\perfmontemplates\\).",
        "Tags": [
                     "Performance",
                     "DataCollector",
                     "PerfCounter"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Parses Perf Monitor templates. Defaults to parsing templates in the dbatools template repository (\\bin\\perfmontemplates\\).",
        "Name": "Get-DbaPfDataCollectorSetTemplate",
        "Links": "https://dbatools.io/Get-DbaPfDataCollectorSetTemplate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSetTemplate\nReturns information about all the templates in the local dbatools repository.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSetTemplate | Out-GridView -PassThru | Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017 | Start-DbaPfDataCollectorSet\nAllows you to select a template, then deploys it to sql2017 and immediately starts the DataCollectorSet.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSetTemplate | Select-Object *\nReturns more information about the template, including the full path/filename.",
        "Syntax": "Get-DbaPfDataCollectorSetTemplate [[-Path] \u003cString[]\u003e] [[-Pattern] \u003cString\u003e] [[-Template] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPlanCache",
        "Description": "Checks ahoc and prepared plan cache for each database, if over 100 MBS you should consider you using Remove-DbaQueryPlan to clear the plan caches or turning on optimize for adhoc workloads configuration is running 2008 or later.\n\nReferences: https://www.sqlskills.com/blogs/kimberly/plan-cache-adhoc-workloads-and-clearing-the-single-use-plan-cache-bloat/\n\nNote: This command returns results from all SQL server instances on the destination server but the process column is specific to -SqlInstance passed.",
        "Tags": "Memory",
        "Alias": "",
        "Author": "Tracy Boggiano, databasesuperhero.com",
        "Synopsis": "Provides information about adhoc and prepared plan cache usage",
        "Name": "Get-DbaPlanCache",
        "Links": "https://dbatools.io/Get-DbaPlanCache",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPlanCache -SqlInstance sql2017\nReturns the single use plan cache usage information for SQL Server instance 2017\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPlanCache -SqlInstance sql2017 -SqlCredential sqladmin\nReturns the single use plan cache usage information for SQL Server instance 2017 using login \u0027sqladmin\u0027",
        "Syntax": "Get-DbaPlanCache [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaPrivilege",
        "Description": "Gets the users with local privileges \u0027Lock Pages in Memory\u0027, \u0027Instant File Initialization\u0027, \u0027Logon as Batch\u0027 on one or more computers.\n\nRequires Local Admin rights on destination computer(s).",
        "Tags": "Privilege",
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Gets the users with local privileges on one or more computers.",
        "Name": "Get-DbaPrivilege",
        "Links": "https://dbatools.io/Get-DbaPrivilege",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaPrivilege -ComputerName sqlserver2014a\nGets the local privileges on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Get-DbaPrivilege\nGets the local privileges on computers sql1, sql2 and sql3.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPrivilege -ComputerName sql1,sql2 | Out-GridView\nGets the local privileges on computers sql1 and sql2, and shows them in a grid view.",
        "Syntax": "Get-DbaPrivilege [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaProcess",
        "Description": "This command displays processes associated with a spid, login, host, program or database.\n\nThanks to Michael J Swart at https://sqlperformance.com/2017/07/sql-performance/find-database-connection-leaks for the query to get the last executed SQL statement, minutesasleep and host process ID.",
        "Tags": [
                     "Process",
                     "Session",
                     "ActivityMonitor"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "This command displays SQL Server processes.",
        "Name": "Get-DbaProcess",
        "Links": "https://dbatools.io/Get-DbaProcess",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaProcess -SqlInstance sqlserver2014a -Login base\\ctrlb, sa\nShows information about the processes for base\\ctrlb and sa on sqlserver2014a. Windows Authentication is used in connecting to sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaProcess -SqlInstance sqlserver2014a -SqlCredential $credential -Spid 56, 77\nShows information about the processes for spid 56 and 57. Uses alternative (SQL or Windows) credentials to authenticate to sqlserver2014a.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaProcess -SqlInstance sqlserver2014a -Program \u0027Microsoft SQL Server Management Studio\u0027\nShows information about the processes that were created in Microsoft SQL Server Management Studio.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaProcess -SqlInstance sqlserver2014a -Host workstationx, server100\nShows information about the processes that were initiated by hosts (computers/clients) workstationx and server 1000.",
        "Syntax": "Get-DbaProcess [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Spid] \u003cInt32[]\u003e] [[-ExcludeSpid] \u003cInt32[]\u003e] [[-Database] \u003cString[]\u003e] [[-Login] \u003cString[]\u003e] [[-Hostname] \u003cString[]\u003e] [[-Program] \u003cString[]\u003e] [-NoSystemSpid] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaProductKey",
        "Description": "Using a string of servers, a text file, or Central Management Server to provide a list of servers, this script will go to each server and get the product key for all installed instances. Clustered instances are supported as well. Requires regular user access to the SQL instances, SMO installed locally, Remote Registry enabled and accessible by the account running the script.\n\nUses key decoder by Jakob Bindslet (http://goo.gl/1jiwcB)",
        "Tags": "ProductKey",
        "Alias": "Get-DbaSqlProductKey,Get-SqlServerKey",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets SQL Server Product Keys from local or destination SQL Servers. Works with SQL Server 2005-2016",
        "Name": "Get-DbaProductKey",
        "Links": "https://dbatools.io/Get-DbaProductKey",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaProductKey -SqlInstance winxp, sqlservera, sqlserver2014a, win2k8\nGets SQL Server versions, editions and product keys for all instances within each server or workstation.",
        "Syntax": "Get-DbaProductKey [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-SqlCms] \u003cString\u003e] [[-ServersFromFile] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaQueryExecutionTime",
        "Description": "Quickly find slow query executions within a database. Results will include stored procedures and individual SQL statements.",
        "Tags": [
                     "Query",
                     "Performance"
                 ],
        "Alias": "",
        "Author": "Brandon Abshire, netnerds.net",
        "Synopsis": "Displays Stored Procedures and Ad hoc queries with the highest execution times. Works on SQL Server 2008 and above.",
        "Name": "Get-DbaQueryExecutionTime",
        "Links": "https://dbatools.io/Get-DbaQueryExecutionTime",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaQueryExecutionTime -SqlInstance sql2008, sqlserver2012\nReturn the top 100 slowest stored procedures or statements for servers sql2008 and sqlserver2012.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaQueryExecutionTime -SqlInstance sql2008 -Database TestDB\nReturn the top 100 slowest stored procedures or statements on server sql2008 for only the TestDB database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaQueryExecutionTime -SqlInstance sql2008 -Database TestDB -MaxResultsPerDb 100 -MinExecs 200 -MinExecMs 1000\nReturn the top 100 slowest stored procedures or statements on server sql2008 for only the TestDB database, limiting results to queries with more than 200 total executions and an execution time over \r\n1000ms or higher.",
        "Syntax": "Get-DbaQueryExecutionTime [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [[-MaxResultsPerDb] \u003cInt32\u003e] [[-MinExecs] \u003cInt32\u003e] [[-MinExecMs] \u003cInt32\u003e] [[-NoSystemDb]] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRegistryRoot",
        "Description": "Uses SQL WMI to find the Registry Root of each SQL Server instance on a computer",
        "Tags": [
                     "Configuration",
                     "Registry"
                 ],
        "Alias": "Get-DbaSqlRegistryRoot",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Uses SQL WMI to find the Registry Root of each SQL Server instance on a computer",
        "Name": "Get-DbaRegistryRoot",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRegistryRoot\nGets the registry root for all instances on localhost\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaRegistryRoot -ComputerName server1\nGets the registry root for all instances on server1",
        "Syntax": "Get-DbaRegistryRoot [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRepDistributor",
        "Description": "This function locates and enumerates distributor information for a given SQL Server instance.",
        "Tags": "Replication",
        "Alias": "Get-DbaDistributor",
        "Author": "William Durkin (@sql_williamd)",
        "Synopsis": "Gets the information about a replication distributor for a given SQL Server instance.",
        "Name": "Get-DbaRepDistributor",
        "Links": "https://dbatools.io/Get-DbaRepDistributor",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRepDistributor -SqlInstance sql2008, sqlserver2012\nRetrieve distributor information for servers sql2008 and sqlserver2012.",
        "Syntax": "Get-DbaRepDistributor [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRepPublication",
        "Description": "Quickly find all transactional, merge, and snapshot publications on a specific server or database.",
        "Tags": "Replication",
        "Alias": "",
        "Author": "Colin Douglas",
        "Synopsis": "Displays all publications for a server or database.",
        "Name": "Get-DbaRepPublication",
        "Links": "https://dbatools.io/Get-DbaRepPublication",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRepPublication -SqlInstance sql2008, sqlserver2012\nReturn all publications for servers sql2008 and sqlserver2012.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaRepPublication -SqlInstance sql2008 -Database TestDB\nReturn all publications on server sql2008 for only the TestDB database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaRepPublication -SqlInstance sql2008 -PublicationType Transactional\nReturn all publications on server sql2008 for all databases that have Transactional publications",
        "Syntax": "Get-DbaRepPublication [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Database] \u003cObject[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-PublicationType] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRepServer",
        "Description": "Gets a replication server object",
        "Tags": "Replication",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets a replication server object",
        "Name": "Get-DbaRepServer",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRepServer -SqlInstance sql2016\nGets the replication server object for sql2016 using Windows authentication\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaRepServer -SqlInstance sql2016 -SqlCredential repadmin\nGets the replication server object for sql2016 using SQL authentication",
        "Syntax": "Get-DbaRepServer [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaResourceGovernor",
        "Description": "Gets the Resource Governor object",
        "Tags": "ResourceGovernor",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets the Resource Governor object",
        "Name": "Get-DbaResourceGovernor",
        "Links": "https://dbatools.io/Get-DbaResourceGovernor",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaResourceGovernor -SqlInstance sql2016\nGets the resource governor object of the SqlInstance sql2016\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaResourceGovernor\nGets the resource governor object on Sql1 and Sql2/sqlexpress instances",
        "Syntax": "Get-DbaResourceGovernor [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRestoreHistory",
        "Description": "By default, this command will return the server name, database, username, restore type, date, from file and to files.\n\nThanks to https://www.mssqltips.com/SqlInstancetip/1724/when-was-the-last-time-your-sql-server-database-was-restored/ for the query and https://sqlstudies.com/2016/07/27/when-was-this-database-restored/ for the idea.",
        "Tags": [
                     "DisasterRecovery",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns restore history details for databases on a SQL Server.",
        "Name": "Get-DbaRestoreHistory",
        "Links": "https://dbatools.io/Get-DbaRestoreHistory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRestoreHistory -SqlInstance sql2016\nReturns server name, database, username, restore type, date for all restored databases on sql2016.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaRestoreHistory -SqlInstance sql2016 -Database db1, db2 -Since \u00272016-07-01 10:47:00\u0027\nReturns restore information only for databases db1 and db2 on sql2016 since July 1, 2016 at 10:47 AM.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaRestoreHistory -SqlInstance sql2014, sql2016 -Exclude db1\nReturns restore information for all databases except db1 on sql2014 and sql2016.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$cred = Get-Credential sqladmin\nPS C:\\\u003e Get-DbaRestoreHistory -SqlInstance sql2014 -Database AdventureWorks2014, pubs -SqlCredential $cred | Format-Table\nReturns database restore information for AdventureWorks2014 and pubs database on sql2014, connects using SQL Authentication via sqladmin account. Formats the data as a table.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2016 | Get-DbaRestoreHistory\nReturns database restore information for every database on every server listed in the Central Management Server on sql2016.",
        "Syntax": "Get-DbaRestoreHistory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-Since] \u003cDateTime\u003e] [-Force] [-Last] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRgClassifierFunction",
        "Description": "Gets the Resource Governor custom classifier Function which is used for customize the workload groups usage",
        "Tags": [
                     "Migration",
                     "ResourceGovernor"
                 ],
        "Alias": "",
        "Author": "Alessandro Alpi (@suxstellino), alessandroalpi.blog",
        "Synopsis": "Gets the Resource Governor custom classifier Function",
        "Name": "Get-DbaRgClassifierFunction",
        "Links": "https://dbatools.io/Get-DbaRgClassifierFunction",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRgClassifierFunction -SqlInstance sql2016\nGets the classifier function from sql2016\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaResourceGovernor | Get-DbaRgClassifierFunction\nGets the classifier function object on Sql1 and Sql2/sqlexpress instances",
        "Syntax": "Get-DbaRgClassifierFunction [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-InputObject] \u003cResourceGovernor[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRgResourcePool",
        "Description": "Gets Resource Governor Pool objects, including internal or external",
        "Tags": "ResourceGovernor",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets Resource Governor Pool objects, including internal or external",
        "Name": "Get-DbaRgResourcePool",
        "Links": "https://dbatools.io/Get-DbaRgResourcePool",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRgResourcePool -SqlInstance sql2016\nGets the internal resource pools on sql2016\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaResourceGovernor | Get-DbaRgResourcePool\nGets the internal resource pools on Sql1 and Sql2/sqlexpress instances\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027Sql1\u0027,\u0027Sql2/sqlexpress\u0027 | Get-DbaResourceGovernor | Get-DbaRgResourcePool -Type External\nGets the external resource pools on Sql1 and Sql2/sqlexpress instances",
        "Syntax": "Get-DbaRgResourcePool [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Type] \u003cString\u003e] [[-InputObject] \u003cResourceGovernor[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRgWorkloadGroup",
        "Description": "Gets all Resource Governor Pool objects, including both internal and external",
        "Tags": "ResourceGovernor",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets all Resource Governor Pool objects, including both internal and external",
        "Name": "Get-DbaRgWorkloadGroup",
        "Links": "https://dbatools.io/Get-DbaRgWorkloadGroup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRgWorkloadGroup -SqlInstance sql2017\nGets the workload groups on sql2017\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaResourceGovernor -SqlInstance sql2017 | Get-DbaRgResourcePool | Get-DbaRgWorkloadGroup\nGets the workload groups on sql2017",
        "Syntax": "Get-DbaRgWorkloadGroup [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-InputObject] \u003cResourcePool[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaRunningJob",
        "Description": "This function returns agent jobs that active on the SQL Server instance when calling the command. The information is gathered the SMO JobServer.jobs.",
        "Tags": [
                     "Agent",
                     "Job"
                 ],
        "Alias": "",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Returns all non-idle Agent jobs running on the server.",
        "Name": "Get-DbaRunningJob",
        "Links": "https://dbatools.io/Get-DbaRunningJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaRunningJob -SqlInstance localhost\nReturns any active jobs on localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaRunningJob -SqlInstance localhost\nReturns output of any active jobs on localhost.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027localhost\u0027,\u0027localhost\\namedinstance\u0027 | Get-DbaRunningJob\nReturns all active jobs on multiple instances piped into the function.",
        "Syntax": "Get-DbaRunningJob [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaSchemaChangeHistory",
        "Description": "Queries the default system trace for any DDL changes in the specified time frame\nOnly works with SQL 2005 and later, as the system trace didn\u0027t exist before then",
        "Tags": [
                     "Migration",
                     "Backup",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram - http://stuart-moore.com)",
        "Synopsis": "Gets DDL changes logged in the system trace.",
        "Name": "Get-DbaSchemaChangeHistory",
        "Links": "https://dbatools.io/Get-DbaSchemaChangeHistory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaSchemaChangeHistory -SqlInstance localhost\nReturns all DDL changes made in all databases on the SQL Server instance localhost since the system trace began\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaSchemaChangeHistory -SqlInstance localhost -Since (Get-Date).AddDays(-7)\nReturns all DDL changes made in all databases on the SQL Server instance localhost in the last 7 days\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaSchemaChangeHistory -SqlInstance localhost -Database Finance, Prod -Since (Get-Date).AddDays(-7)\nReturns all DDL changes made in the Prod and Finance databases on the SQL Server instance localhost in the last 7 days\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaSchemaChangeHistory -SqlInstance localhost -Database Finance -Object AccountsTable -Since (Get-Date).AddDays(-7)\nReturns all DDL changes made to the AccountsTable object in the Finance database on the SQL Server instance localhost in the last 7 days",
        "Syntax": "Get-DbaSchemaChangeHistory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Since \u003cDbaDateTime\u003e] [-Object \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaServerAudit",
        "Description": "The Get-DbaServerAudit command gets SQL Security Audit information for each instance(s) of SQL Server.",
        "Tags": [
                     "Audit",
                     "Security",
                     "SqlAudit"
                 ],
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets SQL Security Audit information for each instance(s) of SQL Server.",
        "Name": "Get-DbaServerAudit",
        "Links": "https://dbatools.io/Get-DbaServerAudit",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaServerAudit -SqlInstance localhost\nReturns all Security Audits on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaServerAudit -SqlInstance localhost, sql2016\nReturns all Security Audits for the local and sql2016 SQL Server instances",
        "Syntax": "Get-DbaServerAudit [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Audit \u003cString[]\u003e] [-ExcludeAudit \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaServerAuditSpecification",
        "Description": "The Get-DbaServerAuditSpecification command gets SQL Security Audit Specification information for each instance(s) of SQL Server.",
        "Tags": [
                     "Audit",
                     "Security",
                     "SqlAudit"
                 ],
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets SQL Security Audit Specification information for each instance(s) of SQL Server.",
        "Name": "Get-DbaServerAuditSpecification",
        "Links": "https://dbatools.io/Get-DbaServerAuditSpecification",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaServerAuditSpecification -SqlInstance localhost\nReturns all Security Audit Specifications on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaServerAuditSpecification -SqlInstance localhost, sql2016\nReturns all Security Audit Specifications for the local and sql2016 SQL Server instances",
        "Syntax": "Get-DbaServerAuditSpecification [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaServerInstallDate",
        "Description": "This command returns:\nSqlInstallDate\nWindowsInstallDate (use -IncludeWindows)",
        "Tags": "Install",
        "Alias": "",
        "Author": "Mitchell Hamann (@SirCaptainMitch), mitchellhamann.com",
        "Synopsis": "Returns the install date of a SQL Instance and Windows Server.",
        "Name": "Get-DbaServerInstallDate",
        "Links": "https://dbatools.io/Get-DbaServerInstallDate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaServerInstallDate -SqlInstance SqlBox1\\Instance2\nReturns an object with SQL Instance Install date as a string.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaServerInstallDate -SqlInstance winserver\\sqlexpress, sql2016\nReturns an object with SQL Instance Install date as a string for both SQLInstances that are passed to the cmdlet.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027sqlserver2014a\u0027, \u0027sql2016\u0027 | Get-DbaServerInstallDate\nReturns an object with SQL Instance Install date as a string for both SQLInstances that are passed to the cmdlet via the pipeline.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaServerInstallDate -SqlInstance sqlserver2014a, sql2016 -IncludeWindows\nReturns an object with the Windows Install date and the SQL install date as a string.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2014 | Get-DbaServerInstallDate\nReturns an object with SQL Instance install date as a string for every server listed in the Central Management Server on sql2014",
        "Syntax": "Get-DbaServerInstallDate [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [-IncludeWindows] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaServerProtocol",
        "Description": "Gets the SQL Server related server protocols on one or more computers.\n\nRequires Local Admin rights on destination computer(s).\nThe server protocols can be enabled and disabled when retrieved via WSMan.",
        "Tags": "Protocol",
        "Alias": "",
        "Author": "Klaas Vandenberghe ( @PowerDBAKlaas )",
        "Synopsis": "Gets the SQL Server related server protocols on a computer.",
        "Name": "Get-DbaServerProtocol",
        "Links": "https://dbatools.io/Get-DbaServerProtocol",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaServerProtocol -ComputerName sqlserver2014a\nGets the SQL Server related server protocols on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Get-DbaServerProtocol\nGets the SQL Server related server protocols on computers sql1, sql2 and sql3.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaServerProtocol -ComputerName sql1,sql2 | Out-GridView\nGets the SQL Server related server protocols on computers sql1 and sql2, and shows them in a grid view.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e(Get-DbaServerProtocol -ComputerName sql1 | Where { $_.DisplayName = \u0027via\u0027 }).Disable()\nDisables the VIA ServerNetworkProtocol on computer sql1.\r\nIf successful, return code 0 is shown.",
        "Syntax": "Get-DbaServerProtocol [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaServerRole",
        "Description": "Gets the list of server-level roles for SQL Server instance.",
        "Tags": [
                     "ServerRole",
                     "Security"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton)",
        "Synopsis": "Gets the list of server-level roles.",
        "Name": "Get-DbaServerRole",
        "Links": "https://dbatools.io/Get-DbaServerRole",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaServerRole -SqlInstance sql2016a\nOutputs list of server-level roles for sql2016a instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaServerRole -SqlInstance sql2017a -ExcludeFixedRole\nOutputs the server-level role(s) that are not fixed roles on sql2017a instance.",
        "Syntax": "Get-DbaServerRole [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-ServerRole \u003cString[]\u003e] [-ExcludeServerRole \u003cString[]\u003e] [-ExcludeFixedRole] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaServerRoleMember",
        "Description": "The Get-DbaServerRoleMember returns connected SMO object for server roles for each instance(s) of SQL Server.",
        "Tags": [
                     "ServerRole",
                     "Security",
                     "Login"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Get members of server roles for each instance(s) of SQL Server.",
        "Name": "Get-DbaServerRoleMember",
        "Links": "https://dbatools.io/Get-DbaServerRoleMember",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaServerRoleMember -SqlInstance localhost\nReturns all members of all server roles on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaServerRoleMember -SqlInstance localhost, sql2016\nReturns all members of all server roles on the local and sql2016 SQL Server instances\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$servers = Get-Content C:\\servers.txt\nPS C:\\\u003e $servers | Get-DbaServerRoleMember\nReturns all members of all server roles for every server in C:\\servers.txt\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaServerRoleMember -SqlInstance localhost -ServerRole \u0027sysadmin\u0027, \u0027dbcreator\u0027\nReturns all members of the sysadmin or dbcreator roles on localhost.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaServerRoleMember -SqlInstance localhost -ExcludeServerRole \u0027sysadmin\u0027\nReturns all members of server-level roles other than sysadmin.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaServerRoleMember -SqlInstance sql2017a -ExcludeFixedRole\nReturns all members of server-level role(s) that are not fixed roles on sql2017a instance.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaServerRoleMember -SqlInstance localhost -Login \u0027MyFriendlyDeveloper\u0027\nReturns all server-level role(s) for the MyFriendlyDeveloper login on localhost.",
        "Syntax": "Get-DbaServerRoleMember [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-ServerRole \u003cString[]\u003e] [-ExcludeServerRole \u003cString[]\u003e] [-Login \u003cObject[]\u003e] [-ExcludeFixedRole] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaServerTrigger",
        "Description": "Get all existing server triggers on one or more SQL instances.",
        "Tags": [
                     "Database",
                     "Trigger"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Get all existing server triggers on one or more SQL instances.",
        "Name": "Get-DbaServerTrigger",
        "Links": "https://dbatools.io/Get-DbaServerTrigger",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaServerTrigger -SqlInstance sql2017\nReturns all server triggers on sql2017",
        "Syntax": "Get-DbaServerTrigger [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaService",
        "Description": "Gets the SQL Server related services on one or more computers.\n\nRequires Local Admin rights on destination computer(s).",
        "Tags": [
                     "Service",
                     "SqlServer",
                     "Instance",
                     "Connect"
                 ],
        "Alias": "Get-DbaSqlService",
        "Author": "Klaas Vandenberghe ( @PowerDBAKlaas )",
        "Synopsis": "Gets the SQL Server related services on a computer.",
        "Name": "Get-DbaService",
        "Links": "https://dbatools.io/Get-DbaService",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName sqlserver2014a\nGets the SQL Server related services on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Get-DbaService -AdvancedProperties\nGets the SQL Server related services on computers sql1, sql2 and sql3. Includes Advanced Properties from the SqlServiceAdvancedProperty Namespace\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$cred = Get-Credential WindowsUser\nPS C:\\\u003e Get-DbaService -ComputerName sql1,sql2 -Credential $cred | Out-GridView\nGets the SQL Server related services on computers sql1 and sql2 via the user WindowsUser, and shows them in a grid view.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName sql1,sql2 -InstanceName MSSQLSERVER\nGets the SQL Server related services related to the default instance MSSQLSERVER on computers sql1 and sql2.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName $MyServers -Type SSRS\nGets the SQL Server related services of type \"SSRS\" (Reporting Services) on computers in the variable MyServers.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$MyServers = Get-Content .\\servers.txt\nPS C:\\\u003e Get-DbaService -ComputerName $MyServers -ServiceName MSSQLSERVER,SQLSERVERAGENT\nGets the SQL Server related services with ServiceName MSSQLSERVER or SQLSERVERAGENT for all the servers that are stored in the file. Every line in the file can only contain one hostname for a server.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$services = Get-DbaService -ComputerName sql1 -Type Agent,Engine\nPS C:\\\u003e $services.ChangeStartMode(\u0027Manual\u0027)\nGets the SQL Server related services of types Sql Agent and DB Engine on computer sql1 and changes their startup mode to \u0027Manual\u0027.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e(Get-DbaService -ComputerName sql1 -Type Engine).Restart($true)\nCalls a Restart method for each Engine service on computer sql1.",
        "Syntax": "Get-DbaService [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [-InstanceName \u003cString[]\u003e] [-Credential \u003cPSCredential\u003e] [-Type \u003cString[]\u003e] [-AdvancedProperties] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaService [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [-Credential \u003cPSCredential\u003e] [-ServiceName \u003cString[]\u003e] [-AdvancedProperties] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaSpConfigure",
        "Description": "This function returns server level system configuration (sys.configuration/sp_configure) information. The information is gathered through SMO Configuration.Properties.\nThe data includes the default value for each configuration, for quick identification of values that may have been changed.",
        "Tags": [
                     "SpConfig",
                     "Configure",
                     "Configuration"
                 ],
        "Alias": "",
        "Author": "Nic Cain, https://sirsql.net/",
        "Synopsis": "Returns all server level system configuration (sys.configuration/sp_configure) information",
        "Name": "Get-DbaSpConfigure",
        "Links": "https://dbatools.io/Get-DbaSpConfigure",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaSpConfigure -SqlInstance localhost\nReturns all system configuration information on the localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027localhost\u0027,\u0027localhost\\namedinstance\u0027 | Get-DbaSpConfigure\nReturns system configuration information on multiple instances piped into the function\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaSpConfigure -SqlInstance sql2012 -Name \u0027max server memory (MB)\u0027\nReturns only the system configuration for MaxServerMemory on sql2012.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaSpConfigure -SqlInstance sql2012 -ExcludeName \u0027max server memory (MB)\u0027, RemoteAccess | Out-GridView\nReturns system configuration information on sql2012 but excludes for max server memory (MB) and remote access. Values returned in grid view\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$cred = Get-Credential SqlCredential\nPS C:\\\u003e \u0027sql2012\u0027 | Get-DbaSpConfigure -SqlCredential $cred -Name RemoteAccess, \u0027max server memory (MB)\u0027 -ExcludeName \u0027remote access\u0027 | Out-GridView\nReturns system configuration information on sql2012 using SQL Server Authentication. Only MaxServerMemory is returned as RemoteAccess was also excluded.",
        "Syntax": "Get-DbaSpConfigure [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Name \u003cString[]\u003e] [-ExcludeName \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaSpn",
        "Description": "Get a list of set SPNs. SPNs are set at the AD account level. You can either retrieve set SPNs for a computer, or any SPNs set for\na given active directory account. You can query one, or both. You\u0027ll get a list of every SPN found for either search term.",
        "Tags": "SPN",
        "Alias": "",
        "Author": "Drew Furgiuele (@pittfurg), http://www.port1433.com",
        "Synopsis": "Returns a list of set service principal names for a given computer/AD account",
        "Name": "Get-DbaSpn",
        "Links": "https://dbatools.io/Get-DbaSpn",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaSpn -ServerName SQLSERVERA -Credential ad\\sqldba\nReturns a custom object with SearchTerm (ServerName) and the SPNs that were found\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaSpn -AccountName domain\\account -Credential ad\\sqldba\nReturns a custom object with SearchTerm (domain account) and the SPNs that were found\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaSpn -ServerName SQLSERVERA,SQLSERVERB -Credential ad\\sqldba\nReturns a custom object with SearchTerm (ServerName) and the SPNs that were found for multiple computers",
        "Syntax": "Get-DbaSpn [[-ComputerName] \u003cString[]\u003e] [[-AccountName] \u003cString[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaSsisEnvironmentVariable",
        "Description": "This command gets all variables from specified environment from SSIS Catalog. All sensitive values are decrypted.\nThe function communicates directly with SSISDB database, \"SQL Server Integration Services\" service isn\u0027t queried there.\nEach parameter (besides SqlInstance and SqlCredential) acts as the filter to only include or exclude particular element",
        "Tags": [
                     "SSIS",
                     "SSISDB",
                     "Variable"
                 ],
        "Alias": "",
        "Author": "Bartosz Ratajczyk (@b_ratajczyk)",
        "Synopsis": "This command gets specified SSIS Environment and all its variables",
        "Name": "Get-DbaSsisEnvironmentVariable",
        "Links": "https://dbatools.io/Get-DbaSsisEnvironmentVariable",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -Folder DWH_ETL\nGets variables of \u0027DEV\u0027 environment located in \u0027DWH_ETL\u0027 folder on \u0027localhost\u0027 Server\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -Folder DWH_ETL, DEV2, QA\nGets variables of \u0027DEV\u0027 environment(s) located in folders \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 server\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -FolderExclude DWH_ETL, DEV2, QA\nGets variables of \u0027DEV\u0027 environments located in folders other than \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 server\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV, PROD -Folder DWH_ETL, DEV2, QA\nGets variables of \u0027DEV\u0027 and \u0027PROD\u0027 environment(s) located in folders \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 server\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -EnvironmentExclude DEV, PROD -Folder DWH_ETL, DEV2, QA\nGets variables of environments other than \u0027DEV\u0027 and \u0027PROD\u0027 located in folders \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 server\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -EnvironmentExclude DEV, PROD -FolderExclude DWH_ETL, DEV2, QA\nGets variables of environments other than \u0027DEV\u0027 and \u0027PROD\u0027 located in folders other than \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 server\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e\u0027localhost\u0027 | Get-DbaSsisEnvironmentVariable -EnvironmentExclude DEV, PROD\nGets all SSIS environments except \u0027DEV\u0027 and \u0027PROD\u0027 from \u0027localhost\u0027 server. The server name comes from pipeline\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e\u0027SRV1\u0027, \u0027SRV3\u0027 | Get-DbaSsisEnvironmentVariable\nGets all SSIS environments from \u0027SRV1\u0027 and \u0027SRV3\u0027 servers. The server\u0027s names come from pipeline\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e\u0027SRV1\u0027, \u0027SRV2\u0027 | Get-DbaSsisEnvironmentVariable DEV | Out-GridView\nGets all variables from \u0027DEV\u0027 Environment(s) on servers \u0027SRV1\u0027 and \u0027SRV2\u0027 and outputs it as the GridView.\r\nThe server names come from the pipeline.\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003e\u0027localhost\u0027 | Get-DbaSsisEnvironmentVariable -EnvironmentExclude DEV, PROD | Select-Object -Property Name, Value | Where-Object {$_.Name -match \u0027^a\u0027} | Out-GridView\nGets all variables from Environments other than \u0027DEV\u0027 and \u0027PROD\u0027 on \u0027localhost\u0027 server,\r\nselects Name and Value properties for variables that names start with letter \u0027a\u0027 and outputs it as the GridView",
        "Syntax": "Get-DbaSsisEnvironmentVariable [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Environment] \u003cObject[]\u003e] [[-EnvironmentExclude] \u003cObject[]\u003e] [[-Folder] \u003cObject[]\u003e] [[-FolderExclude] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaSsisExecutionHistory",
        "Description": "This command gets execution history for SSIS executison given one or more instances and can be filtered by Project, Environment,Folder or Status.",
        "Tags": [
                     "Migration",
                     "SSIS"
                 ],
        "Alias": "",
        "Author": "Chris Tucker (@ChrisTuc47368095)",
        "Synopsis": "Get-DbaSsisHistory Retreives SSIS project and package execution History, and environments from one SQL Server to another.",
        "Name": "Get-DbaSsisExecutionHistory",
        "Links": "https://dbatools.io/Get-DbaSsisExecutionHistory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaSsisExecutionHistory -SqlInstance SMTQ01 -Folder SMTQ_PRC\nGet all history items for SMTQ01 in folder SMTQ_PRC.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaSsisExecutionHistory -SqlInstance SMTQ01 -Status Failed,Cancelled\nGets all failed or canceled executions for SMTQ01.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaSsisExecutionHistory -SqlInstance SMTQ01,SMTQ02 -Status Failed,Cancelled -Whatif\nShows what would happen if the command were executed and would return the SQL statement that would be executed per instance.",
        "Syntax": "Get-DbaSsisExecutionHistory [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Since] \u003cDateTime\u003e] [[-Status] \u003cString[]\u003e] [[-Project] \u003cString[]\u003e] [[-Folder] \u003cString[]\u003e] [[-Environment] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaStartupParameter",
        "Description": "Displays values for a detailed list of SQL Server Startup Parameters including Master Data Path, Master Log path, Error Log, Trace Flags, Parameter String and much more.\n\nThis command relies on remote Windows Server (SQL WMI/WinRm) access. You can pass alternative Windows credentials by using the -Credential parameter.\n\nSee https://msdn.microsoft.com/en-us/library/ms190737.aspx for more information.",
        "Tags": [
                     "WSMan",
                     "SQLWMI",
                     "Memory"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Displays values for a detailed list of SQL Server Startup Parameters.",
        "Name": "Get-DbaStartupParameter",
        "Links": "https://dbatools.io/Get-DbaStartupParameter",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaStartupParameter -SqlInstance sql2014\nLogs into SQL WMI as the current user then displays the values for numerous startup parameters.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$wincred = Get-Credential ad\\sqladmin\nPS C:\\\u003e Get-DbaStartupParameter -SqlInstance sql2014 -Credential $wincred -Simple\nLogs in to WMI using the ad\\sqladmin credential and gathers simplified information about the SQL Server Startup Parameters.",
        "Syntax": "Get-DbaStartupParameter [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Credential] \u003cPSCredential\u003e] [-Simple] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaSuspectPage",
        "Description": "This function returns any records that were stored due to suspect pages in databases on a SQL Server Instance.",
        "Tags": [
                     "Pages",
                     "DBCC"
                 ],
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Returns data that is stored in SQL for Suspect Pages on the specified SQL Server Instance",
        "Name": "Get-DbaSuspectPage",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaSuspectPage -SqlInstance sql2016\nRetrieve any records stored for Suspect Pages on the sql2016 SQL Server.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaSuspectPage -SqlInstance sql2016 -Database Test\nRetrieve any records stored for Suspect Pages on the sql2016 SQL Server and the Test database only.",
        "Syntax": "Get-DbaSuspectPage [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-Database \u003cObject\u003e] [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaTcpPort",
        "Description": "By default, this function returns just the TCP port used by the specified SQL Server.\n\nIf -All is specified, the server name, IPAddress (ipv4 and ipv6), port number and an indicator of whether or not the port assignment is static are returned.\n\nRemote sqlwmi is used by default. If this doesn\u0027t work, then remoting is used. If neither work, it defaults to T-SQL which can provide only the port.",
        "Tags": [
                     "SQLWMI",
                     "tcp"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns the TCP port used by the specified SQL Server.",
        "Name": "Get-DbaTcpPort",
        "Links": "https://dbatools.io/Get-DbaTcpPort",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaTcpPort -SqlInstance sqlserver2014a\nReturns just the port number for the default instance on sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaTcpPort -SqlInstance winserver\\sqlexpress, sql2016\nReturns an object with server name and port number for the sqlexpress on winserver and the default instance on sql2016.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaTcpPort -SqlInstance sqlserver2014a, sql2016 -All\nReturns an object with server name, IPAddress (ipv4 and ipv6), port and static ($true/$false) for sqlserver2014a and sql2016.\nRemote sqlwmi is used by default. If this doesn\u0027t work, then remoting is used. If neither work, it defaults to T-SQL which can provide only the port.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2014 | Get-DbaTcpPort -ExcludeIpv6 -All\nReturns an object with server name, IPAddress (just ipv4), port and static ($true/$false) for every server listed in the Central Management Server on sql2014.",
        "Syntax": "Get-DbaTcpPort [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Detailed] [-All] [-ExcludeIpv6] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaTempdbUsage",
        "Description": "This function queries DMVs for running sessions using tempdb and returns results if those sessions have user or internal space allocated or deallocated against them.",
        "Tags": [
                     "Tempdb",
                     "Space"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets Tempdb usage for running queries.",
        "Name": "Get-DbaTempdbUsage",
        "Links": "https://dbatools.io/Get-DbaTempdbUsage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaTempdbUsage -SqlInstance localhost\\SQLDEV2K14\nGets tempdb usage for localhost\\SQLDEV2K14",
        "Syntax": "Get-DbaTempdbUsage [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbatoolsConfig",
        "Description": "Retrieves configuration elements by name.\nCan be used to search the existing configuration list.",
        "Tags": [
                     "Config",
                     "Module"
                 ],
        "Alias": "Get-DbaConfig",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Retrieves configuration elements by name.",
        "Name": "Get-DbatoolsConfig",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbatoolsConfig \u0027Mail.To\u0027\nRetrieves the configuration element for the key \"Mail.To\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbatoolsConfig -Force\nRetrieve all configuration elements from all modules, even hidden ones.",
        "Syntax": "Get-DbatoolsConfig [[-FullName] \u003cString\u003e] [-Force] [\u003cCommonParameters\u003e]\nGet-DbatoolsConfig [[-Name] \u003cString\u003e] [[-Module] \u003cString\u003e] [-Force] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbatoolsConfigValue",
        "Description": "Returns the configuration value stored under the specified name.\nIt requires the full name (\u003cModule\u003e.\u003cName\u003e) and is usually only called by functions.",
        "Tags": [
                     "Config",
                     "Module"
                 ],
        "Alias": "Get-DbaConfigValue",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Returns the configuration value stored under the specified name.",
        "Name": "Get-DbatoolsConfigValue",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbatoolsConfigValue -Name \u0027System.MailServer\u0027\nReturns the configured value that was assigned to the key \u0027System.MailServer\u0027\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbatoolsConfigValue -Name \u0027Default.CoffeeMilk\u0027 -Fallback 0\nReturns the configured value for \u0027Default.CoffeeMilk\u0027. If no such value is configured, it returns \u00270\u0027 instead.",
        "Syntax": "Get-DbatoolsConfigValue [-FullName] \u003cString\u003e [[-Fallback] \u003cObject\u003e] [-NotNull] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbatoolsLog",
        "Description": "Returns log entries for dbatools. Handy when debugging or developing a script using it.",
        "Tags": "Debug",
        "Alias": "",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Returns log entries for dbatools",
        "Name": "Get-DbatoolsLog",
        "Links": "https://dbatools.io/Get-DbatoolsLog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbatoolsLog\nReturns all log entries currently in memory.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbatoolsLog -Target \"a\" -Last 1 -Skip 1\nReturns all log entries that targeted the object \"a\" in the second last execution sent.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbatoolsLog -Tag \"fail\" -Last 5\nReturns all log entries within the last 5 executions that contained the tag \"fail\"",
        "Syntax": "Get-DbatoolsLog [[-FunctionName] \u003cString\u003e] [[-ModuleName] \u003cString\u003e] [[-Target] \u003cObject\u003e] [[-Tag] \u003cString[]\u003e] [[-Last] \u003cInt32\u003e] [[-Skip] \u003cInt32\u003e] [[-Runspace] \u003cGuid\u003e] [[-Level] {Critical | Important | Output | Significant | VeryVerbose | Verbose | SomewhatVerbose | System | Debug | InternalComment | Warning}] [-Errors] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaTopResourceUsage",
        "Description": "Returns the top 20 resource consumers for cached queries based on four different metrics: duration, frequency, IO, and CPU.\n\nThis command is based off of queries provided by Michael J. Swart at http://michaeljswart.com/go/Top20\n\nPer Michael: \"I\u0027ve posted queries like this before, and others have written many other versions of this query. All these queries are based on sys.dm_exec_query_stats.\"",
        "Tags": [
                     "Query",
                     "Performance"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns the top 20 resource consumers for cached queries based on four different metrics: duration, frequency, IO, and CPU.",
        "Name": "Get-DbaTopResourceUsage",
        "Links": "https://dbatools.io/Get-DbaTopResourceUsage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaTopResourceUsage -SqlInstance sql2008, sql2012\nReturn the 80 (20 x 4 types) top usage results by duration, frequency, IO, and CPU servers for servers sql2008 and sql2012\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaTopResourceUsage -SqlInstance sql2008 -Type Duration, Frequency -Database TestDB\nReturn the highest usage by duration (top 20) and frequency (top 20) for the TestDB on sql2008\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaTopResourceUsage -SqlInstance sql2016 -Limit 30\nReturn the highest usage by duration (top 30) and frequency (top 30) for the TestDB on sql2016\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaTopResourceUsage -SqlInstance sql2008, sql2012 -ExcludeSystem\nReturn the 80 (20 x 4 types) top usage results by duration, frequency, IO, and CPU servers for servers sql2008 and sql2012 without any System Objects\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaTopResourceUsage -SqlInstance sql2016| Select-Object *\nReturn all the columns plus the QueryPlan column",
        "Syntax": "Get-DbaTopResourceUsage [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Type \u003cString[]\u003e] [-Limit \u003cInt32\u003e] [-EnableException] [-ExcludeSystem] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaTrace",
        "Description": "This function returns a list of traces on a SQL Server instance and identifies the default trace file",
        "Tags": [
                     "Security",
                     "Trace"
                 ],
        "Alias": "Get-DbaTraceFile",
        "Author": "Garry Bargsley (@gbargsley), http://blog.garrybargsley.com",
        "Synopsis": "Gets a list of trace(s) from specified SQL Server Instance",
        "Name": "Get-DbaTrace",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2016\nLists all the trace files on the sql2016 SQL Server.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2016 -Default\nLists the default trace information on the sql2016 SQL Server.",
        "Syntax": "Get-DbaTrace [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Id \u003cInt32[]\u003e] [-Default] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaTraceFlag",
        "Description": "Returns Trace Flags that are enabled globally on each instance(s) of SQL Server as an object.",
        "Tags": "TraceFlag",
        "Alias": "",
        "Author": "Kevin Bullen (@sqlpadawan)",
        "Synopsis": "Get global Trace Flag(s) information for each instance(s) of SQL Server.",
        "Name": "Get-DbaTraceFlag",
        "Links": "https://dbatools.io/Get-DbaTraceFlag",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaTraceFlag -SqlInstance localhost\nReturns all Trace Flag information on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaTraceFlag -SqlInstance localhost, sql2016\nReturns all Trace Flag(s) for the local and sql2016 SQL Server instances\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaTraceFlag -SqlInstance localhost -TraceFlag 4199,3205\nReturns Trace Flag status for TF 4199 and 3205 for the local SQL Server instance if they are enabled.",
        "Syntax": "Get-DbaTraceFlag [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-TraceFlag \u003cInt32[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaUptime",
        "Description": "By default, this command returns for each SQL Server instance passed in:\nSQL Instance last startup time, Uptime as a PS TimeSpan, Uptime as a formatted string\nHosting Windows server last startup time, Uptime as a PS TimeSpan, Uptime as a formatted string",
        "Tags": "CIM",
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Returns the uptime of the SQL Server instance, and if required the hosting windows server",
        "Name": "Get-DbaUptime",
        "Links": "https://dbatools.io/Get-DbaUptime",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaUptime -SqlInstance SqlBox1\\Instance2\nReturns an object with SQL Server start time, uptime as TimeSpan object, uptime as a string, and Windows host boot time, host uptime as TimeSpan objects and host uptime as a string for the sqlexpress \r\ninstance on winserver\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaUptime -SqlInstance winserver\\sqlexpress, sql2016\nReturns an object with SQL Server start time, uptime as TimeSpan object, uptime as a string, and Windows host boot time, host uptime as TimeSpan objects and host uptime as a string for the sqlexpress \r\ninstance on host winserver and the default instance on host sql2016\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2014 | Get-DbaUptime\nReturns an object with SQL Server start time, uptime as TimeSpan object, uptime as a string, and Windows host boot time, host uptime as TimeSpan objects and host uptime as a string for every server \r\nlisted in the Central Management Server on sql2014",
        "Syntax": "Get-DbaUptime [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaUserPermission",
        "Description": "This command will display all server logins, server level securable, database logins and database securables.\n\nDISA STIG implementators will find this command useful as it uses Permissions.sql provided by DISA.\n\nNote that if you Ctrl-C out of this command and end it prematurely, it will leave behind a STIG schema in tempdb.",
        "Tags": [
                     "Discovery",
                     "Permissions",
                     "Security"
                 ],
        "Alias": "Get-DbaUserLevelPermission",
        "Author": "Brandon Abshire, netnerds.net",
        "Synopsis": "Displays detailed permissions information for the server and database roles and securables.",
        "Name": "Get-DbaUserPermission",
        "Links": "https://dbatools.io/Get-DbaUserPermission",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaUserPermission -SqlInstance sql2008, sqlserver2012\nCheck server and database permissions for servers sql2008 and sqlserver2012.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaUserPermission -SqlInstance sql2008 -Database TestDB\nCheck server and database permissions on server sql2008 for only the TestDB database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaUserPermission -SqlInstance sql2008 -Database TestDB -IncludePublicGuest -IncludeSystemObjects\nCheck server and database permissions on server sql2008 for only the TestDB database,\r\nincluding public and guest grants, and sys schema objects.",
        "Syntax": "Get-DbaUserPermission [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [[-ExcludeSystemDatabase]] [-IncludePublicGuest] [-IncludeSystemObjects] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWaitingTask",
        "Description": "This command is based on waiting task T-SQL script published by Paul Randal.\nReference: https://www.sqlskills.com/blogs/paul/updated-sys-dm_os_waiting_tasks-script-2/",
        "Tags": [
                     "Waits",
                     "Task",
                     "WaitTask"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), https://wsmelton.github.io",
        "Synopsis": "Displays waiting task.",
        "Name": "Get-DbaWaitingTask",
        "Links": "https://dbatools.io/Get-DbaWaitingTask",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWaitingTask -SqlInstance sqlserver2014a\nReturns the waiting task for all sessions on sqlserver2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaWaitingTask -SqlInstance sqlserver2014a -IncludeSystemSpid\nReturns the waiting task for all sessions (user and system) on sqlserver2014a",
        "Syntax": "Get-DbaWaitingTask [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Spid \u003cObject[]\u003e] [-IncludeSystemSpid] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWaitResource",
        "Description": "Given a wait resource in the form of \u0027PAGE: 10:1:9180084\u0027 returns the database, data file and the system object which is being waited up.\n\nGiven a wait resource in the form of \u0027KEY: 7:35457594073541168 (de21f92a1572)\u0027, returns the database, object and index that is being waited on, With the -row switch the row data will also be returned.",
        "Tags": [
                     "Pages",
                     "DBCC"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Returns the resource being waited upon",
        "Name": "Get-DbaWaitResource",
        "Links": "https://dbatools.io/Get-DbaWaitResource",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWaitResource -SqlInstance server1 -WaitResource \u0027PAGE: 10:1:9180084\u0027\nWill return an object containing; database name, data file name, schema name and the object which owns the resource\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaWaitResource -Sql Instance server2 -WaitResource \u0027KEY: 7:35457594073541168 (de21f92a1572)\u0027\nWill return an object containing; database name, schema name and index name which is being waited on.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaWaitResource -Sql Instance server2 -WaitResource \u0027KEY: 7:35457594073541168 (de21f92a1572)\u0027 -row\nWill return an object containing; database name, schema name and index name which is being waited on, and in addition the contents of the locked row at the time the command is run.",
        "Syntax": "Get-DbaWaitResource [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-WaitResource] \u003cString\u003e [-Row] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWaitStatistic",
        "Description": "This command is based off of Paul Randal\u0027s post \"Wait statistics, or please tell me where it hurts\"\n\nReturns:\nWaitType\nCategory\nWaitSeconds\nResourceSeconds\nSignalSeconds\nWaitCount\nPercentage\nAverageWaitSeconds\nAverageResourceSeconds\nAverageSignalSeconds\nURL\n\nReference: https://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/",
        "Tags": "WaitStatistic",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Displays wait statistics",
        "Name": "Get-DbaWaitStatistic",
        "Links": "https://dbatools.io/Get-DbaWaitStatistic",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWaitStatistic -SqlInstance sql2008, sqlserver2012\nCheck wait statistics for servers sql2008 and sqlserver2012\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaWaitStatistic -SqlInstance sql2008 -Threshold 98 -IncludeIgnorable\nCheck wait statistics on server sql2008 for thresholds above 98% and include wait stats that are most often, but not always, ignorable\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaWaitStatistic -SqlInstance sql2008 | Select *\nShows detailed notes, if available, from Paul\u0027s post\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$output = Get-DbaWaitStatistic -SqlInstance sql2008 -Threshold 100 -IncludeIgnorable | Select-Object * | ConvertTo-DbaDataTable\nCollects all Wait Statistics (including ignorable waits) on server sql2008 into a Data Table.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$output = Get-DbaWaitStatistic -SqlInstance sql2008\nPS C:\\\u003e foreach ($row in ($output | Sort-Object -Unique Url)) { Start-Process ($row).Url }\nDisplays the output then loads the associated sqlskills website for each result. Opens one tab per unique URL.",
        "Syntax": "Get-DbaWaitStatistic [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Threshold \u003cInt32\u003e] [-IncludeIgnorable] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWindowsLog",
        "Description": "Gets Windows Application events associated with an instance",
        "Tags": "Logging",
        "Alias": "",
        "Author": "Drew Furgiuele | Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Gets Windows Application events associated with an instance",
        "Name": "Get-DbaWindowsLog",
        "Links": "https://dbatools.io/Get-DbaWindowsLog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$ErrorLogs = Get-DbaWindowsLog -SqlInstance sql01\\sharepoint\nPS C:\\\u003e $ErrorLogs | Where-Object ErrorNumber -eq 18456\nReturns all lines in the errorlogs that have event number 18456 in them",
        "Syntax": "Get-DbaWindowsLog [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-Start] \u003cDateTime\u003e] [[-End] \u003cDateTime\u003e] [[-Credential] \u003cPSCredential\u003e] [[-MaxThreads] \u003cInt32\u003e] [[-MaxRemoteThreads] \u003cInt32\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcAvailableDisk",
        "Description": "Gets information about the disks that can support Failover Clustering and are visible to all nodes, but are not yet part of the set of clustered disks.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about the disks that can support Failover Clustering and are visible to all nodes, but are not yet part of the set of clustered disks.",
        "Name": "Get-DbaWsfcAvailableDisk",
        "Links": "https://dbatools.io/Get-DbaWsfcAvailableDisk",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcAvailableDisk -ComputerName cluster01\nGets available disks from the failover cluster cluster01",
        "Syntax": "Get-DbaWsfcAvailableDisk [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcCluster",
        "Description": "Gets information about one or more failover clusters in a given domain.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about one or more failover clusters in a given domain.",
        "Name": "Get-DbaWsfcCluster",
        "Links": "https://dbatools.io/Get-DbaWsfcCluster",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcCluster -ComputerName cluster01\nGets failover cluster information about cluster01\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaWsfcCluster -ComputerName cluster01 | Select *\nShows all cluster values, including the ones not shown in the default view",
        "Syntax": "Get-DbaWsfcCluster [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcDisk",
        "Description": "Gets information about the clustered disks on one or more failover clusters in a given domain.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about the clustered disks on one or more failover clusters in a given domain.",
        "Name": "Get-DbaWsfcDisk",
        "Links": "https://dbatools.io/Get-DbaWsfcDisk",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcDisk -ComputerName cluster01\nGets disk information from the failover cluster cluster01",
        "Syntax": "Get-DbaWsfcDisk [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcNetwork",
        "Description": "Gets information about one or more networks in a failover cluster.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about one or more networks in a failover cluster.",
        "Name": "Get-DbaWsfcNetwork",
        "Links": "https://dbatools.io/Get-DbaWsfcNetwork",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcNetwork -ComputerName cluster01\nGets network information from the failover cluster cluster01",
        "Syntax": "Get-DbaWsfcNetwork [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcNetworkInterface",
        "Description": "Gets information about one or more network adapters in a failover cluster.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about one or more network adapters in a failover cluster.",
        "Name": "Get-DbaWsfcNetworkInterface",
        "Links": "https://dbatools.io/Get-DbaWsfcNetworkInterface",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcNetworkInterface -ComputerName cluster01\nGets network interface information from the failover cluster cluster01\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaWsfcNetworkInterface -ComputerName cluster01 | Select *\nShows all network interface values, including the ones not shown in the default view",
        "Syntax": "Get-DbaWsfcNetworkInterface [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcNode",
        "Description": "Gets information about one or more nodes, or servers, in a failover cluster.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about one or more nodes, or servers, in a failover cluster.",
        "Name": "Get-DbaWsfcNode",
        "Links": "https://dbatools.io/Get-DbaWsfcNode",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcNode -ComputerName cluster01\nGets node information from the failover cluster cluster01\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaWsfcNode -ComputerName cluster01 | Select-Object *\nShows all node values, including the ones not shown in the default view",
        "Syntax": "Get-DbaWsfcNode [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcResource",
        "Description": "Gets information about one or more resources in a failover cluster.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about one or more resources in a failover cluster.",
        "Name": "Get-DbaWsfcResource",
        "Links": "https://dbatools.io/Get-DbaWsfcResource",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcResource -ComputerName cluster01\nGets resource information from the failover cluster cluster01\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaWsfcResource -ComputerName cluster01 | Select *\nShows all resource values, including the ones not shown in the default view",
        "Syntax": "Get-DbaWsfcResource [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcResourceType",
        "Description": "Gets information about one or more resource types in a failover cluster.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about one or more resource types in a failover cluster.",
        "Name": "Get-DbaWsfcResourceType",
        "Links": "https://dbatools.io/Get-DbaWsfcResourceType",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcResourceType -ComputerName cluster01\nGets resource type information from the failover cluster cluster01",
        "Syntax": "Get-DbaWsfcResourceType [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcRole",
        "Description": "Gets information about one or more clustered roles (resource groups) in a failover cluster.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about one or more clustered roles (resource groups) in a failover cluster.",
        "Name": "Get-DbaWsfcRole",
        "Links": "https://dbatools.io/Get-DbaWsfcRole",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcRole -ComputerName cluster01\nGets role information from the failover cluster cluster01\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaWsfcRole -ComputerName cluster01 | Select *\nShows all role values, including the ones not shown in the default view",
        "Syntax": "Get-DbaWsfcRole [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaWsfcSharedVolume",
        "Description": "Gets information about Cluster Shared Volumes in a failover cluster.\n\nAll Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.",
        "Tags": [
                     "Cluster",
                     "WSFC",
                     "FCI",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets information about Cluster Shared Volumes in a failover cluster.",
        "Name": "Get-DbaWsfcSharedVolume",
        "Links": "https://dbatools.io/Get-DbaWsfcSharedVolume",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaWsfcSharedVolume -ComputerName cluster01\nGets shared volume (CSV) information from the failover cluster cluster01",
        "Syntax": "Get-DbaWsfcSharedVolume [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaXEObject",
        "Description": "This function returns a list of Traces on the specified SQL Server instance(s) and identifies the default Trace File",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets a list of trace(s) from specified SQL Server instance(s).",
        "Name": "Get-DbaXEObject",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaXEObject -SqlInstance sql2016\nLists all the XE Objects on the sql2016 SQL Server.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaXEObject -SqlInstance sql2017 -Type Action, Event\nLists all the XE Objects of type Action and Event on the sql2017 SQL Server.",
        "Syntax": "Get-DbaXEObject [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Type \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaXESession",
        "Description": "Retrieves a list of Extended Events Sessions present on the specified SQL Server instance(s).",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "Get-DbaXEventSession",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas)",
        "Synopsis": "Gets a list of Extended Events Sessions from the specified SQL Server instance(s).",
        "Name": "Get-DbaXESession",
        "Links": "https://dbatools.io/Get-DbaXESession",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance ServerA\\sql987\nReturns a custom object with ComputerName, SQLInstance, Session, StartTime, Status and other properties.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance ServerA\\sql987 | Format-Table ComputerName, SqlInstance, Session, Status -AutoSize\nReturns a formatted table displaying ComputerName, SqlInstance, Session, and Status.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\u0027ServerA\\sql987\u0027,\u0027ServerB\u0027 | Get-DbaXESession\nReturns a custom object with ComputerName, SqlInstance, Session, StartTime, Status and other properties, from multiple SQL instances.",
        "Syntax": "Get-DbaXESession [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Session] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaXESessionTarget",
        "Description": "Retrieves a list of Extended Events Session Targets from the specified SQL Server instance(s).",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "Get-DbaXEventSessionTarget",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Get a list of Extended Events Session Targets from the specified SQL Server instance(s).",
        "Name": "Get-DbaXESessionTarget",
        "Links": "https://dbatools.io/Get-DbaXESessionTarget",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaXESessionTarget -SqlInstance ServerA\\sql987 -Session system_health\nShows targets for the system_health session on ServerA\\sql987.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2016 -Session system_health | Get-DbaXESessionTarget\nReturns the targets for the system_health session on sql2016.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2016 -Session system_health | Get-DbaXESessionTarget -Target package0.event_file\nReturn only the package0.event_file target for the system_health session on sql2016.",
        "Syntax": "Get-DbaXESessionTarget [-SqlCredential \u003cPSCredential\u003e] [-Session \u003cString[]\u003e] [-Target \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaXESessionTarget -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Session \u003cString[]\u003e] [-Target \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nGet-DbaXESessionTarget [-SqlCredential \u003cPSCredential\u003e] [-Session \u003cString[]\u003e] [-Target \u003cString[]\u003e] -InputObject \u003cSession[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaXESessionTemplate",
        "Description": "Parses Extended Event XML templates. Defaults to parsing templates in the dbatools template repository (\\bin\\xetemplates\\).\n\nThe default repository contains templates from:\nMicrosoft\u0027s Templates that come with SSMS\nJes Borland\u0027s \"Everyday Extended Events\" presentation and GitHub repository (https://github.com/grrlgeek/extended-events)\nChristian Gräfe\u0027s XE Repo: https://github.com/chrgraefe/sqlscripts/blob/master/XE-Events/\nErin Stellato\u0027s Blog: https://www.sqlskills.com/blogs/erin/\n\nSome profile templates converted using:\nsp_SQLskills_ConvertTraceToExtendedEvents.sql\nJonathan M. Kehayias, SQLskills.com\nhttp://sqlskills.com/blogs/jonathan",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Parses Extended Event XML templates. Defaults to parsing templates in the dbatools template repository (\\bin\\xetemplates\\).",
        "Name": "Get-DbaXESessionTemplate",
        "Links": "https://dbatools.io/Get-DbaXESessionTemplate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaXESessionTemplate\nReturns information about all the templates in the local dbatools repository.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaXESessionTemplate | Out-GridView -PassThru | Import-DbaXESessionTemplate -SqlInstance sql2017 | Start-DbaXESession\nAllows you to select a Session template, then import it to the specified instance and start the session.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaXESessionTemplate -Path \"$home\\Documents\\SQL Server Management Studio\\Templates\\XEventTemplates\"\nReturns information about all the templates in your local XEventTemplates repository.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaXESessionTemplate -Pattern duration\nReturns information about all the templates that match the word \"duration\" in the title, category or body.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaXESessionTemplate | Select-Object *\nReturns more information about the template, including the full path/filename.",
        "Syntax": "Get-DbaXESessionTemplate [[-Path] \u003cString[]\u003e] [[-Pattern] \u003cString\u003e] [[-Template] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaXESmartTarget",
        "Description": "Gets an XESmartTarget PowerShell job created by Start-DbaXESmartTarget.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "Gets an XESmartTarget PowerShell job created by Start-DbaXESmartTarget.",
        "Name": "Get-DbaXESmartTarget",
        "Links": "https://dbatools.io/Get-DbaXESmartTarget",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaXESmartTarget\nGets an XESmartTarget PowerShell Job created by Start-DbaXESmartTarget.",
        "Syntax": "Get-DbaXESmartTarget [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Get-DbaXEStore",
        "Description": "Get a Extended Events store",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Get a Extended Events store",
        "Name": "Get-DbaXEStore",
        "Links": "https://dbatools.io/Get-DbaXEStore",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaXEStore -SqlInstance ServerA\\sql987\nReturns an XEvent Store.",
        "Syntax": "Get-DbaXEStore [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Import-DbaCmsRegServer",
        "Description": "Imports registered servers and registered server groups to SQL Server Central Management Server (CMS)",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Import-DbaRegisteredServer",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Imports registered servers and registered server groups to SQL Server Central Management Server (CMS)",
        "Name": "Import-DbaCmsRegServer",
        "Links": "https://dbatools.io/Import-DbaCmsRegServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eImport-DbaCmsRegServer -SqlInstance sql2012 -Path C:\\temp\\corp-regservers.xml\nImports C:\\temp\\corp-regservers.xml to the CMS on sql2012\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eImport-DbaCmsRegServer -SqlInstance sql2008 -Group hr\\Seattle -Path C:\\temp\\Seattle.xml\nImports C:\\temp\\Seattle.xml to Seattle subgroup within the hr group on sql2008\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2008, sql2012 | Import-DbaCmsRegServer -SqlInstance sql2017\nImports all registered servers from sql2008 and sql2012 to sql2017\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sql2008 -Group hr\\Seattle | Import-DbaCmsRegServer -SqlInstance sql2017 -Group Seattle\nImports all registered servers from the hr\\Seattle group on sql2008 to the Seattle group on sql2017",
        "Syntax": "Import-DbaCmsRegServer [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Path] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [[-Group] \u003cObject\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Import-DbaCsvToSql",
        "Description": "Import-DbaCsvToSql takes advantage of .NET\u0027s super fast SqlBulkCopy class to import CSV files into SQL Server at up to 90,000 rows a second.\n\nThe entire import is contained within a transaction, so if a failure occurs or the script is aborted, no changes will persist.\n\nIf the table specified does not exist, it will be automatically created using best guessed data types. In addition, the destination table can be truncated prior to import.\n\nThe Query parameter will be used to import only the data returned from a SQL Query executed against the CSV file(s). This function supports a number of bulk copy options. Please see parameter list for details.",
        "Tags": "Migration",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Efficiently imports very large (and small) CSV files into SQL Server using only the .NET Framework and PowerShell.",
        "Name": "Import-DbaCsvToSql",
        "Links": "https://blog.netnerds.net/2015/09/Import-DbaCsvtosql-super-fast-csv-to-sql-server-import-powershell-module/",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eImport-DbaCsvToSql -Csv C:\\temp\\housing.csv -SqlInstance sql001 -Database markets\nImports the entire comma-delimited housing.csv to the SQL \"markets\" database on a SQL Server named sql001.\nSince a table name was not specified, the table name is automatically determined from filename as \"housing\" and a prompt will appear to confirm table name.\nThe first row is not skipped, as it does not contain column names.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eImport-DbaCsvToSql -Csv .\\housing.csv -SqlInstance sql001 -Database markets -Table housing -First 100000 -Safe -Delimiter \"`t\" -FirstRowColumns\nImports the first 100,000 rows of the tab delimited housing.csv file to the \"housing\" table in the \"markets\" database on a SQL Server named sql001. Since -Safe was specified, the OleDB method will be \r\nused for the bulk import. The first row is skipped, as it contains column names.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eImport-DbaCsvToSql -csv C:\\temp\\huge.txt -SqlInstance sqlcluster -Database locations -Table latitudes -Delimiter \"|\" -Turbo\nImports all records from the pipe delimited huge.txt file using the fastest method possible into the latitudes table within the locations database. Obtains a table lock for the duration of the bulk \r\ncopy operation. This specific command has been used\r\nto import over 10.5 million rows in 2 minutes.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eImport-DbaCsvToSql -Csv C:\\temp\\housing.csv, .\\housing2.csv -SqlInstance sql001 -Database markets -Table housing -Delimiter \"`t\" -query \"select top 100000 column1, column3 from csv\" -Truncate\nTruncates the \"housing\" table, then imports columns 1 and 3 of the first 100000 rows of the tab-delimited housing.csv in the C:\\temp directory, and housing2.csv in the current directory. Since the \r\nquery is executed against both files, a total of 200,000 rows will be imported.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eImport-DbaCsvToSql -Csv C:\\temp\\housing.csv -SqlInstance sql001 -Database markets -Table housing -query \"select address, zip from csv where state = \u0027Louisiana\u0027\" -FirstRowColumns -Truncate \r\n-FireTriggers\nUses the first line to determine CSV column names. Truncates the \"housing\" table on the SQL Server, then imports the address and zip columns from all records in the housing.csv where the state equals \r\nLouisiana.\nTriggers are fired for all rows. Note that this does slightly slow down the import.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eImport-DbaCsvToSql -Csv c:\\temp\\SingleColumn.csv -SqlInstance sql001 -Database markets -Table TempTable -SingleColumn\nUpload the single column Csv SingleColumn.csv to Temptable which has just one column\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eImport-DbaCsvToSql -Csv \"\\\\FileServer\\To Import\\housing.csv\" -SqlInstance sql001 -Database markets\nImports the entire comma-delimited housing.csv located in the share named \"To Import\" on FileServer to the SQL \"markets\" database on a SQL Server named sql001.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eImport-DbaCsvToSql -Csv \u0027\\\\FileServer\\R$\\To Import\\housing.csv\u0027 -SqlInstance sql001 -Database markets\nImports the entire comma-delimited housing.csv located in the directory R:\\To Import on FileServer using the administrative share to the SQL \"markets\" database on a SQL Server named sql001.",
        "Syntax": "Import-DbaCsvToSql [-Csv \u003cString[]\u003e] -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cObject\u003e] [-Table \u003cString\u003e] [-Schema \u003cString\u003e] [-Truncate] [-Delimiter \u003cString\u003e] [-SingleColumn] [-FirstRowColumns] [-First \u003cInt32\u003e] [-BatchSize \u003cInt32\u003e] [-NotifyAfter \u003cInt32\u003e] [-TableLock] [-CheckConstraints] [-FireTriggers] [-KeepIdentity] [-KeepNulls] [-shellswitch] [-SqlCredentialPath \u003cString\u003e] [\u003cCommonParameters\u003e]\nImport-DbaCsvToSql [-Csv \u003cString[]\u003e] -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cObject\u003e] [-Table \u003cString\u003e] [-Schema \u003cString\u003e] [-Truncate] [-Delimiter \u003cString\u003e] [-SingleColumn] [-FirstRowColumns] [-Turbo] [-First \u003cInt32\u003e] [-BatchSize \u003cInt32\u003e] [-NotifyAfter \u003cInt32\u003e] [-TableLock] [-CheckConstraints] [-FireTriggers] [-KeepIdentity] [-KeepNulls] [-shellswitch] [-SqlCredentialPath \u003cString\u003e] [\u003cCommonParameters\u003e]\nImport-DbaCsvToSql [-Csv \u003cString[]\u003e] -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cObject\u003e] [-Table \u003cString\u003e] [-Schema \u003cString\u003e] [-Truncate] [-Delimiter \u003cString\u003e] [-SingleColumn] [-FirstRowColumns] [-Safe] [-First \u003cInt32\u003e] [-Query \u003cString\u003e] [-BatchSize \u003cInt32\u003e] [-NotifyAfter \u003cInt32\u003e] [-TableLock] [-CheckConstraints] [-FireTriggers] [-KeepIdentity] [-KeepNulls] [-shellswitch] [-SqlCredentialPath \u003cString\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Import-DbaPfDataCollectorSetTemplate",
        "Description": "Imports a new Performance Monitor Data Collector Set Template either from the dbatools repository or a file you specify.\nWhen importing data collector sets from the local instance, Run As Admin is required.\n\nNote: The included counters will be added for all SQL instances on the machine by default.\nFor specific instances in addition to the default, use -Instance.\n\nSee https://msdn.microsoft.com/en-us/library/windows/desktop/aa371952 for more information",
        "Tags": [
                     "Performance",
                     "DataCollector",
                     "PerfCounter"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Imports a new Performance Monitor Data Collector Set Template either from the dbatools repository or a file you specify.",
        "Name": "Import-DbaPfDataCollectorSetTemplate",
        "Links": "https://dbatools.io/Import-DbaPfDataCollectorSetTemplate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template \u0027Long Running Query\u0027\nCreates a new data collector set named \u0027Long Running Query\u0027 from the dbatools repository on the SQL Server sql2017.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template \u0027Long Running Query\u0027 -DisplayName \u0027New Long running query\u0027 -Confirm\nCreates a new data collector set named \"New Long Running Query\" using the \u0027Long Running Query\u0027 template. Forces a confirmation if the template exists.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -ComputerName sql2017 -Session db_ola_health | Remove-DbaPfDataCollectorSet\nImport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template db_ola_health | Start-DbaPfDataCollectorSet\nImports a session if it exists, then recreates it using a template.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSetTemplate | Out-GridView -PassThru | Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017\nAllows you to select a Session template then import to an instance named sql2017.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template \u0027Long Running Query\u0027 -Instance SHAREPOINT\nCreates a new data collector set named \u0027Long Running Query\u0027 from the dbatools repository on the SQL Server sql2017 for both the default and the SHAREPOINT instance.\nIf you\u0027d like to remove counters for the default instance, use Remove-DbaPfDataCollectorCounter.",
        "Syntax": "Import-DbaPfDataCollectorSetTemplate [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-DisplayName] \u003cString\u003e] [-SchedulesEnabled] [[-RootPath] \u003cString\u003e] [-Segment] [[-SegmentMaxDuration] \u003cInt32\u003e] [[-SegmentMaxSize] \u003cInt32\u003e] [[-Subdirectory] \u003cString\u003e] [[-SubdirectoryFormat] \u003cInt32\u003e] [[-SubdirectoryFormatPattern] \u003cString\u003e] [[-Task] \u003cString\u003e] [-TaskRunAsSelf] [[-TaskArguments] \u003cString\u003e] [[-TaskUserTextArguments] \u003cString\u003e] [-StopOnCompletion] [[-Path] \u003cString[]\u003e] [[-Template] \u003cString[]\u003e] [[-Instance] \u003cString[]\u003e] [-EnableException] [-WhatIf] [-Confirm] \r\n[\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Import-DbaSpConfigure",
        "Description": "Updates sp_configure settings on destination server.",
        "Tags": [
                     "SpConfig",
                     "Configure",
                     "Configuration"
                 ],
        "Alias": "Import-SqlSpConfigure",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Updates sp_configure settings on destination server.",
        "Name": "Import-DbaSpConfigure",
        "Links": "https://dbatools.io/Import-DbaSpConfigure",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eImport-DbaSpConfigure -Source sqlserver -Destination sqlcluster\nImports the sp_configure settings from the source server sqlserver and sets them on the sqlcluster server using Windows Authentication\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eImport-DbaSpConfigure -Source sqlserver -Destination sqlcluster -Force\nImports the sp_configure settings from the source server sqlserver and sets them on the sqlcluster server using Windows Authentication. Will not do a version check between Source and Destination\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eImport-DbaSpConfigure -Source sqlserver -Destination sqlcluster -SourceSqlCredential $SourceSqlCredential -DestinationSqlCredential $DestinationSqlCredential\nImports the sp_configure settings from the source server sqlserver and sets them on the sqlcluster server using the SQL credentials stored in the variables $SourceSqlCredential and \r\n$DestinationSqlCredential\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eImport-DbaSpConfigure -SqlInstance sqlserver -Path .\\spconfig.sql -SqlCredential $SqlCredential\nImports the sp_configure settings from the file .\\spconfig.sql and sets them on the sqlserver server using the SQL credential stored in the variable $SqlCredential",
        "Syntax": "Import-DbaSpConfigure [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nImport-DbaSpConfigure [-Source \u003cDbaInstanceParameter\u003e] [-Destination \u003cDbaInstanceParameter\u003e] [-SourceSqlCredential \u003cPSCredential\u003e] [-DestinationSqlCredential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nImport-DbaSpConfigure [-SqlInstance \u003cDbaInstanceParameter\u003e] [-Path \u003cString\u003e] [-SqlCredential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Import-DbaXESessionTemplate",
        "Description": "Imports a new XESession XML Template either from the dbatools repository or a file you specify.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Imports a new XESession XML Template",
        "Name": "Import-DbaXESessionTemplate",
        "Links": "https://dbatools.io/Import-DbaXESessionTemplate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eImport-DbaXESessionTemplate -SqlInstance sql2017 -Template db_query_wait_stats\nCreates a new XESession named db_query_wait_stats from the dbatools repository to the SQL Server sql2017.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eImport-DbaXESessionTemplate -SqlInstance sql2017 -Template db_query_wait_stats -Name \"Query Wait Stats\"\nCreates a new XESession named \"Query Wait Stats\" using the db_query_wait_stats template.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2017 -Session db_ola_health | Remove-DbaXESession\nPS C:\\\u003e Import-DbaXESessionTemplate -SqlInstance sql2017 -Template db_ola_health | Start-DbaXESession\nImports a session if it exists, then recreates it using a template.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaXESessionTemplate | Out-GridView -PassThru | Import-DbaXESessionTemplate -SqlInstance sql2017\nAllows you to select a Session template then import to an instance named sql2017.",
        "Syntax": "Import-DbaXESessionTemplate [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cString\u003e] [[-Path] \u003cString[]\u003e] [[-Template] \u003cString[]\u003e] [[-TargetFilePath] \u003cString\u003e] [[-TargetFileMetadataPath] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Install-DbaFirstResponderKit",
        "Description": "Downloads, extracts and installs the First Responder Kit stored procedures:\nsp_Blitz, sp_BlitzWho, sp_BlitzFirst, sp_BlitzIndex, sp_BlitzCache and sp_BlitzTrace, etc.\n\nFirst Responder Kit links:\nhttp://FirstResponderKit.org\nhttps://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit",
        "Tags": [
                     "BrentOzar",
                     "FRK",
                     "FirstResponderKit"
                 ],
        "Alias": "",
        "Author": "Tara Kizer, Brent Ozar Unlimited (https://www.brentozar.com/)",
        "Synopsis": "Installs or updates the First Responder Kit stored procedures.",
        "Name": "Install-DbaFirstResponderKit",
        "Links": "https://dbatools.io/Install-DbaFirstResponderKit",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInstall-DbaFirstResponderKit -SqlInstance server1 -Database master\nLogs into server1 with Windows authentication and then installs the FRK in the master database.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInstall-DbaFirstResponderKit -SqlInstance server1\\instance1 -Database DBA\nLogs into server1\\instance1 with Windows authentication and then installs the FRK in the DBA database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInstall-DbaFirstResponderKit -SqlInstance server1\\instance1 -Database master -SqlCredential $cred\nLogs into server1\\instance1 with SQL authentication and then installs the FRK in the master database.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eInstall-DbaFirstResponderKit -SqlInstance sql2016\\standardrtm, sql2016\\sqlexpress, sql2014\nLogs into sql2016\\standardrtm, sql2016\\sqlexpress and sql2014 with Windows authentication and then installs the FRK in the master database.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$servers = \"sql2016\\standardrtm\", \"sql2016\\sqlexpress\", \"sql2014\"\nPS C:\\\u003e $servers | Install-DbaFirstResponderKit\nLogs into sql2016\\standardrtm, sql2016\\sqlexpress and sql2014 with Windows authentication and then installs the FRK in the master database.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eInstall-DbaFirstResponderKit -SqlInstance sql2016 -Branch dev\nInstalls the dev branch version of the FRK in the master database on sql2016 instance.",
        "Syntax": "Install-DbaFirstResponderKit [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Branch] \u003cString\u003e] [[-Database] \u003cObject\u003e] [[-LocalFile] \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Install-DbaMaintenanceSolution",
        "Description": "This script will download and install the latest version of SQL Server Maintenance Solution created by Ola Hallengren",
        "Tags": [
                     "Ola",
                     "Maintenance"
                 ],
        "Alias": "",
        "Author": "Viorel Ciucu, cviorel.com",
        "Synopsis": "Download and Install SQL Server Maintenance Solution created by Ola Hallengren (https://ola.hallengren.com)",
        "Name": "Install-DbaMaintenanceSolution",
        "Links": "http://dbatools.io/Install-DbaMaintenanceSolution",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInstall-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -CleanupTime 72\nInstalls Ola Hallengren\u0027s Solution objects on RES14224 in the DBA database.\r\nBackups will default to the default Backup Directory.\r\nIf the Maintenance Solution already exists, the script will be halted.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInstall-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -BackupLocation \"Z:\\SQLBackup\" -CleanupTime 72\nThis will create the Ola Hallengren\u0027s Solution objects. Existing objects are not affected in any way.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInstall-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -BackupLocation \"Z:\\SQLBackup\" -CleanupTime 72 -ReplaceExisting\nThis will drop and then recreate the Ola Hallengren\u0027s Solution objects\r\nThe cleanup script will drop and recreate:\r\n- TABLE [dbo].[CommandLog]\r\n- STORED PROCEDURE [dbo].[CommandExecute]\r\n- STORED PROCEDURE [dbo].[DatabaseBackup]\r\n- STORED PROCEDURE [dbo].[DatabaseIntegrityCheck]\r\n- STORED PROCEDURE [dbo].[IndexOptimize]\nThe following SQL Agent jobs will be deleted:\r\n- \u0027Output File Cleanup\u0027\r\n- \u0027IndexOptimize - USER_DATABASES\u0027\r\n- \u0027sp_delete_backuphistory\u0027\r\n- \u0027DatabaseBackup - USER_DATABASES - LOG\u0027\r\n- \u0027DatabaseBackup - SYSTEM_DATABASES - FULL\u0027\r\n- \u0027DatabaseBackup - USER_DATABASES - FULL\u0027\r\n- \u0027sp_purge_jobhistory\u0027\r\n- \u0027DatabaseIntegrityCheck - SYSTEM_DATABASES\u0027\r\n- \u0027CommandLog Cleanup\u0027\r\n- \u0027DatabaseIntegrityCheck - USER_DATABASES\u0027\r\n- \u0027DatabaseBackup - USER_DATABASES - DIFF\u0027",
        "Syntax": "Install-DbaMaintenanceSolution [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject\u003e] [[-BackupLocation] \u003cString\u003e] [[-CleanupTime] \u003cInt32\u003e] [[-OutputFileDirectory] \u003cString\u003e] [-ReplaceExisting] [-LogToTable] [[-Solution] \u003cString\u003e] [-InstallJobs] [[-LocalFile] \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Install-DbaWatchUpdate",
        "Description": "Adds the scheduled task to support Watch-DbaUpdate.",
        "Tags": "Module",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Adds the scheduled task to support Watch-DbaUpdate.",
        "Name": "Install-DbaWatchUpdate",
        "Links": "https://dbatools.io/Install-DbaWatchUpdate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInstall-DbaWatchUpdate\nAdds the scheduled task needed by Watch-DbaUpdate\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInstall-DbaWatchUpdate -TaskName MyScheduledTask\nWill create the scheduled task as the name MyScheduledTask",
        "Syntax": "Install-DbaWatchUpdate [[-TaskName] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Install-DbaWhoIsActive",
        "Description": "This command downloads, extracts and installs sp_WhoisActive with Adam\u0027s permission. To read more about sp_WhoisActive, please visit http://whoisactive.com and http://sqlblog.com/blogs/adam_machanic/archive/tags/who+is+active/default.aspx\n\nPlease consider donating to Adam if you find this stored procedure helpful: http://tinyurl.com/WhoIsActiveDonate\n\nNote that you will be prompted a bunch of times to confirm an action.",
        "Tags": [
                     "AdamMechanic",
                     "WhoIsActive",
                     "SpWhoIsActive"
                 ],
        "Alias": "Install-SqlWhoIsActive",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Automatically installs or updates sp_WhoisActive by Adam Machanic.",
        "Name": "Install-DbaWhoIsActive",
        "Links": "https://dbatools.io/Install-DbaWhoIsActive",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInstall-DbaWhoIsActive -SqlInstance sqlserver2014a -Database master\nDownloads sp_WhoisActive from the internet and installs to sqlserver2014a\u0027s master database. Connects to SQL Server using Windows Authentication.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInstall-DbaWhoIsActive -SqlInstance sqlserver2014a -SqlCredential $cred\nPops up a dialog box asking which database on sqlserver2014a you want to install the procedure into. Connects to SQL Server using SQL Authentication.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInstall-DbaWhoIsActive -SqlInstance sqlserver2014a -Database master -LocalFile c:\\SQLAdmin\\whoisactive_install.sql\nInstalls sp_WhoisActive to sqlserver2014a\u0027s master database from the local file whoisactive_install.sql\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$instances = Get-DbaCmsRegServer sqlserver\nPS C:\\\u003e Install-DbaWhoIsActive -SqlInstance $instances -Database master\nInstalls sp_WhoisActive to all servers within CMS",
        "Syntax": "Install-DbaWhoIsActive [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-LocalFile \u003cString\u003e] [-Database \u003cObject\u003e] [-EnableException] [-Force] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaAdvancedRestore",
        "Description": "This is the final piece in the Restore-DbaDatabase Stack. Usually a BackupHistory object will arrive here from Restore-DbaDatabse via the following pipeline:\nGet-DbaBackupInformation | Select-DbaBackupInformation | Format-DbaBackupInformation | Test-DbaBackupInformation | Invoke-DbaAdvancedRestore\n\nWe have exposed these functions publicly to allow advanced users to perform operations that we don\u0027t support, or won\u0027t add as they would make things too complex for the majority of our users\n\nFor example if you wanted to do some very complex redirection during a migration, then doing the rewrite of destinations may be better done with your own custom scripts rather than via Format-DbaBackupInformation\n\nWe would recommend ALWAYS pushing your input through Test-DbaBackupInformation just to make sure that it makes sense to us.",
        "Tags": [
                     "Restore",
                     "Backup"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Allows the restore of modified BackupHistory Objects\nFor 90% of users Restore-DbaDatabase should be your point of access to this function. The other 10% use it at their own risk",
        "Name": "Invoke-DbaAdvancedRestore",
        "Links": "https://dbatools.io/Invoke-DbaAdvancedRestore",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$BackupHistory | Invoke-DbaAdvancedRestore -SqlInstance MyInstance\nWill restore all the backups in the BackupHistory object according to the transformations it contains\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$BackupHistory | Invoke-DbaAdvancedRestore -SqlInstance MyInstance -OutputScriptOnly\nPS C:\\\u003e $BackupHistory | Invoke-DbaAdvancedRestore -SqlInstance MyInstance\nFirst generates just the T-SQL restore scripts so they can be sanity checked, and then if they are good perform the full restore. By reusing the BackupHistory object there is no need to rescan all \r\nthe backup files again",
        "Syntax": "Invoke-DbaAdvancedRestore [-BackupHistory] \u003cObject[]\u003e [[-SqlInstance] \u003cDbaInstanceParameter\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-OutputScriptOnly] [-VerifyOnly] [[-RestoreTime] \u003cDateTime\u003e] [[-StandbyDirectory] \u003cString\u003e] [-NoRecovery] [[-MaxTransferSize] \u003cInt32\u003e] [[-BlockSize] \u003cInt32\u003e] [[-BufferCount] \u003cInt32\u003e] [-Continue] [[-AzureCredential] \u003cString\u003e] [-WithReplace] [-KeepCDC] [[-PageRestore] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaBalanceDataFiles",
        "Description": "When you have a large database with a single data file and add another file, SQL Server will only use the new file until it\u0027s about the same size.\nYou may want to balance the data between all the data files.\n\nThe function will check the server version and edition to see if the it allows for online index rebuilds.\nIf the server does support it, it will try to rebuild the index online.\nIf the server doesn\u0027t support it, it will rebuild the index offline. Be carefull though, this can cause downtime\n\nThe tables must have a clustered index to be able to balance out the data.\nThe function does NOT yet support heaps.\n\nThe function will also check if the file groups are subject to balance out.\nA file group whould have at least have 2 data files and should be writable.\nIf a table is within such a file group it will be subject for processing. If not the table will be skipped.",
        "Tags": [
                     "Database",
                     "FileManagement",
                     "File",
                     "Space"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Re-balance data between data files",
        "Name": "Invoke-DbaBalanceDataFiles",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaBalanceDataFiles -SqlInstance sql1 -Database db1\nThis command will distribute the data in database db1 on instance sql1\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaBalanceDataFiles -SqlInstance sql1 -Database db1 | Select-Object -ExpandProperty DataFilesEnd\nThis command will distribute the data in database db1 on instance sql1\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-DbaBalanceDataFiles -SqlInstance sql1 -Database db1 -Table table1,table2,table5\nThis command will distribute the data for only the tables table1,table2 and table5\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eInvoke-DbaBalanceDataFiles -SqlInstance sql1 -Database db1 -RebuildOffline\nThis command will consider the fact that there might be a SQL Server edition that does not support online rebuilds of indexes.\r\nBy supplying this parameter you give permission to do the rebuilds offline if the edition does not support it.",
        "Syntax": "Invoke-DbaBalanceDataFiles [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-Table \u003cObject[]\u003e] [-RebuildOffline] [-EnableException] [-Force] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nInvoke-DbaBalanceDataFiles -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-Table \u003cObject[]\u003e] [-RebuildOffline] [-EnableException] [-Force] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaCycleErrorLog",
        "Description": "Cycles the current error log for the instance (SQL Server) and/or SQL Server Agent.",
        "Tags": [
                     "Log",
                     "Cycle"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), https://wsmelton.github.io",
        "Synopsis": "Cycles the current instance or agent log.",
        "Name": "Invoke-DbaCycleErrorLog",
        "Links": "https://dbatools.io/Invoke-DbaCycleLog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaCycleLog -SqlInstance sql2016 -Type agent\nCycles the current error log for the SQL Server Agent on SQL Server instance sql2016\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaCycleLog -SqlInstance sql2016 -Type instance\nCycles the current error log for the SQL Server instance on SQL Server instance sql2016\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-DbaCycleLog -SqlInstance sql2016\nCycles the current error log for both SQL Server instance and SQL Server Agent on SQL Server instance sql2016",
        "Syntax": "Invoke-DbaCycleErrorLog [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Type] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDbClone",
        "Description": "Clones a database schema and statistics.\n\nThis can be useful for testing query performance without requiring all the space needed for the data in the database.\n\nRead more at sqlperformance: https://sqlperformance.com/2016/08/sql-statistics/expanding-dbcc-clonedatabase\n\nThanks to Microsoft Tiger Team for the code and idea https://github.com/Microsoft/tigertoolbox/",
        "Tags": [
                     "Statistics",
                     "Performance"
                 ],
        "Alias": "Invoke-DbaDatabaseClone",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Clones a database schema and statistics",
        "Name": "Invoke-DbaDbClone",
        "Links": "https://dbatools.io/Invoke-DbaDbClone",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaDbClone -SqlInstance sql2016 -Database mydb -CloneDatabase myclone\nClones mydb to myclone on sql2016\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaDbClone -SqlInstance sql2016 -Database mydb -CloneDatabase myclone, myclone2 -UpdateStatistics\nUpdates the statistics of mydb then clones to myclone and myclone2",
        "Syntax": "Invoke-DbaDbClone [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [-SqlCredential \u003cPSCredential\u003e] -Database \u003cObject\u003e [-CloneDatabase \u003cString[]\u003e] [-UpdateStatistics] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDbDecryptObject",
        "Description": "When a procedure or a function is created with encryption and you lost the code you\u0027re in trouble.\nYou cannot alter the object or view the definition.\nWith this command you can search for the object and decrypt the it.\n\nThe command will output the results to the console.\nThere is an option to export all the results to a folder creating .sql files.\n\nMake sure the instance allowed dedicated administrator connections (DAC).\nThe binary versions of the objects can only be retrieved using a DAC connection.\nYou can check the DAC connection with:\n\u0027Get-DbaSpConfigure -SqlInstance [yourinstance] -ConfigName RemoteDacConnectionsEnabled\u0027\nIt should say 1 in the ConfiguredValue.\n\nTo change the configurations you can use the Set-DbaSpConfigure command:\n\u0027Set-DbaSpConfigure -SqlInstance [yourinstance] -ConfigName RemoteDacConnectionsEnabled -Value 1\u0027\nIn some cases you may need to reboot the instance.",
        "Tags": [
                     "Encryption",
                     "Decrypt",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Invoke-DbaDbDecryptObject returns the decrypted version of an object",
        "Name": "Invoke-DbaDbDecryptObject",
        "Links": "https://dbatools.io/Invoke-DbaDbDecryptObject",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaDbDecryptObject -SqlInstance SQLDB1 -Database DB1 -ObjectName Function1\nDecrypt object \"Function1\" in DB1 of instance SQLDB1 and output the data to the user.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaDbDecryptObject -SqlInstance SQLDB1 -Database DB1 -ObjectName Function1 -ExportDestination C:\\temp\\decrypt\nDecrypt object \"Function1\" in DB1 of instance SQLDB1 and output the data to the folder \"C:\\temp\\decrypt\".\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-DbaDbDecryptObject -SqlInstance SQLDB1 -Database DB1 -ExportDestination C:\\temp\\decrypt\nDecrypt all objects in DB1 of instance SQLDB1 and output the data to the folder \"C:\\temp\\decrypt\"\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eInvoke-DbaDbDecryptObject -SqlInstance SQLDB1 -Database DB1 -ObjectName Function1, Function2\nDecrypt objects \"Function1\" and \"Function2\" and output the data to the user.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\"SQLDB1\" | Invoke-DbaDbDecryptObject -Database DB1 -ObjectName Function1, Function2\nDecrypt objects \"Function1\" and \"Function2\" and output the data to the user using a pipeline for the instance.",
        "Syntax": "Invoke-DbaDbDecryptObject [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Database] \u003cObject[]\u003e [[-ObjectName] \u003cString[]\u003e] [[-EncodingType] \u003cString\u003e] [[-ExportDestination] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDbLogShipping",
        "Description": "Invoke-DbaDbLogShipping helps to easily set up log shipping for one or more databases.\n\nThis function will make a lot of decisions for you assuming you want default values like a daily interval for the schedules with a 15 minute interval on the day.\nThere are some settings that cannot be made by the function and they need to be prepared before the function is executed.\n\nThe following settings need to be made before log shipping can be initiated:\n- Backup destination (the folder and the privileges)\n- Copy destination (the folder and the privileges)\n\n* Privileges\nMake sure your agent service on both the primary and the secondary instance is an Active Directory account.\nAlso have the credentials ready to set the folder permissions\n\n** Network share\nThe backup destination needs to be shared and have the share privileges of FULL CONTROL to Everyone.\n\n** NTFS permissions\nThe backup destination must have at least read/write permissions for the primary instance agent account.\nThe backup destination must have at least read permissions for the secondary instance agent account.\nThe copy destination must have at least read/write permission for the secondary instance agent acount.",
        "Tags": "LogShipping",
        "Alias": "Invoke-DbaLogShipping",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Invoke-DbaDbLogShipping sets up log shipping for one or more databases",
        "Name": "Invoke-DbaDbLogShipping",
        "Links": "https://dbatools.io/Invoke-DbaDbLogShipping",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$params = @{\n\u003e\u003e SourceSqlInstance = \u0027sql1\u0027\r\n\u003e\u003e DestinationSqlInstance = \u0027sql2\u0027\r\n\u003e\u003e Database = \u0027db1\u0027\r\n\u003e\u003e BackupNetworkPath= \u0027\\\\sql1\\logshipping\u0027\r\n\u003e\u003e BackupLocalPath= \u0027D:\\Data\\logshipping\u0027\r\n\u003e\u003e BackupScheduleFrequencyType = \u0027daily\u0027\r\n\u003e\u003e BackupScheduleFrequencyInterval = 1\r\n\u003e\u003e CompressBackup = $true\r\n\u003e\u003e CopyScheduleFrequencyType = \u0027daily\u0027\r\n\u003e\u003e CopyScheduleFrequencyInterval = 1\r\n\u003e\u003e GenerateFullBackup = $true\r\n\u003e\u003e RestoreScheduleFrequencyType = \u0027daily\u0027\r\n\u003e\u003e RestoreScheduleFrequencyInterval = 1\r\n\u003e\u003e SecondaryDatabaseSuffix = \u0027DR\u0027\r\n\u003e\u003e CopyDestinationFolder = \u0027\\\\sql2\\logshippingdest\u0027\r\n\u003e\u003e Force = $true\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e Invoke-DbaDbLogShipping @params\nSets up log shipping for database \"db1\" with the backup path to a network share allowing local backups.\r\nIt creates daily schedules for the backup, copy and restore job with all the defaults to be executed every 15 minutes daily.\r\nThe secondary database will be called \"db1_LS\".\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$params = @{\n\u003e\u003e SourceSqlInstance = \u0027sql1\u0027\r\n\u003e\u003e DestinationSqlInstance = \u0027sql2\u0027\r\n\u003e\u003e Database = \u0027db1\u0027\r\n\u003e\u003e BackupNetworkPath= \u0027\\\\sql1\\logshipping\u0027\r\n\u003e\u003e GenerateFullBackup = $true\r\n\u003e\u003e Force = $true\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e Invoke-DbaDbLogShipping @params\nSets up log shipping with all defaults except that a backup file is generated.\r\nThe script will show a message that the copy destination has not been supplied and asks if you want to use the default which would be the backup directory of the secondary server with the folder \r\n\"logshipping\" i.e. \"D:\\SQLBackup\\Logshiping\".",
        "Syntax": "Invoke-DbaDbLogShipping [-SourceSqlInstance] \u003cObject\u003e [-DestinationSqlInstance] \u003cObject[]\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [[-SourceCredential] \u003cPSCredential\u003e] [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-DestinationCredential] \u003cPSCredential\u003e] [-Database] \u003cObject[]\u003e [-BackupNetworkPath] \u003cString\u003e [[-BackupLocalPath] \u003cString\u003e] [[-BackupJob] \u003cString\u003e] [[-BackupRetention] \u003cInt32\u003e] [[-BackupSchedule] \u003cString\u003e] [-BackupScheduleDisabled] [[-BackupScheduleFrequencyType] \u003cObject\u003e] [[-BackupScheduleFrequencyInterval] \u003cObject[]\u003e] [[-BackupScheduleFrequencySubdayType] \u003cObject\u003e] \r\n[[-BackupScheduleFrequencySubdayInterval] \u003cInt32\u003e] [[-BackupScheduleFrequencyRelativeInterval] \u003cObject\u003e] [[-BackupScheduleFrequencyRecurrenceFactor] \u003cInt32\u003e] [[-BackupScheduleStartDate] \u003cString\u003e] [[-BackupScheduleEndDate] \u003cString\u003e] [[-BackupScheduleStartTime] \u003cString\u003e] [[-BackupScheduleEndTime] \u003cString\u003e] [[-BackupThreshold] \u003cInt32\u003e] [-CompressBackup] [[-CopyDestinationFolder] \u003cString\u003e] [[-CopyJob] \u003cString\u003e] [[-CopyRetention] \u003cInt32\u003e] [[-CopySchedule] \u003cString\u003e] [-CopyScheduleDisabled] [[-CopyScheduleFrequencyType] \u003cObject\u003e] [[-CopyScheduleFrequencyInterval] \u003cObject[]\u003e] \r\n[[-CopyScheduleFrequencySubdayType] \u003cObject\u003e] [[-CopyScheduleFrequencySubdayInterval] \u003cInt32\u003e] [[-CopyScheduleFrequencyRelativeInterval] \u003cObject\u003e] [[-CopyScheduleFrequencyRecurrenceFactor] \u003cInt32\u003e] [[-CopyScheduleStartDate] \u003cString\u003e] [[-CopyScheduleEndDate] \u003cString\u003e] [[-CopyScheduleStartTime] \u003cString\u003e] [[-CopyScheduleEndTime] \u003cString\u003e] [-DisconnectUsers] [[-FullBackupPath] \u003cString\u003e] [-GenerateFullBackup] [[-HistoryRetention] \u003cInt32\u003e] [-NoRecovery] [-NoInitialization] [[-PrimaryMonitorServer] \u003cString\u003e] [[-PrimaryMonitorCredential] \u003cPSCredential\u003e] [[-PrimaryMonitorServerSecurityMode] \u003cObject\u003e] \r\n[-PrimaryThresholdAlertEnabled] [[-RestoreDataFolder] \u003cString\u003e] [[-RestoreLogFolder] \u003cString\u003e] [[-RestoreDelay] \u003cInt32\u003e] [[-RestoreAlertThreshold] \u003cInt32\u003e] [[-RestoreJob] \u003cString\u003e] [[-RestoreRetention] \u003cInt32\u003e] [[-RestoreSchedule] \u003cString\u003e] [-RestoreScheduleDisabled] [[-RestoreScheduleFrequencyType] \u003cObject\u003e] [[-RestoreScheduleFrequencyInterval] \u003cObject[]\u003e] [[-RestoreScheduleFrequencySubdayType] \u003cObject\u003e] [[-RestoreScheduleFrequencySubdayInterval] \u003cInt32\u003e] [[-RestoreScheduleFrequencyRelativeInterval] \u003cObject\u003e] [[-RestoreScheduleFrequencyRecurrenceFactor] \u003cInt32\u003e] [[-RestoreScheduleStartDate] \r\n\u003cString\u003e] [[-RestoreScheduleEndDate] \u003cString\u003e] [[-RestoreScheduleStartTime] \u003cString\u003e] [[-RestoreScheduleEndTime] \u003cString\u003e] [[-RestoreThreshold] \u003cInt32\u003e] [[-SecondaryDatabasePrefix] \u003cString\u003e] [[-SecondaryDatabaseSuffix] \u003cString\u003e] [[-SecondaryMonitorServer] \u003cString\u003e] [[-SecondaryMonitorCredential] \u003cPSCredential\u003e] [[-SecondaryMonitorServerSecurityMode] \u003cObject\u003e] [-SecondaryThresholdAlertEnabled] [-Standby] [[-StandbyDirectory] \u003cString\u003e] [-UseExistingFullBackup] [[-UseBackupFolder] \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDbLogShipRecovery",
        "Description": "By default all the databases for a particular instance are recovered.\nIf the database is in the right state, either standby or recovering, the process will try to recover the database.\n\nAt first the function will check if the backup source directory can still be reached.\nIf so it will look up the last transaction log backup for the database. If that backup file is not the last copied file the log shipping copy job will be started.\nIf the directory cannot be reached for the function will continue to the restoring process.\nAfter the copy job check is performed the job is disabled to prevent the job to run.\n\nFor the restore the log shipping status is checked in the msdb database.\nIf the last restored file is not the same as the last file name found, the log shipping restore job will be executed.\nAfter the restore job check is performed the job is disabled to prevent the job to run\n\nThe last part is to set the database online by restoring the databases with recovery",
        "Tags": "LogShipping",
        "Alias": "Invoke-DbaLogShippingRecovery",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Invoke-DbaDbLogShipRecovery recovers log shipped databases to a normal state to act upon a migration or disaster.",
        "Name": "Invoke-DbaDbLogShipRecovery",
        "Links": "https://dbatools.io/Invoke-DbaDbLogShipRecovery",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaDbLogShipRecovery -SqlInstance server1\nRecovers all the databases on the instance that are enabled for log shipping\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaDbLogShipRecovery -SqlInstance server1 -SqlCredential $cred -Verbose\nRecovers all the databases on the instance that are enabled for log shipping using a credential\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-DbaDbLogShipRecovery -SqlInstance server1 -database db_logship -Verbose\nRecovers the database \"db_logship\" to a normal status\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003edb1, db2, db3, db4 | Invoke-DbaDbLogShipRecovery -SqlInstance server1 -Verbose\nRecovers the database db1, db2, db3, db4 to a normal status\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eInvoke-DbaDbLogShipRecovery -SqlInstance server1 -WhatIf\nShows what would happen if the command were executed.",
        "Syntax": "Invoke-DbaDbLogShipRecovery [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-Database] \u003cString[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-NoRecovery] [-EnableException] [-Force] [[-InputObject] \u003cDatabase[]\u003e] [[-Delay] \u003cInt32\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDbMirrorFailover",
        "Description": "Failover a mirrored database",
        "Tags": [
                     "Mirror",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Failover a mirrored database",
        "Name": "Invoke-DbaDbMirrorFailover",
        "Links": "https://dbatools.io/Invoke-DbaDbMirrorFailover",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaDbMirrorFailover -SqlInstance sql2016 -Database pubs\nFails over the pubs database on sql2016. Prompts for confirmation.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2016 -Database pubs | Invoke-DbaDbMirrorFailover -Force -Confirm:$false\nForces the failover of the pubs database on sql2016 and allows data loss.\r\nDoes not prompt for confirmation.",
        "Syntax": "Invoke-DbaDbMirrorFailover [[-SqlInstance] \u003cDbaInstanceParameter\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDbMirroring",
        "Description": "Automates the creation of database mirrors.\n\n* Verifies that a mirror is possible\n* Sets the recovery model to Full if needed\n* If the database does not exist on mirror or witness, a backup/restore is performed\n* Sets up endpoints if necessary\n* Creates a login and grants permissions to service accounts if needed\n* Starts endpoints if needed\n* Sets up partner for mirror\n* Sets up partner for primary\n* Sets up witness if one is specified\n\nNOTE: If a backup / restore is performed, the backups will be left in tact on the network share.",
        "Tags": [
                     "Mirror",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Automates the creation of database mirrors.",
        "Name": "Invoke-DbaDbMirroring",
        "Links": "https://dbatools.io/Invoke-DbaDbMirroring",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$params = @{\n\u003e\u003e Primary = \u0027sql2017a\u0027\r\n\u003e\u003e Mirror = \u0027sql2017b\u0027\r\n\u003e\u003e MirrorSqlCredential = \u0027sqladmin\u0027\r\n\u003e\u003e Witness = \u0027sql2019\u0027\r\n\u003e\u003e Database = \u0027pubs\u0027\r\n\u003e\u003e NetworkShare = \u0027\\\\nas\\sql\\share\u0027\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e Invoke-DbaDbMirror @params\nPerforms a bunch of checks to ensure the pubs database on sql2017a\r\ncan be mirrored from sql2017a to sql2017b. Logs in to sql2019 and sql2017a\r\nusing Windows credentials and sql2017b using a SQL credential.\nPrompts for confirmation for most changes. To avoid confirmation, use -Confirm:$false or\r\nuse the syntax in the second example.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$params = @{\n\u003e\u003e Primary = \u0027sql2017a\u0027\r\n\u003e\u003e Mirror = \u0027sql2017b\u0027\r\n\u003e\u003e MirrorSqlCredential = \u0027sqladmin\u0027\r\n\u003e\u003e Witness = \u0027sql2019\u0027\r\n\u003e\u003e Database = \u0027pubs\u0027\r\n\u003e\u003e NetworkShare = \u0027\\\\nas\\sql\\share\u0027\r\n\u003e\u003e Force = $true\r\n\u003e\u003e Confirm = $false\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e Invoke-DbaDbMirror @params\nPerforms a bunch of checks to ensure the pubs database on sql2017a\r\ncan be mirrored from sql2017a to sql2017b. Logs in to sql2019 and sql2017a\r\nusing Windows credentials and sql2017b using a SQL credential.\nDrops existing pubs database on Mirror and Witness and restores them with\r\na fresh backup.\nDoes all the things in the decription, does not prompt for confirmation.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$map = @{ \u0027database_data\u0027 = \u0027M:\\Data\\database_data.mdf\u0027 \u0027database_log\u0027 = \u0027L:\\Log\\database_log.ldf\u0027 }\nPS C:\\\u003e Get-ChildItem \\\\nas\\seed | Restore-DbaDatabase -SqlInstance sql2017b -FileMapping $map -NoRecovery\r\nPS C:\\\u003e Get-DbaDatabase -SqlInstance sql2017a -Database pubs | Invoke-DbaDbMirroring -Mirror sql2017b -Confirm:$false\nRestores backups from sql2017a to a specific file struture on sql2017b then creates mirror with no prompts for confirmation.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2017a -Database pubs |\n\u003e\u003e Invoke-DbaDbMirroring -Mirror sql2017b -UseLastBackups -Confirm:$false\nMirrors pubs on sql2017a to sql2017b and uses the last full and logs from sql2017a to seed.",
        "Syntax": "Invoke-DbaDbMirroring [[-Primary] \u003cDbaInstanceParameter\u003e] [[-PrimarySqlCredential] \u003cPSCredential\u003e] [-Mirror] \u003cDbaInstanceParameter\u003e [[-MirrorSqlCredential] \u003cPSCredential\u003e] [[-Witness] \u003cDbaInstanceParameter\u003e] [[-WitnessSqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-NetworkShare] \u003cString\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-UseLastBackups] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDbShrink",
        "Description": "Shrinks all files in a database. Databases should be shrunk only when completely necessary.\n\nMany awesome SQL people have written about why you should not shrink your data files. Paul Randal and Kalen Delaney wrote great posts about this topic:\n\nhttp://www.sqlskills.com/blogs/paul/why-you-should-not-shrink-your-data-files\nhttp://sqlmag.com/sql-server/shrinking-data-files\n\nHowever, there are some cases where a database will need to be shrunk. In the event that you must shrink your database:\n\n1. Ensure you have plenty of space for your T-Log to grow\n2. Understand that shrinks require a lot of CPU and disk resources\n3. Consider running DBCC INDEXDEFRAG or ALTER INDEX ... REORGANIZE after the shrink is complete.",
        "Tags": [
                     "Shrink",
                     "Database"
                 ],
        "Alias": "Invoke-DbaDatabaseShrink",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Shrinks all files in a database. This is a command that should rarely be used.\n\n- Shrinks can cause severe index fragmentation (to the tune of 99%)\n- Shrinks can cause massive growth in the database\u0027s transaction log\n- Shrinks can require a lot of time and system resources to perform data movement",
        "Name": "Invoke-DbaDbShrink",
        "Links": "https://dbatools.io/Invoke-DbaDbShrink",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaDbShrink -SqlInstance sql2016 -Database Northwind,pubs,Adventureworks2014\nShrinks Northwind, pubs and Adventureworks2014 to have as little free space as possible.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaDbShrink -SqlInstance sql2014 -Database AdventureWorks2014 -PercentFreeSpace 50\nShrinks AdventureWorks2014 to have 50% free space. So let\u0027s say AdventureWorks2014 was 1GB and it\u0027s using 100MB space. The database free space would be reduced to 50MB.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-DbaDbShrink -SqlInstance sql2014 -Database AdventureWorks2014 -PercentFreeSpace 50 -FileType Data -StepSizeMB 25\nShrinks AdventureWorks2014 to have 50% free space, runs shrinks in 25MB chunks for improved performance.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eInvoke-DbaDbShrink -SqlInstance sql2012 -AllUserDatabases\nShrinks all databases on SQL2012 (not ideal for production)",
        "Syntax": "Invoke-DbaDbShrink [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-AllUserDatabases] [[-PercentFreeSpace] \u003cInt32\u003e] [[-ShrinkMethod] \u003cString\u003e] [[-FileType] \u003cString\u003e] [[-StepSizeMB] \u003cInt32\u003e] [[-StatementTimeout] \u003cInt32\u003e] [-LogsOnly] [-ExcludeIndexStats] [-ExcludeUpdateUsage] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDbUpgrade",
        "Description": "Updates compatibility level, then runs CHECKDB with data_purity, DBCC updateusage, sp_updatestats and finally sp_refreshview against all user views.",
        "Tags": [
                     "Shrink",
                     "Database"
                 ],
        "Alias": "Invoke-DbaDatabaseUpgrade",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Take a database and upgrades it to compatibility of the SQL Instance its hosted on. Based on https://thomaslarock.com/2014/06/upgrading-to-sql-server-2014-a-dozen-things-to-check/",
        "Name": "Invoke-DbaDbUpgrade",
        "Links": "https://dbatools.io/Invoke-DbaDbUpgrade",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaDbUpgrade -SqlInstance PRD-SQL-MSD01 -Database Test\nRuns the below processes against the databases\r\n-- Puts compatibility of database to level of SQL Instance\r\n-- Runs CHECKDB DATA_PURITY\r\n-- Runs DBCC UPDATESUSAGE\r\n-- Updates all users statistics\r\n-- Runs sp_refreshview against every view in the database\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaDbUpgrade -SqlInstance PRD-SQL-INT01 -Database Test -NoRefreshView\nRuns the upgrade command skipping the sp_refreshview update on all views\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-DbaDbUpgrade -SqlInstance PRD-SQL-INT01 -Database Test -Force\nIf database Test is already at the correct compatibility, runs every necessary step\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2016 | Out-GridView -Passthru | Invoke-DbaDbUpgrade\nGet only specific databases using GridView and pass those to Invoke-DbaDbUpgrade",
        "Syntax": "Invoke-DbaDbUpgrade [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-NoCheckDb] [-NoUpdateUsage] [-NoUpdateStats] [-NoRefreshView] [-AllUserDatabases] [-Force] [-InputObject \u003cDatabase[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaDiagnosticQuery",
        "Description": "This is the main function of the Sql Server Diagnostic Queries related functions in dbatools.\nThe diagnostic queries are developed and maintained by Glenn Berry and they can be found here along with a lot of documentation:\nhttp://www.sqlskills.com/blogs/glenn/category/dmv-queries/\n\nThe most recent version of the diagnostic queries are included in the dbatools module.\nBut it is possible to download a newer set or a specific version to an alternative location and parse and run those scripts.\nIt will run all or a selection of those scripts on one or multiple servers and return the result as a PowerShell Object",
        "Tags": [
                     "Database",
                     "DMV"
                 ],
        "Alias": "",
        "Author": "Andre Kamman (@AndreKamman), http://clouddba.io",
        "Synopsis": "Invoke-DbaDiagnosticQuery runs the scripts provided by Glenn Berry\u0027s DMV scripts on specified servers",
        "Name": "Invoke-DbaDiagnosticQuery",
        "Links": "https://dbatools.io/Invoke-DbaDiagnosticQuery",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaDiagnosticQuery -SqlInstance sql2016\nRun the selection made by the user on the Sql Server instance specified.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaDiagnosticQuery -SqlInstance sql2016 -UseSelectionHelper | Export-DbaDiagnosticQuery -Path C:\\temp\\gboutput\nProvides a gridview with all the queries to choose from and will run the selection made by the user on the SQL Server instance specified.\r\nThen it will export the results to Export-DbaDiagnosticQuery.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-DbaDiagnosticQuery -sqlinstance localhost -ExportQueries -outputpath \"C:\\temp\\DiagnosticQueries\"\nExport All Queries to Disk\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eInvoke-DbaDiagnosticQuery -sqlinstance localhost -DatabaseSpecific -DatabaseName \u0027tempdb\u0027 -ExportQueries -outputpath \"C:\\temp\\DiagnosticQueries\"\nExport Database Specific Queries for all User Dbs\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eInvoke-DbaDiagnosticQuery -sqlinstance localhost -DatabaseSpecific -DatabaseName \u0027tempdb\u0027 -ExportQueries -outputpath \"C:\\temp\\DiagnosticQueries\"\nExport Database Specific Queries For One Target Database\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eInvoke-DbaDiagnosticQuery -sqlinstance localhost -DatabaseSpecific -DatabaseName \u0027tempdb\u0027 -ExportQueries -outputpath \"C:\\temp\\DiagnosticQueries\" -queryname \u0027Database-scoped Configurations\u0027\nExport Database Specific Queries For One Target Database and One Specific Query\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eInvoke-DbaDiagnosticQuery -sqlinstance localhost -UseSelectionHelper\nChoose Queries To Export\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e[PSObject[]]$results = Invoke-DbaDiagnosticQuery -SqlInstance localhost -whatif\nParse the appropriate diagnostic queries by connecting to server, and instead of running them, return as [PSCustomObject[]] to work with further\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e$results = Invoke-DbaDiagnosticQuery -SqlInstance $script:instance2 -DatabaseSpecific -queryname \u0027Database-scoped Configurations\u0027 -databasename $database\nRun diagnostic queries targeted at specific database, and only run database level queries against this database.",
        "Syntax": "Invoke-DbaDiagnosticQuery [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-ExcludeQuery \u003cObject[]\u003e] [-SqlCredential \u003cPSCredential\u003e] [-Path \u003cFileInfo\u003e] [-QueryName \u003cString[]\u003e] [-UseSelectionHelper] [-InstanceOnly] [-DatabaseSpecific] [-NoQueryTextColumn] [-NoPlanColumn] [-NoColumnParsing] [-OutputPath \u003cString\u003e] [-ExportQueries] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaPfRelog",
        "Description": "Pipeline-compatible wrapper for the relog command. Relog is useful for converting Windows Perfmon.\n\nExtracts performance counters from performance counter logs into other formats,\nsuch as text-TSV (for tab-delimited text), text-CSV (for comma-delimited text), binary-BIN, or SQL.\n\nrelog \"C:\\PerfLogs\\Admin\\System Correlation\\WORKSTATIONX_20180112-000001\\DataCollector01.blg\" -o C:\\temp\\foo.csv -f tsv\n\nIf you find any input hangs, please send us the output so we can accommodate for it then use -Raw for an immediate solution.",
        "Tags": [
                     "Performance",
                     "DataCollector",
                     "PerfCounter",
                     "Relog"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Pipeline-compatible wrapper for the relog command which is available on modern Windows platforms.",
        "Name": "Invoke-DbaPfRelog",
        "Links": "https://dbatools.io/Invoke-DbaPfRelog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaPfRelog -Path C:\\temp\\perfmon.blg\nCreates C:\\temp\\perfmon.tsv from C:\\temp\\perfmon.blg.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaPfRelog -Path C:\\temp\\perfmon.blg -Destination C:\\temp\\a\\b\\c\nCreates the temp, a, and b directories if needed, then generates c.tsv (tab separated) from C:\\temp\\perfmon.blg.\nReturns the newly created file as a file object.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -ComputerName sql2016 | Get-DbaPfDataCollector | Invoke-DbaPfRelog -Destination C:\\temp\\perf\nCreates C:\\temp\\perf if needed, then generates computername-datacollectorname.tsv (tab separated) from the latest logs of all data collector sets on sql2016. This destination format was chosen to \r\navoid naming conflicts with piped input.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eInvoke-DbaPfRelog -Path C:\\temp\\perfmon.blg -Destination C:\\temp\\a\\b\\c -Raw\nCreates the temp, a, and b directories if needed, then generates c.tsv (tab separated) from C:\\temp\\perfmon.blg then outputs the raw results of the relog command.\n[Invoke-DbaPfRelog][21:21:35] relog \"C:\\temp\\perfmon.blg\" -f csv -o C:\\temp\\a\\b\\c\nInput\r\n----------------\r\nFile(s):\r\nC:\\temp\\perfmon.blg (Binary)\nBegin: 1/13/2018 5:13:23\r\nEnd: 1/13/2018 14:29:55\r\nSamples: 2227\n100.00%\nOutput\r\n----------------\r\nFile: C:\\temp\\a\\b\\c.csv\nBegin: 1/13/2018 5:13:23\r\nEnd: 1/13/2018 14:29:55\r\nSamples: 2227\nThe command completed successfully.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eInvoke-DbaPfRelog -Path \u0027C:\\temp\\perflog with spaces.blg\u0027 -Destination C:\\temp\\a\\b\\c -Type csv -BeginTime ((Get-Date).AddDays(-30)) -EndTime ((Get-Date).AddDays(-1))\nCreates the temp, a, and b directories if needed, then generates c.csv (comma separated) from C:\\temp\\perflog with spaces.blg\u0027, starts 30 days ago and ends one day ago.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$servers | Get-DbaPfDataCollectorSet | Get-DbaPfDataCollector | Invoke-DbaPfRelog -Multithread -AllowClobber\nRelogs latest data files from all collectors within the servers listed in $servers.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollector -Collector DataCollector01 | Invoke-DbaPfRelog -AllowClobber -AllTime\nRelogs all the log files from the DataCollector01 on the local computer and allows overwrite.",
        "Syntax": "Invoke-DbaPfRelog [[-Path] \u003cString[]\u003e] [[-Destination] \u003cString\u003e] [[-Type] \u003cString\u003e] [-Append] [-AllowClobber] [[-PerformanceCounter] \u003cString[]\u003e] [[-PerformanceCounterPath] \u003cString\u003e] [[-Interval] \u003cInt32\u003e] [[-BeginTime] \u003cDateTime\u003e] [[-EndTime] \u003cDateTime\u003e] [[-ConfigPath] \u003cString\u003e] [-Summary] [[-InputObject] \u003cObject[]\u003e] [-Multithread] [-AllTime] [-Raw] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaQuery",
        "Description": "This function is a wrapper command around Invoke-DbaAsync, which in turn is based on Invoke-SqlCmd2.\nIt was designed to be more convenient to use in a pipeline and to behave in a way consistent with the rest of our functions.",
        "Tags": [
                     "Database",
                     "Query"
                 ],
        "Alias": "Invoke-DbaCmd,Invoke-DbaSqlQuery",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "A command to run explicit T-SQL commands or files.",
        "Name": "Invoke-DbaQuery",
        "Links": "https://dbatools.io/Invoke-DbaQuery",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance server\\instance -Query \u0027SELECT foo FROM bar\u0027\nRuns the sql query \u0027SELECT foo FROM bar\u0027 against the instance \u0027server\\instance\u0027\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance [SERVERNAME] -Group [GROUPNAME] | Invoke-DbaQuery -Query \u0027SELECT foo FROM bar\u0027\nRuns the sql query \u0027SELECT foo FROM bar\u0027 against all instances in the group [GROUPNAME] on the CMS [SERVERNAME]\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\"server1\", \"server1\\nordwind\", \"server2\" | Invoke-DbaQuery -File \"C:\\scripts\\sql\\rebuild.sql\"\nRuns the sql commands stored in rebuild.sql against the instances \"server1\", \"server1\\nordwind\" and \"server2\"\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance \"server1\", \"server1\\nordwind\", \"server2\" | Invoke-DbaQuery -File \"C:\\scripts\\sql\\rebuild.sql\"\nRuns the sql commands stored in rebuild.sql against all accessible databases of the instances \"server1\", \"server1\\nordwind\" and \"server2\"",
        "Syntax": "Invoke-DbaQuery [-SqlInstance \u003cDbaInstanceParameter[]\u003e] [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject\u003e] [-Query] \u003cString\u003e [-QueryTimeout \u003cInt32\u003e] [-As \u003cString\u003e] [-SqlParameters \u003cIDictionary\u003e] [-AppendServerInstance] [-MessagesToOutput] [-InputObject \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nInvoke-DbaQuery [-SqlInstance \u003cDbaInstanceParameter[]\u003e] [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject\u003e] [-QueryTimeout \u003cInt32\u003e] -File \u003cObject[]\u003e [-As \u003cString\u003e] [-SqlParameters \u003cIDictionary\u003e] [-AppendServerInstance] [-MessagesToOutput] [-InputObject \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nInvoke-DbaQuery [-SqlInstance \u003cDbaInstanceParameter[]\u003e] [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject\u003e] [-QueryTimeout \u003cInt32\u003e] -SqlObject \u003cSqlSmoObject[]\u003e [-As \u003cString\u003e] [-SqlParameters \u003cIDictionary\u003e] [-AppendServerInstance] [-MessagesToOutput] [-InputObject \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbatoolsRenameHelper",
        "Description": "Older dbatools command names have been changed. This script helps keep up.",
        "Tags": "Module",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Older dbatools command names have been changed. This script helps keep up.",
        "Name": "Invoke-DbatoolsRenameHelper",
        "Links": "https://dbatools.io/Invoke-DbatoolsRenameHelper",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-ChildItem C:\\temp\\ps\\*.ps1 -Recurse | Invoke-DbatoolsRenameHelper\nChecks to see if any ps1 file in C:\\temp\\ps matches an old command name.\r\nIf so, then the command name within the text is updated and the resulting changes are written to disk in UTF-8.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-ChildItem C:\\temp\\ps\\*.ps1 -Recurse | Invoke-DbatoolsRenameHelper -Encoding Ascii -WhatIf\nShows what would happen if the command would run. If the command would run and there were matches,\r\nthe resulting changes would be written to disk as Ascii encoded.",
        "Syntax": "Invoke-DbatoolsRenameHelper [-InputObject] \u003cFileInfo[]\u003e [[-Encoding] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaWhoIsActive",
        "Description": "Output results of Adam Machanic\u0027s sp_WhoIsActive\n\nThis command was built with Adam\u0027s permission. To read more about sp_WhoIsActive, please visit:\n\nUpdates: http://sqlblog.com/blogs/adam_machanic/archive/tags/who+is+active/default.aspx\n\nAlso, consider donating to Adam if you find this stored procedure helpful: http://tinyurl.com/WhoIsActiveDonate",
        "Tags": [
                     "AdamMechanic",
                     "WhoIsActive",
                     "SpWhoIsActive"
                 ],
        "Alias": "Show-SqlWhoIsActive",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Outputs results of Adam Machanic\u0027s sp_WhoIsActive DataTable",
        "Name": "Invoke-DbaWhoIsActive",
        "Links": "https://dbatools.io/Invoke-DbaWhoIsActive",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaWhoIsActive -SqlInstance sqlserver2014a\nExecute sp_whoisactive on sqlserver2014a. This command expects sp_WhoIsActive to be in the master database. Logs into the SQL Server with Windows credentials.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-DbaWhoIsActive -SqlInstance sqlserver2014a -SqlCredential $credential -Database dbatools\nExecute sp_whoisactive on sqlserver2014a. This command expects sp_WhoIsActive to be in the dbatools database. Logs into the SQL Server with SQL Authentication.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-DbaWhoIsActive -SqlInstance sqlserver2014a -GetAverageTime\nSimilar to running sp_WhoIsActive @get_avg_time\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eInvoke-DbaWhoIsActive -SqlInstance sqlserver2014a -GetOuterCommand -FindBlockLeaders\nSimilar to running sp_WhoIsActive @get_outer_command = 1, @find_block_leaders = 1",
        "Syntax": "Invoke-DbaWhoIsActive [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject\u003e] [[-Filter] \u003cString\u003e] [[-FilterType] \u003cString\u003e] [[-NotFilter] \u003cString\u003e] [[-NotFilterType] \u003cString\u003e] [-ShowOwnSpid] [-ShowSystemSpids] [[-ShowSleepingSpids] \u003cInt32\u003e] [-GetFullInnerText] [[-GetPlans] \u003cInt32\u003e] [-GetOuterCommand] [-GetTransactionInfo] [[-GetTaskInfo] \u003cInt32\u003e] [-GetLocks] [-GetAverageTime] [-GetAdditonalInfo] [-FindBlockLeaders] [[-DeltaInterval] \u003cInt32\u003e] [[-OutputColumnList] \u003cString\u003e] [[-SortOrder] \u003cString\u003e] [[-FormatOutput] \u003cInt32\u003e] [[-DestinationTable] \u003cString\u003e] \r\n[-ReturnSchema] [[-Schema] \u003cString\u003e] [-Help] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-DbaXeReplay",
        "Description": "This command replays events from Read-DbaXEFile. It is simplistic in its approach.\n\n- Writes all queries to a temp sql file\n- Executes temp file using . $sqlcmd so that batches are executed properly\n- Deletes temp file",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "This command replays events from Read-DbaXEFile on one or more target servers",
        "Name": "Invoke-DbaXeReplay",
        "Links": "https://dbatools.io/Invoke-DbaXEReplay",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRead-DbaXEFile -Path C:\\temp\\sample.xel | Invoke-DbaXeReplay -SqlInstance sql2017\nRuns all batch_text for sql_batch_completed against tempdb on sql2017.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRead-DbaXEFile -Path C:\\temp\\sample.xel | Invoke-DbaXeReplay -SqlInstance sql2017 -Database planning -Event sql_batch_completed\nSets the *initial* database to planning then runs only sql_batch_completed against sql2017.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRead-DbaXEFile -Path C:\\temp\\sample.xel | Invoke-DbaXeReplay -SqlInstance sql2017, sql2016\nRuns all batch_text for sql_batch_completed against tempdb on sql2017 and sql2016.",
        "Syntax": "Invoke-DbaXeReplay [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-Event] \u003cString[]\u003e] [-InputObject] \u003cObject\u003e [-Raw] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Invoke-Sqlcmd2",
        "Description": "Runs a T-SQL script. Invoke-Sqlcmd2 runs the whole script and only captures the first selected result set, such as the output of PRINT statements when -verbose parameter is specified.\nParameterized queries are supported.\n\nHelp details below borrowed from Invoke-Sqlcmd",
        "Alias": "",
        "Synopsis": "Runs a T-SQL script.",
        "Name": "Invoke-Sqlcmd2",
        "Links": [
                      "https://github.com/sqlcollaborative/Invoke-SqlCmd2",
                      "https://github.com/RamblingCookieMonster/PowerShell"
                  ],
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-Sqlcmd2 -ServerInstance \"MyComputer\\MyInstance\" -Query \"SELECT login_time AS \u0027StartTime\u0027 FROM sysprocesses WHERE spid = 1\"\nConnects to a named instance of the Database Engine on a computer and runs a basic T-SQL query.\nStartTime\r\n-----------\r\n2010-08-12 21:21:03.593\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eInvoke-Sqlcmd2 -ServerInstance \"MyComputer\\MyInstance\" -InputFile \"C:\\MyFolder\\tsqlscript.sql\" | Out-File -filePath \"C:\\MyFolder\\tsqlscript.rpt\"\nReads a file containing T-SQL statements, runs the file, and writes the output to another file.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eInvoke-Sqlcmd2 -ServerInstance \"MyComputer\\MyInstance\" -Query \"PRINT \u0027hello world\u0027\" -Verbose\nUses the PowerShell -Verbose parameter to return the message output of the PRINT command.\r\nVERBOSE: hello world\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eInvoke-Sqlcmd2 -ServerInstance MyServer\\MyInstance -Query \"SELECT ServerName, VCNumCPU FROM tblServerInfo\" -as PSObject | ?{$_.VCNumCPU -gt 8}\nInvoke-Sqlcmd2 -ServerInstance MyServer\\MyInstance -Query \"SELECT ServerName, VCNumCPU FROM tblServerInfo\" -as PSObject | ?{$_.VCNumCPU}\nThis example uses the PSObject output type to allow more flexibility when working with results.\nIf we used DataRow rather than PSObject, we would see the following behavior:\r\nEach row where VCNumCPU does not exist would produce an error in the first example\r\nResults would include rows where VCNumCPU has DBNull value in the second example\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e\u0027Instance1\u0027, \u0027Server1/Instance1\u0027, \u0027Server2\u0027 | Invoke-Sqlcmd2 -query \"Sp_databases\" -as psobject -AppendServerInstance\nThis example lists databases for each instance. It includes a column for the ServerInstance in question.\r\nDATABASE_NAME DATABASE_SIZE REMARKS ServerInstance\r\n------------- ------------- ------- --------------\r\nREDACTED 88320 Instance1\r\nmaster 17920 Instance1\r\n...\r\nmsdb 618112 Server1/Instance1\r\ntempdb 563200 Server1/Instance1\r\n...\r\nOperationsManager 20480000 Server2\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e#Construct a query using SQL parameters\n$Query = \"SELECT ServerName, VCServerClass, VCServerContact FROM tblServerInfo WHERE VCServerContact LIKE @VCServerContact AND VCServerClass LIKE @VCServerClass\"\n#Run the query, specifying values for SQL parameters\r\nInvoke-Sqlcmd2 -ServerInstance SomeServer\\NamedInstance -Database ServerDB -query $query -SqlParameters @{ VCServerContact=\"%cookiemonster%\"; VCServerClass=\"Prod\" }\nServerName VCServerClass VCServerContact\r\n---------- ------------- ---------------\r\nSomeServer1 Prod cookiemonster, blah\r\nSomeServer2 Prod cookiemonster\r\nSomeServer3 Prod blah, cookiemonster\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eInvoke-Sqlcmd2 -SQLConnection $Conn -Query \"SELECT login_time AS \u0027StartTime\u0027 FROM sysprocesses WHERE spid = 1\"\nUses an existing SQLConnection and runs a basic T-SQL query against it\nStartTime\r\n-----------\r\n2010-08-12 21:21:03.593\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eInvoke-SqlCmd -SQLConnection $Conn -Query \"SELECT ServerName FROM tblServerInfo WHERE ServerName LIKE @ServerName\" -SqlParameters @{\"ServerName = \"c-is-hyperv-1\"}\nExecutes a parameterized query against the existing SQLConnection, with a collection of one parameter to be passed to the query when executed.",
        "Syntax": "Invoke-Sqlcmd2 [-ServerInstance] \u003cString[]\u003e [[-Database] \u003cString\u003e] [-Query] \u003cString\u003e [[-Credential] \u003cPSCredential\u003e] [[-Encrypt]] [[-QueryTimeout] \u003cInt32\u003e] [[-ConnectionTimeout] \u003cInt32\u003e] [[-As] \u003cString\u003e] [[-SqlParameters] \u003cIDictionary\u003e] [[-AppendServerInstance]] [[-ParseGO]] [\u003cCommonParameters\u003e]\nInvoke-Sqlcmd2 [-ServerInstance] \u003cString[]\u003e [[-Database] \u003cString\u003e] [-InputFile] \u003cString\u003e [[-Credential] \u003cPSCredential\u003e] [[-Encrypt]] [[-QueryTimeout] \u003cInt32\u003e] [[-ConnectionTimeout] \u003cInt32\u003e] [[-As] \u003cString\u003e] [[-SqlParameters] \u003cIDictionary\u003e] [[-AppendServerInstance]] [[-ParseGO]] [\u003cCommonParameters\u003e]\nInvoke-Sqlcmd2 [[-Database] \u003cString\u003e] [-Query] \u003cString\u003e [[-QueryTimeout] \u003cInt32\u003e] [[-As] \u003cString\u003e] [[-SqlParameters] \u003cIDictionary\u003e] [[-AppendServerInstance]] [[-ParseGO]] [[-SQLConnection] \u003cSqlConnection\u003e] [\u003cCommonParameters\u003e]\nInvoke-Sqlcmd2 [[-Database] \u003cString\u003e] [-InputFile] \u003cString\u003e [[-QueryTimeout] \u003cInt32\u003e] [[-As] \u003cString\u003e] [[-SqlParameters] \u003cIDictionary\u003e] [[-AppendServerInstance]] [[-ParseGO]] [[-SQLConnection] \u003cSqlConnection\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Measure-DbaBackupThroughput",
        "Description": "Returns backup history details for one or more databases on a SQL Server.\n\nOutput looks like this:\nSqlInstance : sql2016\nDatabase : SharePoint_Config\nAvgThroughputMB : 1.07\nAvgSizeMB : 24.17\nAvgDuration : 00:00:01.1000000\nMinThroughputMB : 0.02\nMaxThroughputMB : 2.26\nMinBackupDate : 8/6/2015 10:22:01 PM\nMaxBackupDate : 6/19/2016 12:57:45 PM\nBackupCount : 10",
        "Tags": [
                     "Backup",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Determines how quickly SQL Server is backing up databases to media.",
        "Name": "Measure-DbaBackupThroughput",
        "Links": "https://dbatools.io/Measure-DbaBackupThroughput",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eMeasure-DbaBackupThroughput -SqlInstance sql2016\nParses every backup in msdb\u0027s backuphistory for stats on all databases.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eMeasure-DbaBackupThroughput -SqlInstance sql2016 -Database AdventureWorks2014\nParses every backup in msdb\u0027s backuphistory for stats on AdventureWorks2014.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eMeasure-DbaBackupThroughput -SqlInstance sql2005 -Last\nProcesses the last full, diff and log backups every backup for all databases on sql2005.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eMeasure-DbaBackupThroughput -SqlInstance sql2005 -Last -Type Log\nProcesses the last log backups every backup for all databases on sql2005.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eMeasure-DbaBackupThroughput -SqlInstance sql2016 -Since (Get-Date).AddDays(-7)\nGets backup calculations for the last week.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eMeasure-DbaBackupThroughput -SqlInstance sql2016 -Since (Get-Date).AddDays(-365) -Database bigoldb\nGets backup calculations, limited to the last year and only the bigoldb database",
        "Syntax": "Measure-DbaBackupThroughput [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Since \u003cDateTime\u003e] [-Last] [-Type \u003cString\u003e] [-DeviceType \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Measure-DbaDiskSpaceRequirement",
        "Description": "Returns a file list from source and destination where source file may overwrite destination. Complex scenarios where a new file may exist is taken into account.\nThis command will accept a hash object in pipeline with the following keys: Source, SourceDatabase, Destination. Using this command will provide a way to prepare before a complex migration with multiple databases from different sources and destinations.",
        "Tags": [
                     "Database",
                     "DiskSpace",
                     "Migration"
                 ],
        "Alias": "",
        "Author": "Pollus Brodeur (@pollusb)",
        "Synopsis": "Calculate the space needed to copy and possibly replace a database from one SQL server to another.",
        "Name": "Measure-DbaDiskSpaceRequirement",
        "Links": "https://dbatools.io/Measure-DbaDiskSpaceRequirement",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eMeasure-DbaDiskSpaceRequirement -Source INSTANCE1 -Database DB1 -Destination INSTANCE2\nCalculate space needed for a simple migration with one database with the same name at destination.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e@(\n\u003e\u003e [PSCustomObject]@{Source=\u0027SQL1\u0027;Destination=\u0027SQL2\u0027;Database=\u0027DB1\u0027},\r\n\u003e\u003e [PSCustomObject]@{Source=\u0027SQL1\u0027;Destination=\u0027SQL2\u0027;Database=\u0027DB2\u0027}\r\n\u003e\u003e ) | Measure-DbaDiskSpaceRequirement\nUsing a PSCustomObject with 2 databases to migrate on SQL2.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eImport-Csv -Path .\\migration.csv -Delimiter \"`t\" | Measure-DbaDiskSpaceRequirement | Format-Table -AutoSize\nUsing a CSV file. You will need to use this header line \"Source\u003ctab\u003eDestination\u003ctab\u003eDatabase\u003ctab\u003eDestinationDatabase\".\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$qry = \"SELECT Source, Destination, Database FROM dbo.Migrations\"\nPS C:\\\u003e Invoke-DbaCmd -SqlInstance DBA -Database Migrations -Query $qry | Measure-DbaDiskSpaceRequirement\nUsing a SQL table. We are DBA after all!",
        "Syntax": "Measure-DbaDiskSpaceRequirement [-Source] \u003cDbaInstanceParameter\u003e [-Database] \u003cString\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter\u003e [[-DestinationDatabase] \u003cString\u003e] [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Measure-DbatoolsImport",
        "Description": "Displays the import load times of the dbatools PowerShell module",
        "Tags": "Debug",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Displays the import load times of the dbatools PowerShell module",
        "Name": "Measure-DbatoolsImport",
        "Links": "https://dbatools.io/Measure-DbatoolsImport",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eMeasure-DbatoolsImport\nDisplays the import load times of the dbatools PowerShell module\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eImport-Module dbatools\nPS C:\\\u003e Measure-DbatoolsImport\nDisplays the import load times of the dbatools PowerShell module",
        "Syntax": "Measure-DbatoolsImport [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Mount-DbaDatabase",
        "Description": "This command will attach a SQL Server database.",
        "Tags": "Database",
        "Alias": "Attach-DbaDatabase",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Attach a SQL Server Database - aliased to Attach-DbaDatabase",
        "Name": "Mount-DbaDatabase",
        "Links": "https://dbatools.io/Mount-DbaDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$fileStructure = New-Object System.Collections.Specialized.StringCollection\nPS C:\\\u003e $fileStructure.Add(\"E:\\archive\\example.mdf\")\r\nPS C:\\\u003e $filestructure.Add(\"E:\\archive\\example.ldf\")\r\nPS C:\\\u003e $filestructure.Add(\"E:\\archive\\example.ndf\")\r\nPS C:\\\u003e Mount-DbaDatabase -SqlInstance sql2016 -Database example -FileStructure $fileStructure\nAttaches a database named \"example\" to sql2016 with the files \"E:\\archive\\example.mdf\", \"E:\\archive\\example.ldf\" and \"E:\\archive\\example.ndf\". The database owner will be set to sa and the attach \r\noption is None.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eMount-DbaDatabase -SqlInstance sql2016 -Database example\nSince the FileStructure was not provided, this command will attempt to determine it based on backup history. If found, a database named example will be attached to sql2016.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eMount-DbaDatabase -SqlInstance sql2016 -Database example -WhatIf\nShows what would happen if the command were executed (without actually performing the command)",
        "Syntax": "Mount-DbaDatabase [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Database] \u003cString[]\u003e [[-FileStructure] \u003cStringCollection\u003e] [[-DatabaseOwner] \u003cString\u003e] [[-AttachOption] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Move-DbaCmsRegServer",
        "Description": "Moves registered servers around SQL Server Central Management Server (CMS)",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Move-DbaRegisteredServer",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Moves registered servers around SQL Server Central Management Server (CMS)",
        "Name": "Move-DbaCmsRegServer",
        "Links": "https://dbatools.io/Move-DbaCmsRegServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eMove-DbaCmsRegServer -SqlInstance sql2012 -Name \u0027Web SQL Cluster\u0027 -NewGroup HR\\Prod\nMoves the registered server on sql2012 titled \u0027Web SQL Cluster\u0027 to the Prod group within the HR group\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eMove-DbaCmsRegServer -SqlInstance sql2012 -Group HR\\Development -NewGroup HR\\Prod\nMoves all servers from the HR and sub-group Development to HR Prod\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2017 -Name \u0027Web SQL Cluster\u0027 | Move-DbaCmsRegServer -NewGroup Web\nMoves the registered server \u0027Web SQL Cluster\u0027 on sql2017 to the Web group, also on sql2017",
        "Syntax": "Move-DbaCmsRegServer [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cString[]\u003e] [[-ServerName] \u003cString[]\u003e] [[-NewGroup] \u003cString\u003e] [[-InputObject] \u003cRegisteredServer[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Move-DbaCmsRegServerGroup",
        "Description": "Moves registered server groups around SQL Server Central Management Server (CMS).",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Move-DbaRegisteredServerGroup",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Moves registered server groups around SQL Server Central Management Server (CMS).",
        "Name": "Move-DbaCmsRegServerGroup",
        "Links": "https://dbatools.io/Move-DbaCmsRegServerGroup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eMove-DbaCmsRegServerGroup -SqlInstance sql2012 -Group HR\\Development -NewGroup AD\\Prod\nMoves the Development group within HR to the Prod group within AD\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServerGroup -SqlInstance sql2017 -Group HR\\Development| Move-DbaCmsRegServer -NewGroup Web\nMoves the Development group within HR to the Web group",
        "Syntax": "Move-DbaCmsRegServerGroup [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Group] \u003cString[]\u003e] [-NewGroup] \u003cString\u003e [[-InputObject] \u003cServerGroup[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaAgentJob",
        "Description": "New-DbaAgentJob makes is possible to create a job in the SQL Server Agent.\nIt returns an array of the job(s) created",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobStep"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "New-DbaAgentJob creates a new job",
        "Name": "New-DbaAgentJob",
        "Links": "https://dbatools.io/New-DbaAgentJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaAgentJob -SqlInstance sql1 -Job \u0027Job One\u0027 -Description \u0027Just another job\u0027\nCreates a job with the name \"Job1\" and a small description\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaAgentJob -SqlInstance sql1 -Job \u0027Job One\u0027 -Disabled\nCreates the job but sets it to disabled\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eNew-DbaAgentJob -SqlInstance sql1 -Job \u0027Job One\u0027 -EventLogLevel OnSuccess\nCreates the job and sets the notification to write to the Windows Application event log on success\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eNew-DbaAgentJob -SqlInstance SSTAD-PC -Job \u0027Job One\u0027 -EmailLevel OnFailure -EmailOperator dba\nCreates the job and sets the notification to send an e-mail to the e-mail operator\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eNew-DbaAgentJob -SqlInstance sql1 -Job \u0027Job One\u0027 -Description \u0027Just another job\u0027 -Whatif\nDoesn\u0027t create the job but shows what would happen.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eNew-DbaAgentJob -SqlInstance sql1, sql2, sql3 -Job \u0027Job One\u0027\nCreates a job with the name \"Job One\" on multiple servers\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e\"sql1\", \"sql2\", \"sql3\" | New-DbaAgentJob -Job \u0027Job One\u0027\nCreates a job with the name \"Job One\" on multiple servers using the pipe line",
        "Syntax": "New-DbaAgentJob [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Job] \u003cString\u003e [[-Schedule] \u003cObject[]\u003e] [[-ScheduleId] \u003cInt32[]\u003e] [-Disabled] [[-Description] \u003cString\u003e] [[-StartStepId] \u003cInt32\u003e] [[-Category] \u003cString\u003e] [[-OwnerLogin] \u003cString\u003e] [[-EventLogLevel] \u003cObject\u003e] [[-EmailLevel] \u003cObject\u003e] [[-PageLevel] \u003cObject\u003e] [[-EmailOperator] \u003cString\u003e] [[-NetsendOperator] \u003cString\u003e] [[-PageOperator] \u003cString\u003e] [[-DeleteLevel] \u003cObject\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaAgentJobCategory",
        "Description": "New-DbaAgentJobCategory makes it possible to create a job category that can be used with jobs.\nIt returns an array of the job(s) created .",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobCategory"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "New-DbaAgentJobCategory creates a new job category.",
        "Name": "New-DbaAgentJobCategory",
        "Links": "https://dbatools.io/New-DbaAgentJobCategory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaAgentJobCategory -SqlInstance sql1 -Category \u0027Category 1\u0027\nCreates a new job category with the name \u0027Category 1\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaAgentJobCategory -SqlInstance sql1 -Category \u0027Category 2\u0027 -CategoryType MultiServerJob\nCreates a new job category with the name \u0027Category 2\u0027 and assign the category type for a multi server job.",
        "Syntax": "New-DbaAgentJobCategory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Category] \u003cString[]\u003e [[-CategoryType] \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaAgentJobStep",
        "Description": "New-DbaAgentJobStep creates a new job in the SQL Server Agent for a specific job",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobStep"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "New-DbaAgentJobStep creates a new job step for a job",
        "Name": "New-DbaAgentJobStep",
        "Links": "https://dbatools.io/New-DbaAgentJobStep",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1\nCreate a step in \"Job1\" with the name Step1 with the default subsystem TransactSql.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1 -Database msdb\nCreate a step in \"Job1\" with the name Step1 where the database will the msdb\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eNew-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1 -StepName Step1 -Database msdb\nCreate a step in \"Job1\" with the name Step1 where the database will the \"msdb\" for multiple servers\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eNew-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1, Job2, \u0027Job Three\u0027 -StepName Step1 -Database msdb\nCreate a step in \"Job1\" with the name Step1 where the database will the \"msdb\" for multiple servers for multiple jobs\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003esql1, sql2, sql3 | New-DbaAgentJobStep -Job Job1 -StepName Step1 -Database msdb\nCreate a step in \"Job1\" with the name Step1 where the database will the \"msdb\" for multiple servers using pipeline",
        "Syntax": "New-DbaAgentJobStep [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Job] \u003cObject[]\u003e [[-StepId] \u003cInt32\u003e] [-StepName] \u003cString\u003e [[-Subsystem] \u003cString\u003e] [[-Command] \u003cString\u003e] [[-CmdExecSuccessCode] \u003cInt32\u003e] [[-OnSuccessAction] \u003cString\u003e] [[-OnSuccessStepId] \u003cInt32\u003e] [[-OnFailAction] \u003cString\u003e] [[-OnFailStepId] \u003cInt32\u003e] [[-Database] \u003cObject\u003e] [[-DatabaseUser] \u003cString\u003e] [[-RetryAttempts] \u003cInt32\u003e] [[-RetryInterval] \u003cInt32\u003e] [[-OutputFileName] \u003cString\u003e] [[-Flag] \u003cString[]\u003e] [[-ProxyName] \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaAgentProxy",
        "Description": "Adds one or more proxies to SQL Server Agent",
        "Tags": [
                     "Agent",
                     "Proxy"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Adds one or more proxies to SQL Server Agent",
        "Name": "New-DbaAgentProxy",
        "Links": "https://dbatools.io/New-DbaAgentProxy",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaAgentProxy -SqlInstance sql2016 -Name STIG -Credential \u0027PowerShell Proxy\u0027\nCreates an Agent Proxy on sql2016 with the name STIG with the \u0027PowerShell Proxy\u0027 credential.\r\nThe proxy is automatically added to the CmdExec subsystem.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaAgentProxy -SqlInstance localhost\\sql2016 -Name STIG -Credential \u0027PowerShell Proxy\u0027 -Description \"Used for auditing purposes\" -Login ad\\sqlstig -SubSystem CmdExec, PowerShell \r\n-ServerRole securtyadmin -MsdbRole ServerGroupAdministratorRole\nCreates an Agent Proxy on sql2016 with the name STIG with the \u0027PowerShell Proxy\u0027 credential and the following principals:\nLogin: ad\\sqlstig\r\nServerRole: securtyadmin\r\nMsdbRole: ServerGroupAdministratorRole\nBy default, only sysadmins have access to create job steps with proxies. This will allow 3 additional principals access:\r\nThe proxy is then added to the CmdExec and PowerShell subsystems",
        "Syntax": "New-DbaAgentProxy [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Name] \u003cString[]\u003e [-Credential] \u003cString[]\u003e [[-SubSystem] \u003cString[]\u003e] [[-Description] \u003cString\u003e] [[-Login] \u003cString[]\u003e] [[-ServerRole] \u003cString[]\u003e] [[-MsdbRole] \u003cString[]\u003e] [-Disabled] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaAgentSchedule",
        "Description": "New-DbaAgentSchedule will help create a new schedule for a job.\nIf the job parameter is not supplied the schedule will not be attached to a job.",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobStep"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "New-DbaAgentSchedule creates a new schedule in the msdb database.",
        "Name": "New-DbaAgentSchedule",
        "Links": "https://dbatools.io/New-DbaAgentSchedule",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaAgentSchedule -SqlInstance localhost\\SQL2016 -Schedule daily -FrequencyType Daily -FrequencyInterval Everyday -Force\nCreates a schedule with a daily frequency every day. It assumes default values for the start date, start time, end date and end time due to -Force.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaAgentSchedule -SqlInstance sstad-pc -Schedule MonthlyTest -FrequencyType Monthly -FrequencyInterval 10 -FrequencyRecurrenceFactor 1 -Force\nCreate a schedule with a monhtly frequency occuring every 10th of the month. It assumes default values for the start date, start time, end date and end time due to -Force.",
        "Syntax": "New-DbaAgentSchedule [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Job] \u003cObject[]\u003e] [[-Schedule] \u003cObject\u003e] [-Disabled] [[-FrequencyType] \u003cObject\u003e] [[-FrequencyInterval] \u003cObject[]\u003e] [[-FrequencySubdayType] \u003cObject\u003e] [[-FrequencySubdayInterval] \u003cInt32\u003e] [[-FrequencyRelativeInterval] \u003cObject\u003e] [[-FrequencyRecurrenceFactor] \u003cInt32\u003e] [[-StartDate] \u003cString\u003e] [[-EndDate] \u003cString\u003e] [[-StartTime] \u003cString\u003e] [[-EndTime] \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaClientAlias",
        "Description": "Creates/updates a SQL Server alias by altering HKLM:\\SOFTWARE\\Microsoft\\MSSQLServer\\Client",
        "Tags": "Alias",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates/updates a sql alias for the specified server - mimics cliconfg.exe",
        "Name": "New-DbaClientAlias",
        "Links": "https://dbatools.io/New-DbaClientAlias",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaClientAlias -ServerName sqlcluster\\sharepoint -Alias sp\nCreates a new TCP alias on the local workstation called sp, which points sqlcluster\\sharepoint\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaClientAlias -ServerName \u0027sqlcluster,14443\u0027 -Alias spinstance\nCreates a new TCP alias on the local workstation called spinstance, which points to sqlcluster, port 14443.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eNew-DbaClientAlias -ServerName sqlcluster\\sharepoint -Alias sp -Protocol NamedPipes\nCreates a new NamedPipes alias on the local workstation called sp, which points sqlcluster\\sharepoint",
        "Syntax": "New-DbaClientAlias [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-ServerName] \u003cDbaInstanceParameter[]\u003e [-Alias] \u003cString\u003e [[-Protocol] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaCmConnection",
        "Description": "Generates a connection object for use in remote computer management.\nThose objects are used for the purpose of cim/wmi queries, caching which protocol worked, optimizing performance and minimizing authentication errors.\n\nNew-DbaCmConnection will create a NEW object and overwrite any existing ones for the specified computer.\nFurthermore, information stored in the input beyond the computername will be discarded in favor of the new settings.\n\nUnless the connection cache has been disabled, all connections will automatically be registered in the cache, so no further action is necessary.\nThe output is primarily for information purposes, however it may be used to pass objects and circumvent the cache with those.\n\nNOTE: Generally, this function need not be used, as a first connection to a computer using any connecting function such as \"Get-DbaCmObject\" will automatically register a new default connection for it.\n\nThis function exists to be able to preconfigure connections.",
        "Tags": [
                     "ComputerManagement",
                     "CIM"
                 ],
        "Alias": "",
        "Synopsis": "Generates a connection object for use in remote computer management.",
        "Name": "New-DbaCmConnection",
        "Links": "https://dbatools.io/New-DbaCmConnection",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaCmConnection -ComputerName sql2014 -UseWindowsCredentials -OverrideExplicitCredential -DisabledConnectionTypes CimRM\nReturns a new configuration object for connecting to the computer sql2014.\r\n- The current user credentials are set as valid\r\n- The connection is configured to ignore explicit credentials (so all connections use the windows credentials)\r\n- The connections will not try using CIM over WinRM\nUnless caching is globally disabled, this is automatically stored in the connection cache and will be applied automatically.\r\nIn that (the default) case, the output is for information purposes only and need not be used.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-Content computers.txt | New-DbaCmConnection -Credential $cred -CimWinRMOptions $options -DisableBadCredentialCache -OverrideExplicitCredential\nGathers a list of computers from a text file, then creates and registers connections for each of them, setting them to ...\r\n- use the credentials stored in $cred\r\n- use the options stored in $options when connecting using CIM over WinRM\r\n- not store credentials that are known to not work\r\n- to ignore explicitly specified credentials\nEssentially, this configures all connections to those computers to prefer failure with the specified credentials over using alternative credentials.",
        "Syntax": "New-DbaCmConnection [-ComputerName \u003cDbaCmConnectionParameter[]\u003e] [-Credential \u003cPSCredential\u003e] [-OverrideExplicitCredential] [-DisabledConnectionTypes {None | CimRM | CimDCOM | Wmi | PowerShellRemoting}] [-DisableBadCredentialCache] [-DisableCimPersistence] [-DisableCredentialAutoRegister] [-EnableCredentialFailover] [-WindowsCredentialsAreBad] [-CimWinRMOptions \u003cWSManSessionOptions\u003e] [-CimDCOMOptions \u003cDComSessionOptions\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nNew-DbaCmConnection [-ComputerName \u003cDbaCmConnectionParameter[]\u003e] [-UseWindowsCredentials] [-OverrideExplicitCredential] [-DisabledConnectionTypes {None | CimRM | CimDCOM | Wmi | PowerShellRemoting}] [-DisableBadCredentialCache] [-DisableCimPersistence] [-DisableCredentialAutoRegister] [-EnableCredentialFailover] [-CimWinRMOptions \u003cWSManSessionOptions\u003e] [-CimDCOMOptions \u003cDComSessionOptions\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaComputerCertificate",
        "Description": "Creates a new computer certificate - self-signed or signed by an Active Directory CA, using the Web Server certificate.\n\nBy default, a key with a length of 1024 and a friendly name of the machines FQDN is generated.\n\nThis command was originally intended to help automate the process so that SSL certificates can be available for enforcing encryption on connections.\n\nIt makes a lot of assumptions - namely, that your account is allowed to auto-enroll and that you have permission to do everything it needs to do ;)\n\nReferences:\nhttp://sqlmag.com/sql-server/7-steps-ssl-encryption\nhttps://azurebi.jppp.org/2016/01/23/using-lets-encrypt-certificates-for-secure-sql-server-connections/\nhttps://blogs.msdn.microsoft.com/sqlserverfaq/2016/09/26/creating-and-registering-ssl-certificates/\n\nThe certificate is generated using AD\u0027s webserver SSL template on the client machine and pushed to the remote machine.",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a new computer certificate useful for Forcing Encryption",
        "Name": "New-DbaComputerCertificate",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaComputerCertificate\nCreates a computer certificate signed by the local domain CA for the local machine with the keylength of 1024.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaComputerCertificate -ComputerName Server1\nCreates a computer certificate signed by the local domain CA _on the local machine_ for server1 with the keylength of 1024.\nThe certificate is then copied to the new machine over WinRM and imported.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eNew-DbaComputerCertificate -ComputerName sqla, sqlb -ClusterInstanceName sqlcluster -KeyLength 4096\nCreates a computer certificate for sqlcluster, signed by the local domain CA, with the keylength of 4096.\nThe certificate is then copied to sqla _and_ sqlb over WinRM and imported.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eNew-DbaComputerCertificate -ComputerName Server1 -WhatIf\nShows what would happen if the command were run\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eNew-DbaComputerCertificate -SelfSigned\nCreates a self-signed certificate",
        "Syntax": "New-DbaComputerCertificate [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CaServer] \u003cString\u003e] [[-CaName] \u003cString\u003e] [[-ClusterInstanceName] \u003cString\u003e] [[-Password] \u003cSecureString\u003e] [[-FriendlyName] \u003cString\u003e] [[-CertificateTemplate] \u003cString\u003e] [[-KeyLength] \u003cInt32\u003e] [[-Store] \u003cString\u003e] [[-Folder] \u003cString\u003e] [[-Dns] \u003cString[]\u003e] [-SelfSigned] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaConnectionString",
        "Description": "Builds or extracts a SQL Server Connection String\n\nSee https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx\nand https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.aspx\nand https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx",
        "Tags": [
                     "Connection",
                     "Connect",
                     "ConnectionString"
                 ],
        "Alias": "New-DbaSqlConnectionString",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Builds or extracts a SQL Server Connection String",
        "Name": "New-DbaConnectionString",
        "Links": "https://dbatools.io/New-DbaConnectionString",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaConnectionString -SqlInstance sql2014\nCreates a connection string that connects using Windows Authentication\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eConnect-DbaInstance -SqlInstance sql2016 | New-DbaConnectionString\nBuilds a connected SMO object using Connect-DbaInstance then extracts and displays the connection string\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$wincred = Get-Credential ad\\sqladmin\nPS C:\\\u003e New-DbaConnectionString -SqlInstance sql2014 -Credential $wincred\nCreates a connection string that connects using alternative Windows credentials\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$sqlcred = Get-Credential sqladmin\nPS C:\\\u003e $server = New-DbaConnectionString -SqlInstance sql2014 -Credential $sqlcred\nLogin to sql2014 as SQL login sqladmin.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$server = New-DbaConnectionString -SqlInstance sql2014 -ClientName \"mah connection\"\nCreates a connection string that connects using Windows Authentication and uses the client name \"mah connection\". So when you open up profiler or use extended events, you can search for \"mah \r\nconnection\".\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$server = New-DbaConnectionString -SqlInstance sql2014 -AppendConnectionString \"Packet Size=4096;AttachDbFilename=C:\\MyFolder\\MyDataFile.mdf;User Instance=true;\"\nCreates a connection string that connects to sql2014 using Windows Authentication, then it sets the packet size (this can also be done via -PacketSize) and other connection attributes.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$server = New-DbaConnectionString -SqlInstance sql2014 -NetworkProtocol TcpIp -MultiSubnetFailover\nCreates a connection string with Windows Authentication that uses TCPIP and has MultiSubnetFailover enabled.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e$connstring = New-DbaConnectionString sql2016 -ApplicationIntent ReadOnly\nCreates a connection string with ReadOnly ApplicationIntent.",
        "Syntax": "New-DbaConnectionString [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Credential] \u003cPSCredential\u003e] [[-AccessToken] \u003cString\u003e] [[-ApplicationIntent] \u003cString\u003e] [[-BatchSeparator] \u003cString\u003e] [[-ClientName] \u003cString\u003e] [[-ConnectTimeout] \u003cInt32\u003e] [-EncryptConnection] [[-FailoverPartner] \u003cString\u003e] [-IsActiveDirectoryUniversalAuth] [[-LockTimeout] \u003cInt32\u003e] [[-MaxPoolSize] \u003cInt32\u003e] [[-MinPoolSize] \u003cInt32\u003e] [-MultipleActiveResultSets] [-MultiSubnetFailover] [[-NetworkProtocol] \u003cString\u003e] [-NonPooledConnection] [[-PacketSize] \u003cInt32\u003e] [[-PooledConnectionLifetime] \u003cInt32\u003e] [[-SqlExecutionModes] \u003cString\u003e] \r\n[[-StatementTimeout] \u003cInt32\u003e] [-TrustServerCertificate] [[-WorkstationId] \u003cString\u003e] [[-AppendConnectionString] \u003cString\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaConnectionStringBuilder",
        "Description": "Creates a System.Data.SqlClient.SqlConnectionStringBuilder from a connection string.",
        "Tags": [
                     "SqlBuild",
                     "ConnectionString",
                     "Connection"
                 ],
        "Alias": "New-DbaSqlConnectionStringBuilder",
        "Author": "zippy1981 | Chrissy LeMaire (@cl)",
        "Synopsis": "Returns a System.Data.SqlClient.SqlConnectionStringBuilder with the string specified",
        "Name": "New-DbaConnectionStringBuilder",
        "Links": "https://dbatools.io/New-DbaConnectionStringBuilder",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaConnectionStringBuilder\nReturns an empty ConnectionStringBuilder\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\"Data Source=localhost,1433;Initial Catalog=AlwaysEncryptedSample;UID=sa;PWD=alwaysB3Encrypt1ng;Application Name=Always Encrypted Sample MVC App;Column Encryption Setting=enabled\" | \r\nNew-DbaConnectionStringBuilder\nReturns a connection string builder that can be used to connect to the local sql server instance on the default port.",
        "Syntax": "New-DbaConnectionStringBuilder [[-ConnectionString] \u003cString[]\u003e] [[-ApplicationName] \u003cString\u003e] [[-DataSource] \u003cString\u003e] [[-InitialCatalog] \u003cString\u003e] [[-IntegratedSecurity] \u003cNullable`1\u003e] [[-UserName] \u003cString\u003e] [[-Password] \u003cString\u003e] [-MultipleActiveResultSets] [[-ColumnEncryptionSetting] {Disabled | Enabled}] [[-WorkstationId] \u003cString\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaCredential",
        "Description": "Creates a new credential",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a new SQL Server credential",
        "Name": "New-DbaCredential",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaCredential -SqlInstance Server1\nYou will be prompted to securely enter your password, then a credential will be created in the master database on server1 if it does not exist.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaCredential -SqlInstance Server1 -Database db1 -Confirm:$false\nSuppresses all prompts to install but prompts to securely enter your password and creates a credential in the \u0027db1\u0027 database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eNew-DbaCredential -SqlInstance Server1 -Name AzureBackupBlobStore -Identity \u0027\u003cAzure Storage Account Name\u003e\u0027 -Password (ConvertTo-SecureString \u0027\u003cAzure Storage Account Access Key\u003e\u0027 -AsPlainText \r\n-Force)\nCreate credential on SQL Server 2012 CU2, SQL Server 2014 for use with BACKUP TO URL.\r\nCredentialIdentity needs to be supplied with the Azure Storage Account Name.\r\nPassword needs to be one of the Access Keys for the account.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eNew-DbaCredential -SqlInstance Server1 -Name \u0027https://\u003cAzure Storage Account Name\u003e.blob.core.windows.net/\u003cBlob Store Container Name\u003e\u0027 -Identity \u0027SHARED ACCESS SIGNATURE\u0027 -Password \r\n(ConvertTo-SecureString \u0027\u003cShared Access Token\u003e\u0027 -AsPlainText -Force)\nCreate Credential on SQL Server 2016 or higher for use with BACKUP TO URL.\r\nName has to be the full URL for the blob store container that will be the backup target.\r\nPassword needs to be passed the Shared Access Token (SAS Key).",
        "Syntax": "New-DbaCredential [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cObject[]\u003e] [-Identity] \u003cString[]\u003e [[-Password] \u003cSecureString\u003e] [[-MappedClassType] \u003cString\u003e] [[-ProviderName] \u003cString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaDacProfile",
        "Description": "The New-DbaDacProfile command generates a standard publish profile xml file that can be used by the DacFx (this and everything else) to control the deployment of your dacpac\nThis generates a standard template XML which is enough to dpeloy a dacpac but it is highly recommended that you add additional options to the publish profile.\nIf you use Visual Studio you can open a publish.xml file and use the ui to edit the file -\nTo create a new file, right click on an SSDT project, choose \"Publish\" then \"Load Profile\" and load your profile or create a new one.\nOnce you have loaded it in Visual Studio, clicking advanced shows you the list of options available to you.\nFor a full list of options that you can add to the profile, google \"sqlpackage.exe command line switches\" or (https://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx)",
        "Tags": "Dacpac",
        "Alias": "New-DbaPublishProfile",
        "Author": "Richie lee (@richiebzzzt)",
        "Synopsis": "Creates a new Publish Profile.",
        "Name": "New-DbaDacProfile",
        "Links": "https://dbatools.io/New-DbaDacProfile",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaDacProfile -SqlInstance sql2017 -SqlCredential ad\\sqldba -Database WorldWideImporters -Path C:\\temp\nIn this example, a prompt will appear for alternative credentials, then a connection will be made to sql2017. Using that connection,\r\nthe ConnectionString will be extracted and used within the Publish Profile XML file which will be created at C:\\temp\\sql2017-WorldWideImporters-publish.xml\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaDacProfile -Database WorldWideImporters -Path C:\\temp -ConnectionString \"SERVER=(localdb)\\MSSQLLocalDB;Integrated Security=True;Database=master\"\nIn this example, no connections are made, and a Publish Profile XML would be created at C:\\temp\\localdb-MSSQLLocalDB-WorldWideImporters-publish.xml",
        "Syntax": "New-DbaDacProfile [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-Database] \u003cString[]\u003e [[-Path] \u003cString\u003e] [[-ConnectionString] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaDbCertificate",
        "Description": "Creates a new database certificate. If no database is specified, the certificate will be created in master.",
        "Tags": "Certificate",
        "Alias": "New-DbaDatabaseCertificate",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a new database certificate",
        "Name": "New-DbaDbCertificate",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaDbCertificate -SqlInstance Server1\nYou will be prompted to securely enter your password, then a certificate will be created in the master database on server1 if it does not exist.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaDbCertificate -SqlInstance Server1 -Database db1 -Confirm:$false\nSuppresses all prompts to install but prompts to securely enter your password and creates a certificate in the \u0027db1\u0027 database",
        "Syntax": "New-DbaDbCertificate [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cString[]\u003e] [[-Database] \u003cObject[]\u003e] [[-Subject] \u003cString[]\u003e] [[-StartDate] \u003cDateTime\u003e] [[-ExpirationDate] \u003cDateTime\u003e] [-ActiveForServiceBrokerDialog] [[-Password] \u003cSecureString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaDbMasterKey",
        "Description": "Creates a new database master key. If no database is specified, the master key will be created in master.",
        "Tags": "Certificate",
        "Alias": "New-DbaDatabaseMasterKey",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a new database master key",
        "Name": "New-DbaDbMasterKey",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaDbMasterKey -SqlInstance Server1\nYou will be prompted to securely enter your password, then a master key will be created in the master database on server1 if it does not exist.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaDbMasterKey -SqlInstance Server1 -Database db1 -Confirm:$false\nSuppresses all prompts to install but prompts to securely enter your password and creates a master key in the \u0027db1\u0027 database",
        "Syntax": "New-DbaDbMasterKey [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [-Password] \u003cSecureString\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaDbSnapshot",
        "Description": "Creates database snapshots without hassles",
        "Tags": [
                     "Snapshot",
                     "Restore",
                     "Database"
                 ],
        "Alias": "New-DbaDatabaseSnapshot",
        "Author": "Simone Bizzotto (@niphold)",
        "Synopsis": "Creates database snapshots",
        "Name": "New-DbaDbSnapshot",
        "Links": "https://dbatools.io/New-DbaDbSnapshot",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR, Accounting\nCreates snapshot for HR and Accounting, returning a custom object displaying Server, Database, DatabaseCreated, SnapshotOf, SizeMB, DatabaseCreated, PrimaryFilePath, Status, Notes\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR -Name HR_snap\nCreates snapshot named \"HR_snap\" for HR\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eNew-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR -NameSuffix \u0027fool_{0}_snap\u0027\nCreates snapshot named \"fool_HR_snap\" for HR\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eNew-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR, Accounting -Path F:\\snapshotpath\nCreates snapshots for HR and Accounting databases, storing files under the F:\\snapshotpath\\ dir\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2016 -Database df | New-DbaDbSnapshot\nCreates a snapshot for the database df on sql2016",
        "Syntax": "New-DbaDbSnapshot [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-AllDatabases] [[-Name] \u003cString\u003e] [[-NameSuffix] \u003cString\u003e] [[-Path] \u003cString\u003e] [-Force] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaDbUser",
        "Description": "Creates a new user for a specified database with provided specifications.",
        "Tags": [
                     "Database",
                     "User"
                 ],
        "Alias": "",
        "Author": "Frank Henninger (@osiris687)",
        "Synopsis": "Creates a new user for the specified database.",
        "Name": "New-DbaDbUser",
        "Links": "https://dbatools.io/New-DbaDbUser",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaDbUser -SqlInstance sqlserver2014 -Database DB1 -Login user1\nCreates a new sql user with login named user1 in the specified database.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaDbUser -SqlInstance sqlserver2014 -Database DB1 -Username user1\nCreates a new sql user without login named user1 in the specified database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eNew-DbaDbUser -SqlInstance sqlserver2014 -Database DB1 -Login Login1 -Username user1\nCreates a new sql user named user1 mapped to Login1 in the specified database.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbUser -SqlInstance sqlserver1 -Database DB1 | New-DbaDbUser -SqlInstance sqlserver2 -Database DB1\nCopies users from sqlserver1.DB1 to sqlserver2.DB1. Does not copy permissions!",
        "Syntax": "New-DbaDbUser [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-IncludeSystem] [-Username \u003cString[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nNew-DbaDbUser [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-IncludeSystem] [-Login \u003cString[]\u003e] [-Username \u003cString[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaDirectory",
        "Description": "Uses master.dbo.xp_create_subdir to create the path\nReturns $true if the path can be created, $false otherwise",
        "Tags": [
                     "Path",
                     "Directory",
                     "Folder"
                 ],
        "Alias": "New-DbaSqlDirectory",
        "Author": "Stuart Moore",
        "Synopsis": "Creates new path as specified by the path variable",
        "Name": "New-DbaDirectory",
        "Links": "https://dbatools.io/New-DbaDirectory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaDirectory -SqlInstance sqlcluster -Path L:\\MSAS12.MSSQLSERVER\\OLAP\nIf the SQL Server instance sqlcluster can create the path L:\\MSAS12.MSSQLSERVER\\OLAP it will do and return $true, if not it will return $false.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$credential = Get-Credential\nPS C:\\\u003e New-DbaDirectory -SqlInstance sqlcluster -SqlCredential $credential -Path L:\\MSAS12.MSSQLSERVER\\OLAP\nIf the SQL Server instance sqlcluster can create the path L:\\MSAS12.MSSQLSERVER\\OLAP it will do and return $true, if not it will return $false. Uses a SqlCredential to connect",
        "Syntax": "New-DbaDirectory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-Path] \u003cString\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaEndpoint",
        "Description": "Creates SQL Server endpoints.",
        "Tags": "Endpoint",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates SQL Server endpoints.",
        "Name": "New-DbaEndpoint",
        "Links": "https://dbatools.io/New-DbaEndpoint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaEndpoint -SqlInstance localhost\nCreates all Endpoint(s) on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaEndpoint -SqlInstance localhost, sql2016\nReturns all Endpoint(s) for the local and sql2016 SQL Server instances",
        "Syntax": "New-DbaEndpoint [-SqlInstance] \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-Name \u003cString\u003e] [-Type \u003cString\u003e] [-Protocol \u003cString\u003e] [-Role \u003cString\u003e] [-EndpointEncryption \u003cString\u003e] [-EncryptionAlgorithm \u003cString\u003e] [-Port \u003cInt32\u003e] [-SslPort \u003cInt32\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaLogin",
        "Description": "Creates a new SQL Server login with provided specifications",
        "Tags": [
                     "Login",
                     "Security"
                 ],
        "Alias": "",
        "Author": "Kirill Kravtsov (@nvarscar)",
        "Synopsis": "Creates a new SQL Server login",
        "Name": "New-DbaLogin",
        "Links": "https://dbatools.io/New-DbaLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaLogin -SqlInstance Server1,Server2 -Login Newlogin\nYou will be prompted to securely enter the password for a login [Newlogin]. The login would be created on servers Server1 and Server2 with default parameters.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$securePassword = Read-Host \"Input password\" -AsSecureString\nPS C:\\\u003e New-DbaLogin -SqlInstance Server1\\sql1 -Login Newlogin -Password $securePassword -PasswordPolicy -PasswordExpiration\nCreates a login on Server1\\sql1 with a predefined password. The login will have password and expiration policies enforced onto it.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql1 -Login Oldlogin | New-DbaLogin -SqlInstance sql1 -LoginRenameHashtable @{Oldlogin = \u0027Newlogin\u0027} -Force -NewSid -Disabled:$false\nCopies a login [Oldlogin] to the same instance sql1 with the same parameters (including password). New login will have a new sid, a new name [Newlogin] and will not be disabled. Existing login \r\n[Newlogin] will be removed prior to creation.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance sql1 -Login Login1,Login2 | New-DbaLogin -SqlInstance sql2 -PasswordPolicy -PasswordExpiration -DefaultDatabase tempdb -Disabled\nCopies logins [Login1] and [Login2] from instance sql1 to instance sql2, but enforces password and expiration policies for the new logins. New logins will also have a default database set to [tempdb] \r\nand will be created in a disabled state.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eNew-DbaLogin -SqlInstance sql1 -Login domain\\user\nCreates a new Windows Authentication backed login on sql1. The login will be part of the public server role.",
        "Syntax": "New-DbaLogin [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [[-Login] \u003cString[]\u003e] [-InputObject \u003cObject[]\u003e] [-LoginRenameHashtable \u003cHashtable\u003e] [[-Password] \u003cSecureString\u003e] [-MapToCredential \u003cString\u003e] [-Sid \u003cObject\u003e] [-DefaultDatabase \u003cString\u003e] [-Language \u003cString\u003e] [-PasswordExpiration] [-PasswordPolicy] [-Disabled] [-NewSid] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nNew-DbaLogin [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Login \u003cString[]\u003e] [-InputObject \u003cObject[]\u003e] [-LoginRenameHashtable \u003cHashtable\u003e] [-MapToAsymmetricKey \u003cString\u003e] [-MapToCredential \u003cString\u003e] [-Sid \u003cObject\u003e] [-Disabled] [-NewSid] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nNew-DbaLogin [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Login \u003cString[]\u003e] [-InputObject \u003cObject[]\u003e] [-LoginRenameHashtable \u003cHashtable\u003e] [-MapToCertificate \u003cString\u003e] [-MapToCredential \u003cString\u003e] [-Sid \u003cObject\u003e] [-Disabled] [-NewSid] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nNew-DbaLogin [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Login \u003cString[]\u003e] [-InputObject \u003cObject[]\u003e] [-LoginRenameHashtable \u003cHashtable\u003e] [-HashedPassword \u003cString\u003e] [-MapToCredential \u003cString\u003e] [-Sid \u003cObject\u003e] [-DefaultDatabase \u003cString\u003e] [-Language \u003cString\u003e] [-PasswordExpiration] [-PasswordPolicy] [-Disabled] [-NewSid] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaScriptingOption",
        "Description": "Creates a new Microsoft.SqlServer.Management.Smo.ScriptingOptions object. Basically saves you the time from remembering the SMO assembly name ;)\n\nSee https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.scriptingoptions.aspx for more information",
        "Tags": [
                     "Migration",
                     "Backup",
                     "DR"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a new Microsoft.SqlServer.Management.Smo.ScriptingOptions object",
        "Name": "New-DbaScriptingOption",
        "Links": "https://dbatools.io/New-DbaScriptingOption",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$options = New-DbaScriptingOption\nPS C:\\\u003e $options.ScriptDrops = $false\r\nPS C:\\\u003e $options.WithDependencies = $true\r\nPS C:\\\u003e Get-DbaAgentJob -SqlInstance sql2016 | Export-DbaScript -ScriptingOptionObject $options\nExports Agent Jobs with the Scripting Options ScriptDrops set to $false and WithDependencies set to true",
        "Syntax": "New-DbaScriptingOption [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaServiceMasterKey",
        "Description": "Creates a new service master key in the master database",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a new service master key",
        "Name": "New-DbaServiceMasterKey",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaServiceMasterKey -SqlInstance Server1\nYou will be prompted to securely enter your Service Key Password twice, then a master key will be created in the master database on server1 if it does not exist.",
        "Syntax": "New-DbaServiceMasterKey [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Password] \u003cSecureString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaSsisCatalog",
        "Description": "After installing the SQL Server Engine and SSIS you still have to enable the SSIS Catalog. This function will enable the catalog and gives the option of supplying the password.",
        "Tags": [
                     "SSIS",
                     "SSISDB",
                     "Catalog"
                 ],
        "Alias": "",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/",
        "Synopsis": "Enables the SSIS Catalog on a SQL Server 2012+",
        "Name": "New-DbaSsisCatalog",
        "Links": "https://dbatools.io/New-DbaSsisCatalog",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$password = ConvertTo-SecureString MyVisiblePassWord -AsPlainText -Force\nPS C:\\\u003e New-DbaSsisCatalog -SqlInstance sql2016 -Password $password\nCreates the SSIS Catalog on server DEV01 with the specified password.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$password = Read-Host -AsSecureString -Prompt \"Enter password\"\nPS C:\\\u003e New-DbaSsisCatalog -SqlInstance DEV01 -Password $password\nCreates the SSIS Catalog on server DEV01 with the specified password.",
        "Syntax": "New-DbaSsisCatalog [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Password] \u003cSecureString\u003e [[-SsisCatalog] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbatoolsSupportPackage",
        "Description": "This function creates an extensive debugging package that can help with reproducing and fixing issues.\n\nThe file will be created on the desktop by default and will contain quite a bit of information:\n- OS Information\n- Hardware Information (CPU, Ram, things like that)\n- .NET Information\n- PowerShell Information\n- Your input history\n- The In-Memory message log\n- The In-Memory error log\n- Screenshot of the console buffer (Basically, everything written in your current console, even if you have to scroll upwards to see it.",
        "Tags": "Debug",
        "Alias": "",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Creates a package of troubleshooting information that can be used by dbatools to help debug issues.",
        "Name": "New-DbatoolsSupportPackage",
        "Links": "https://dbatools.io/New-DbatoolsSupportPackage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbatoolsSupportPackage\nCreates a large support pack in order to help us troubleshoot stuff.",
        "Syntax": "New-DbatoolsSupportPackage [[-Path] \u003cString\u003e] [[-Variables] \u003cString[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaXESession",
        "Description": "Creates a new XESession object - for the dogged (very manual, Import-DbaXESession is recommended). See the following for more info:\n\nhttps://docs.microsoft.com/en-us/sql/relational-databases/extended-events/use-the-powershell-provider-for-extended-events",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Creates a new XESession object - for the dogged.",
        "Name": "New-DbaXESession",
        "Links": "https://dbatools.io/New-DbaXESession",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$session = New-DbaXESession -SqlInstance sql2017 -Name XeSession_Test\nPS C:\\\u003e $event = $session.AddEvent(\"sqlserver.file_written\")\r\nPS C:\\\u003e $event.AddAction(\"package0.callstack\")\r\nPS C:\\\u003e $session.Create()\nReturns a new XE Session object from sql2017 then adds an event, an action then creates it.",
        "Syntax": "New-DbaXESession [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Name] \u003cString\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaXESmartCsvWriter",
        "Description": "This response type is used to write Extended Events to a CSV file.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "This response type is used to write Extended Events to a CSV file.",
        "Name": "New-DbaXESmartCsvWriter",
        "Links": "https://dbatools.io/New-DbaXESmartCsvWriter",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$columns = \"cpu_time\", \"duration\", \"physical_reads\", \"logical_reads\", \"writes\", \"row_count\"\nPS C:\\\u003e $response = New-DbaXESmartCsvWriter -OutputFile c:\\temp\\workload.csv -OutputColumn $columns -OverWrite -Event \"sql_batch_completed\"\r\nPS C:\\\u003e Start-DbaXESmartTarget -SqlInstance localhost\\sql2017 -Session \"Profiler Standard\" -Responder $response\nWrites Extended Events to the file \"C:\\temp\\workload.csv\".",
        "Syntax": "New-DbaXESmartCsvWriter [-OutputFile] \u003cString\u003e [-Overwrite] [[-Event] \u003cString[]\u003e] [[-OutputColumn] \u003cString[]\u003e] [[-Filter] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaXESmartEmail",
        "Description": "This response type can be used to send an email each time an event is captured.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "This response type can be used to send an email each time an event is captured.",
        "Name": "New-DbaXESmartEmail",
        "Links": "https://dbatools.io/New-DbaXESmartEmail",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$params = @{\n\u003e\u003e SmtpServer = \"smtp.ad.local\"\r\n\u003e\u003e To = \"admin@ad.local\"\r\n\u003e\u003e Sender = \"reports@ad.local\"\r\n\u003e\u003e Subject = \"Query executed\"\r\n\u003e\u003e Body = \"Query executed at {collection_time}\"\r\n\u003e\u003e Attachment = \"batch_text\"\r\n\u003e\u003e AttachmentFileName = \"query.sql\"\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e $emailresponse = New-DbaXESmartEmail @params\r\nPS C:\\\u003e Start-DbaXESmartTarget -SqlInstance sql2017 -Session querytracker -Responder $emailresponse\nSends an email each time a querytracker event is captured.",
        "Syntax": "New-DbaXESmartEmail [-SmtpServer] \u003cString\u003e [-Sender] \u003cString\u003e [-To] \u003cString[]\u003e [[-Cc] \u003cString[]\u003e] [[-Bcc] \u003cString[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-Subject] \u003cString\u003e [-Body] \u003cString\u003e [[-Attachment] \u003cString\u003e] [[-AttachmentFileName] \u003cString\u003e] [[-PlainText] \u003cString\u003e] [[-Event] \u003cString[]\u003e] [[-Filter] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaXESmartQueryExec",
        "Description": "This response type executes a T-SQL command against a target database whenever an event is recorded.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "This response type executes a T-SQL command against a target database whenever an event is recorded.",
        "Name": "New-DbaXESmartQueryExec",
        "Links": "https://dbatools.io/New-DbaXESmartQueryExec",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$response = New-DbaXESmartQueryExec -SqlInstance sql2017 -Database dbadb -Query \"update table set whatever = 1\"\nPS C:\\\u003e Start-DbaXESmartTarget -SqlInstance sql2017 -Session deadlock_tracker -Responder $response\nExecutes a T-SQL command against dbadb on sql2017 whenever a deadlock event is recorded.",
        "Syntax": "New-DbaXESmartQueryExec [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString\u003e] [[-Query] \u003cString\u003e] [-EnableException] [[-Event] \u003cString[]\u003e] [[-Filter] \u003cString\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaXESmartReplay",
        "Description": "This response type can be used to replay execution related events to a target SQL Server instance. The events that you can replay are of the type sql_batch_completed and rpc_completed: all other events are ignored.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "This response type can be used to replay execution related events to a target SQL Server instance.",
        "Name": "New-DbaXESmartReplay",
        "Links": "https://dbatools.io/New-DbaXESmartReplay",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$response = New-DbaXESmartReplay -SqlInstance sql2017 -Database planning\nPS C:\\\u003e Start-DbaXESmartTarget -SqlInstance sql2016 -Session loadrelay -Responder $response\nReplays events from sql2016 on sql2017 in the planning database. Returns a PowerShell job object.\nTo see a list of all SmartTarget job objects, use Get-DbaXESmartTarget.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$response = New-DbaXESmartReplay -SqlInstance sql2017 -Database planning\nPS C:\\\u003e Start-DbaXESmartTarget -SqlInstance sql2017 -Session \u0027Profiler Standard\u0027 -Responder $response -NotAsJob\nReplays events from the \u0027Profiler Standard\u0027 session on sql2016 to sql2017\u0027s planning database. Does not run as a job so you can see the raw output.",
        "Syntax": "New-DbaXESmartReplay [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString\u003e] [[-Event] \u003cString[]\u003e] [[-Filter] \u003cString\u003e] [[-DelaySeconds] \u003cInt32\u003e] [-StopOnError] [[-ReplayIntervalSeconds] \u003cInt32\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "New-DbaXESmartTableWriter",
        "Description": "This response type is used to write Extended Events to a database table. The events are temporarily stored in memory before being written to the database at regular intervals.\n\nThe target table can be created manually upfront or you can let the TableAppenderResponse create a target table based on the fields and actions available in the events captured.\n\nThe columns of the target table and the fields/actions of the events are mapped by name (case-sensitive).",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "This response type is used to write Extended Events to a database table.",
        "Name": "New-DbaXESmartTableWriter",
        "Links": "https://dbatools.io/New-DbaXESmartTableWriter",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$columns = \"cpu_time\", \"duration\", \"physical_reads\", \"logical_reads\", \"writes\", \"row_count\", \"batch_text\"\nPS C:\\\u003e $response = New-DbaXESmartTableWriter -SqlInstance sql2017 -Database dbadb -Table deadlocktracker -OutputColumn $columns -Filter \"duration \u003e 10000\"\r\nPS C:\\\u003e Start-DbaXESmartTarget -SqlInstance sql2017 -Session deadlock_tracker -Responder $response\nWrites Extended Events to the deadlocktracker table in dbadb on sql2017.",
        "Syntax": "New-DbaXESmartTableWriter [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Database] \u003cString\u003e [-Table] \u003cString\u003e [-AutoCreateTargetTable] [[-UploadIntervalSeconds] \u003cInt32\u003e] [[-Event] \u003cString[]\u003e] [[-OutputColumn] \u003cString[]\u003e] [[-Filter] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Publish-DbaDacPackage",
        "Description": "Deploying a dacpac uses the DacFx which historically needed to be installed on a machine prior to use. In 2016 the DacFx was supplied by Microsoft as a nuget package (Microsoft.Data.Tools.MSBuild) and this uses that nuget package.",
        "Tags": [
                     "Migration",
                     "Database",
                     "Dacpac"
                 ],
        "Alias": "Publish-DbaDacpac",
        "Author": "Richie lee (@richiebzzzt)",
        "Synopsis": "The Publish-DbaDacPackage command takes a dacpac which is the output from an SSDT project and publishes it to a database. Changing the schema to match the dacpac and also to run any scripts in the dacpac (pre/post deploy scripts).",
        "Name": "Publish-DbaDacPackage",
        "Links": "https://dbatools.io/Publish-DbaDacPackage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003ePublish-DbaDacPackage -SqlInstance sql2017 -Database WideWorldImporters -Path C:\\temp\\sql2016-WideWorldImporters.dacpac -PublishXml C:\\temp\\sql2016-WideWorldImporters-publish.xml\nUpdates WideWorldImporters on sql2017 from the sql2016-WideWorldImporters.dacpac using the sql2016-WideWorldImporters-publish.xml publish profile\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaDacProfile -SqlInstance sql2016 -Database db2 -Path C:\\temp\nPS C:\\\u003e Export-DbaDacPackage -SqlInstance sql2016 -Database db2 | Publish-DbaDacPackage -PublishXml C:\\temp\\sql2016-db2-publish.xml -Database db1, db2 -SqlInstance sql2017\nCreates a publish profile at C:\\temp\\sql2016-db2-publish.xml, exports the .dacpac to $home\\Documents\\sql2016-db2.dacpac\r\nthen publishes it to the sql2017 server database db2\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$loc = \"C:\\Users\\bob\\source\\repos\\Microsoft.Data.Tools.Msbuild\\lib\\net46\\Microsoft.SqlServer.Dac.dll\"\nPS C:\\\u003e Publish-DbaDacPackage -SqlInstance \"local\" -Database WideWorldImporters -Path C:\\temp\\WideWorldImporters.dacpac -PublishXml C:\\temp\\WideWorldImporters.publish.xml -DacFxPath $loc\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003ePublish-DbaDacPackage -SqlInstance sql2017 -Database WideWorldImporters -Path C:\\temp\\sql2016-WideWorldImporters.dacpac -PublishXml C:\\temp\\sql2016-WideWorldImporters-publish.xml \r\n-GenerateDeploymentScript -ScriptOnly\nDoes not deploy the changes, but will generate the deployment script that would be executed against WideWorldImporters.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003ePublish-DbaDacPackage -SqlInstance sql2017 -Database WideWorldImporters -Path C:\\temp\\sql2016-WideWorldImporters.dacpac -PublishXml C:\\temp\\sql2016-WideWorldImporters-publish.xml \r\n-GenerateDeploymentReport -ScriptOnly\nDoes not deploy the changes, but will generate the deployment report that would be executed against WideWorldImporters.",
        "Syntax": "Publish-DbaDacPackage [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-Path] \u003cString\u003e [-PublishXml] \u003cString\u003e [-Database] \u003cString[]\u003e [[-ConnectionString] \u003cString[]\u003e] [-GenerateDeploymentScript] [-GenerateDeploymentReport] [-ScriptOnly] [[-OutputPath] \u003cString\u003e] [-IncludeSqlCmdVars] [-EnableException] [[-DacFxPath] \u003cString\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Read-DbaAuditFile",
        "Description": "Read Audit details from *.sqlaudit files.",
        "Tags": [
                     "ExtendedEvent",
                     "Audit"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Read Audit details from *.sqlaudit files.",
        "Name": "Read-DbaAuditFile",
        "Links": "https://dbatools.io/Read-DbaAuditFile",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRead-DbaAuditFile -Path C:\\temp\\logins.sqlaudit\nReturns events from C:\\temp\\logins.sqlaudit.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-ChildItem C:\\temp\\audit\\*.sqlaudit | Read-DbaAuditFile\nReturns events from all .sqlaudit files in C:\\temp\\audit.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaServerAudit -SqlInstance sql2014 -Audit LoginTracker | Read-DbaAuditFile\nReads remote Audit details by accessing the file over the admin UNC share.",
        "Syntax": "Read-DbaAuditFile [-Path] \u003cObject[]\u003e [-Exact] [-Raw] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Read-DbaBackupHeader",
        "Description": "Reads full, differential and transaction log backups. An online SQL Server is required to parse the backup files and the path specified must be relative to that SQL Server.",
        "Tags": [
                     "DisasterRecovery",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Reads and displays detailed information about a SQL Server backup.",
        "Name": "Read-DbaBackupHeader",
        "Links": "https://dbatools.io/Read-DbaBackupHeader",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRead-DbaBackupHeader -SqlInstance sql2016 -Path S:\\backups\\mydb\\mydb.bak\nLogs into sql2016 using Windows authentication and reads the local file on sql2016, S:\\backups\\mydb\\mydb.bak.\nIf you are running this command on a workstation and connecting remotely, remember that sql2016 cannot access files on your own workstation.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRead-DbaBackupHeader -SqlInstance sql2016 -Path \\\\nas\\sql\\backups\\mydb\\mydb.bak, \\\\nas\\sql\\backups\\otherdb\\otherdb.bak\nLogs into sql2016 and reads two backup files - mydb.bak and otherdb.bak. The SQL Server service account must have rights to read this file.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRead-DbaBackupHeader -SqlInstance . -Path C:\\temp\\myfile.bak -Simple\nLogs into the local workstation (or computer) and shows simplified output about C:\\temp\\myfile.bak. The SQL Server service account must have rights to read this file.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$backupinfo = Read-DbaBackupHeader -SqlInstance . -Path C:\\temp\\myfile.bak\nPS C:\\\u003e $backupinfo.FileList\nDisplays detailed information about each of the datafiles contained in the backupset.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eRead-DbaBackupHeader -SqlInstance . -Path C:\\temp\\myfile.bak -FileList\nAlso returns detailed information about each of the datafiles contained in the backupset.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e\"C:\\temp\\myfile.bak\", \"\\backupserver\\backups\\myotherfile.bak\" | Read-DbaBackupHeader -SqlInstance sql2016\nSimilar to running Read-DbaBackupHeader -SqlInstance sql2016 -Path \"C:\\temp\\myfile.bak\", \"\\backupserver\\backups\\myotherfile.bak\"\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eGet-ChildItem \\\\nas\\sql\\*.bak | Read-DbaBackupHeader -SqlInstance sql2016\nGets a list of all .bak files on the \\\\nas\\sql share and reads the headers using the server named \"sql2016\". This means that the server, sql2016, must have read access to the \\\\nas\\sql share.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eRead-DbaBackupHeader -Path https://dbatoolsaz.blob.core.windows.net/azbackups/restoretime/restoretime_201705131850.bak -AzureCredential AzureBackupUser\nGets the backup header information from the SQL Server backup file stored at https://dbatoolsaz.blob.core.windows.net/azbackups/restoretime/restoretime_201705131850.bak on Azure",
        "Syntax": "Read-DbaBackupHeader [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Path] \u003cObject[]\u003e [-Simple] [-FileList] [[-AzureCredential] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Read-DbaTraceFile",
        "Description": "Using the fn_trace_gettable function, a trace file is read and returned as a PowerShell object\n\nThis function returns the whole of the trace file. The information is presented in the format that the trace subsystem uses.",
        "Tags": [
                     "Security",
                     "Trace"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Reads SQL Server trace files",
        "Name": "Read-DbaTraceFile",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRead-DbaTraceFile -SqlInstance sql2016 -Database master, tempdb -Path C:\\traces\\big.trc\nReads the tracefile C:\\traces\\big.trc, stored on the sql2016 sql server. Filters only results that have master or tempdb as the DatabaseName.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRead-DbaTraceFile -SqlInstance sql2016 -Database master, tempdb -Path C:\\traces\\big.trc -TextData \u0027EXEC SP_PROCOPTION\u0027\nReads the tracefile C:\\traces\\big.trc, stored on the sql2016 sql server.\r\nFilters only results that have master or tempdb as the DatabaseName and that have \u0027EXEC SP_PROCOPTION\u0027 somewhere in the text.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRead-DbaTraceFile -SqlInstance sql2016 -Path C:\\traces\\big.trc -Where \"LinkedServerName = \u0027myls\u0027 and StartTime \u003e \u00275/30/2017 4:27:52 PM\u0027\"\nReads the tracefile C:\\traces\\big.trc, stored on the sql2016 sql server.\r\nFilters only results where LinkServerName = myls and StartTime is greater than \u00275/30/2017 4:27:52 PM\u0027.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2014 | Read-DbaTraceFile\nReads every trace file on sql2014",
        "Syntax": "Read-DbaTraceFile [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Path \u003cString[]\u003e] [-Database \u003cString[]\u003e] [-Login \u003cString[]\u003e] [-Spid \u003cInt32[]\u003e] [-EventClass \u003cString[]\u003e] [-ObjectType \u003cString[]\u003e] [-Error \u003cInt32[]\u003e] [-EventSequence \u003cInt32[]\u003e] [-TextData \u003cString[]\u003e] [-ApplicationName \u003cString[]\u003e] [-ObjectName \u003cString[]\u003e] [-Where \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Read-DbaTransactionLog",
        "Description": "Using the fn_dblog function, the live transaction log is read and returned as a PowerShell object\n\nThis function returns the whole of the log. The information is presented in the format that the logging subsystem uses.\n\nA soft limit of 0.5GB of log as been implemented. This is based on testing. This limit can be overridden\nat the users request, but please be aware that this may have an impact on your target databases and on the\nsystem running this function",
        "Tags": [
                     "Database",
                     "Log",
                     "LogFile"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Reads the live Transaction log from specified SQL Server Database",
        "Name": "Read-DbaTransactionLog",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$Log = Read-DbaTransactionLog -SqlInstance sql2016 -Database MyDatabase\nWill read the contents of the transaction log of MyDatabase on SQL Server Instance sql2016 into the local PowerShell object $Log\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$Log = Read-DbaTransactionLog -SqlInstance sql2016 -Database MyDatabase -IgnoreLimit\nWill read the contents of the transaction log of MyDatabase on SQL Server Instance sql2016 into the local PowerShell object $Log, ignoring the recommendation of not returning more that 0.5GB of log",
        "Syntax": "Read-DbaTransactionLog [-SqlInstance] \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] -Database \u003cObject\u003e [-IgnoreLimit] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Read-DbaXEFile",
        "Description": "Read XEvents from a *.xel or *.xem file.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "Read-DbaXEventFile",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Read XEvents from a *.xel or *.xem file.",
        "Name": "Read-DbaXEFile",
        "Links": "https://dbatools.io/Read-DbaXEFile",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRead-DbaXEFile -Path C:\\temp\\deadocks.xel\nReturns events from C:\\temp\\deadocks.xel.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-ChildItem C:\\temp\\xe\\*.xel | Read-DbaXEFile\nReturns events from all .xel files in C:\\temp\\xe.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2014 -Session deadlocks | Read-DbaXEFile\nReads remote XEvents by accessing the file over the admin UNC share.",
        "Syntax": "Read-DbaXEFile [-Path] \u003cObject[]\u003e [-Exact] [-Raw] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Register-DbatoolsConfig",
        "Description": "Registers an existing configuration object in registry.\nThis allows simple persisting of settings across powershell consoles.\nIt also can be used to generate a registry template, which can then be used to create policies.",
        "Tags": [
                     "Config",
                     "Module"
                 ],
        "Alias": "Register-DbaConfig",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Registers an existing configuration object in registry.",
        "Name": "Register-DbatoolsConfig",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbatoolsConfig message.* | Register-DbatoolsConfig\nRetrieves all configuration items that that start with message. and registers them in registry for the current user.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRegister-DbatoolsConfig -FullName \"developer.mode.enable\" -Scope SystemDefault\nRetrieves the configuration item \"developer.mode.enable\" and registers it in registry as the default setting for all users on this machine.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRegister-DbatoolsConfig -Module message -Scope SystemMandatory\nRetrieves all configuration items of the module MyModule, then registers them in registry to enforce them for all users on the current system.",
        "Syntax": "Register-DbatoolsConfig [[-Config] \u003cConfig[]\u003e] [[-FullName] \u003cString[]\u003e] [-Scope {UserDefault | UserMandatory | SystemDefault | SystemMandatory}] [-EnableException] [\u003cCommonParameters\u003e]\nRegister-DbatoolsConfig [-Module] \u003cString\u003e [[-Name] \u003cString\u003e] [-Scope {UserDefault | UserMandatory | SystemDefault | SystemMandatory}] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaAgentJob",
        "Description": "Remove-DbaAgentJob removes a a job in the SQL Server Agent.",
        "Tags": [
                     "Agent",
                     "Job"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad, sqlstad.nl)",
        "Synopsis": "Remove-DbaAgentJob removes a job.",
        "Name": "Remove-DbaAgentJob",
        "Links": "https://dbatools.io/Remove-DbaAgentJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaAgentJob -SqlInstance sql1 -Job Job1\nRemoves the job from the instance with the name Job1\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGetDbaAgentJob -SqlInstance sql1 -Job Job1 | Remove-DbaAgentJob -KeepHistory\nRemoves teh job but keeps the history\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaAgentJob -SqlInstance sql1 -Job Job1 -KeepUnusedSchedule\nRemoves the job but keeps the unused schedules\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRemove-DbaAgentJob -SqlInstance sql1, sql2, sql3 -Job Job1\nRemoves the job from multiple servers",
        "Syntax": "Remove-DbaAgentJob [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Job] \u003cObject[]\u003e] [-KeepHistory] [-KeepUnusedSchedule] [[-Mode] {Strict | Lazy | Report}] [[-InputObject] \u003cJob[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaAgentJobCategory",
        "Description": "Remove-DbaAgentJobCategory makes it possible to remove a job category.\nBe assured that the category you want to remove is not used with other jobs. If another job uses this category it will be get the category [Uncategorized (Local)].",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobCategory"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad, sqlstad.nl)",
        "Synopsis": "Remove-DbaAgentJobCategory removes a job category.",
        "Name": "Remove-DbaAgentJobCategory",
        "Links": "https://dbatools.io/Remove-DbaAgentJobCategory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaAgentJobCategory -SqlInstance sql1 -Category \u0027Category 1\u0027\nRemove the job category Category 1 from the instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaAgentJobCategory -SqlInstance sql1 -Category Category1, Category2, Category3\nRemove multiple job categories from the instance.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaAgentJobCategory -SqlInstance sql1, sql2, sql3 -Category Category1, Category2, Category3\nRemove multiple job categories from the multiple instances.",
        "Syntax": "Remove-DbaAgentJobCategory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Category] \u003cString[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaAgentJobStep",
        "Description": "Removes a job step from a SQL Server Agent job.",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobStep"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Removes a step from the specified SQL Agent job.",
        "Name": "Remove-DbaAgentJobStep",
        "Links": "https://dbatools.io/Remove-DbaAgentJobStep",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1\nRemove \u0027Step1\u0027 from job \u0027Job1\u0027 on sql1.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaAgentJobStep -SqlInstance sql1 -Job Job1, Job2, Job3 -StepName Step1\nRemove the job step from multiple jobs.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1 -StepName Step1\nRemove the job step from the job on multiple servers.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003esql1, sql2, sql3 | Remove-DbaAgentJobStep -Job Job1 -StepName Step1\nRemove the job step from the job on multiple servers using pipeline.",
        "Syntax": "Remove-DbaAgentJobStep [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Job] \u003cObject[]\u003e [-StepName] \u003cString\u003e [[-Mode] {Strict | Lazy | Report}] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaAgentSchedule",
        "Description": "Remove-DbaAgentJobSchedule removes a a job in the SQL Server Agent.",
        "Tags": [
                     "Agent",
                     "Job",
                     "Schedule"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Remove-DbaAgentJobSchedule removes a job schedule.",
        "Name": "Remove-DbaAgentSchedule",
        "Links": "https://dbatools.io/Remove-DbaAgentJobSchedule",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaAgentSchedule -SqlInstance sql1 -Schedule weekly\nRemove the schedule weekly\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaAgentSchedule -SqlInstance sql1 -Schedule weekly -Force\nRemove the schedule weekly from the job even if the schedule is being used by another job.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaAgentSchedule -SqlInstance sql1 -Schedule daily, weekly\nRemove multiple schedule\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRemove-DbaAgentSchedule -SqlInstance sql1, sql2, sql3 -Schedule daily, weekly\nRemove the schedule on multiple servers for multiple schedules\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003esql1, sql2, sql3 | Remove-DbaAgentSchedule -Schedule daily, weekly\nRemove the schedule on multiple servers using pipe line\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaAgentSchedule -SqlInstance sql1 -Schedule sched1, sched2, sched3 | Remove-DbaAgentSchedule\nRemove the schedules using a pipeline",
        "Syntax": "Remove-DbaAgentSchedule -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Schedule \u003cObject[]\u003e [-EnableException] [-Force] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaAgentSchedule [-SqlCredential \u003cPSCredential\u003e] -InputObject \u003cScheduleBase[]\u003e [-EnableException] [-Force] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaBackup",
        "Description": "Removes SQL Server backups from disk.\n\nProvides all of the same functionality for removing SQL backups from disk as a standard maintenance plan would.\n\nAs an addition you have the ability to check the Archive bit on files before deletion. This will allow you to ensure backups have been archived to your archive location before removal.\n\nAlso included is the ability to remove empty folders as part of this cleanup activity.",
        "Tags": [
                     "Storage",
                     "DisasterRecovery",
                     "Backup"
                 ],
        "Alias": "",
        "Author": "Chris Sommer (@cjsommer), www.cjsommer.com",
        "Synopsis": "Removes SQL Server backups from disk.",
        "Name": "Remove-DbaBackup",
        "Links": "https://dbatools.io/Remove-DbaBackup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaBackup -Path \u0027C:\\MSSQL\\SQL Backup\\\u0027 -BackupFileExtension trn -RetentionPeriod 48h\n\u0027*.trn\u0027 files in \u0027C:\\MSSQL\\SQL Backup\\\u0027 and all subdirectories that are more than 48 hours old will be removed.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaBackup -Path \u0027C:\\MSSQL\\SQL Backup\\\u0027 -BackupFileExtension trn -RetentionPeriod 48h -WhatIf\nSame as example #1, but doesn\u0027t actually remove any files. The function will instead show you what would be done.\r\nThis is useful when first experimenting with using the function.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaBackup -Path \u0027C:\\MSSQL\\Backup\\\u0027 -BackupFileExtension bak -RetentionPeriod 7d -CheckArchiveBit\n\u0027*.bak\u0027 files in \u0027C:\\MSSQL\\Backup\\\u0027 and all subdirectories that are more than 7 days old will be removed, but only if the files have been backed up to another location as verified by checking the \r\nArchive bit.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRemove-DbaBackup -Path \u0027C:\\MSSQL\\Backup\\\u0027 -BackupFileExtension bak -RetentionPeriod 1w -RemoveEmptyBackupFolder\n\u0027*.bak\u0027 files in \u0027C:\\MSSQL\\Backup\\\u0027 and all subdirectories that are more than 1 week old will be removed. Any folders left empty will be removed as well.",
        "Syntax": "Remove-DbaBackup [-Path] \u003cString\u003e [-BackupFileExtension] \u003cString\u003e [-RetentionPeriod] \u003cString\u003e [-CheckArchiveBit] [-RemoveEmptyBackupFolder] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaClientAlias",
        "Description": "Removes a sql alias for the specified server by altering HKLM:\\SOFTWARE\\Microsoft\\MSSQLServer\\Client - mimics cliconfg.exe.",
        "Tags": "Alias",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes a sql alias for the specified server - mimics cliconfg.exe",
        "Name": "Remove-DbaClientAlias",
        "Links": "https://dbatools.io/Remove-DbaClientAlias",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaClientAlias -ComputerName workstationx -Alias sqlps\nRemoves the sqlps SQL client alias on workstationx\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaClientAlias | Remove-DbaClientAlias\nRemoves all SQL Server client aliases on the local computer",
        "Syntax": "Remove-DbaClientAlias [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-Alias] \u003cString[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaCmConnection",
        "Description": "Removes connection objects from the connection cache used for remote computer management.",
        "Tags": [
                     "ComputerManagement",
                     "CIM"
                 ],
        "Alias": "",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Removes connection objects from the connection cache used for remote computer management.",
        "Name": "Remove-DbaCmConnection",
        "Links": "https://dbatools.io/Remove-DbaCmConnection",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaCmConnection -ComputerName sql2014\nRemoves the cached connection to the server sql2014 from the cache.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmConnection | Remove-DbaCmConnection\nClears the entire connection cache.",
        "Syntax": "Remove-DbaCmConnection [-ComputerName] \u003cDbaCmConnectionParameter[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaCmsRegServer",
        "Description": "Removes registered servers found in SQL Server Central Management Server (CMS).",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Remove-DbaRegisteredServer",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes registered servers found in SQL Server Central Management Server (CMS).",
        "Name": "Remove-DbaCmsRegServer",
        "Links": "https://dbatools.io/Remove-DbaCmsRegServer",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaCmsRegServer -SqlInstance sql2012 -Group HR, Accounting\nRemoves all servers from the HR and Accounting groups on sql2012\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaCmsRegServer -SqlInstance sql2012 -Group HR\\Development\nRemoves all servers from the HR and sub-group Development from the CMS on sql2012.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaCmsRegServer -SqlInstance sql2012 -Confirm:$false\nRemoves all registered servers on sql2012 and turns off all prompting",
        "Syntax": "Remove-DbaCmsRegServer [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cString[]\u003e] [[-ServerName] \u003cString[]\u003e] [[-Group] \u003cString[]\u003e] [[-InputObject] \u003cRegisteredServer[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaCmsRegServerGroup",
        "Description": "Returns an array of Server Groups found in the CMS.",
        "Tags": [
                     "RegisteredServer",
                     "CMS"
                 ],
        "Alias": "Remove-DbaRegisteredServerGroup",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Gets list of Server Groups objects stored in SQL Server Central Management Server (CMS).",
        "Name": "Remove-DbaCmsRegServerGroup",
        "Links": "https://dbatools.io/Remove-DbaCmsRegServerGroup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaCmsRegServerGroup -SqlInstance sql2012 -Group HR, Accounting\nRemoves the HR and Accounting groups on sql2012\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaCmsRegServerGroup -SqlInstance sql2012 -Group HR\\Development -Confirm:$false\nRemoves the Development subgroup within the HR group on sql2012 and turns off all prompting",
        "Syntax": "Remove-DbaCmsRegServerGroup [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Name] \u003cString[]\u003e] [[-InputObject] \u003cServerGroup[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaComputerCertificate",
        "Description": "Removes a computer certificate from a local or remote compuer",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes a computer certificate - useful for removing easily certs from remote computers",
        "Name": "Remove-DbaComputerCertificate",
        "Links": "https://dbatools.io/Remove-DbaComputerCertificate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaComputerCertificate -ComputerName Server1 -Thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94\nRemoves certificate with thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 in the LocalMachine store on Server1\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaComputerCertificate | Where-Object Thumbprint -eq E0A071E387396723C45E92D42B2D497C6A182340 | Remove-DbaComputerCertificate\nRemoves certificate using the pipeline\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaComputerCertificate -ComputerName Server1 -Thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 -Store User -Folder My\nRemoves certificate with thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 in the User\\My (Personal) store on Server1",
        "Syntax": "Remove-DbaComputerCertificate [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-Thumbprint] \u003cString[]\u003e [[-Store] \u003cString\u003e] [[-Folder] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaDatabase",
        "Description": "Tries a bunch of different ways to remove a database or two or more.",
        "Tags": [
                     "Delete",
                     "Databases"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Drops a database, hopefully even the really stuck ones.",
        "Name": "Remove-DbaDatabase",
        "Links": "https://dbatools.io/Remove-DbaDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaDatabase -SqlInstance sql2016 -Database containeddb\nPrompts then removes the database containeddb on SQL Server sql2016\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaDatabase -SqlInstance sql2016 -Database containeddb, mydb\nPrompts then removes the databases containeddb and mydb on SQL Server sql2016\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaDatabase -SqlInstance sql2016 -Database containeddb -Confirm:$false\nDoes not prompt and swiftly removes containeddb on SQL Server sql2016\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance server\\instance -ExcludeAllSystemDb | Remove-DbaDatabase\nRemoves all the user databases from server\\instance\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance server\\instance -ExcludeAllSystemDb | Remove-DbaDatabase -Confirm:$false\nRemoves all the user databases from server\\instance without any confirmation",
        "Syntax": "Remove-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-IncludeSystemDb] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaDatabase -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Database \u003cObject[]\u003e [-IncludeSystemDb] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] -InputObject \u003cDatabase[]\u003e [-IncludeSystemDb] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaDatabaseSafely",
        "Description": "Performs a DBCC CHECKDB on the database, backs up the database with Checksum and verify only to a final (golden) backup location, creates an Agent Job to restore from that backup, drops the database, runs the agent job to restore the database, performs a DBCC CHECKDB and drops the database.\n\nWith huge thanks to Grant Fritchey and his verify your backups video. Take a look, it\u0027s only 3 minutes long. http://sqlps.io/backuprant",
        "Tags": [
                     "Database",
                     "Remove"
                 ],
        "Alias": "Remove-SqlDatabaseSafely",
        "Author": "Rob Sewell (@SQLDBAWithBeard), sqldbawithabeard.com",
        "Synopsis": "Safely removes a SQL Database and creates an Agent Job to restore it.",
        "Name": "Remove-DbaDatabaseSafely",
        "Links": "https://dbatools.io/Remove-DbaDatabaseSafely",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaDatabaseSafely -SqlInstance \u0027Fade2Black\u0027 -Database RideTheLightning -BackupFolder \u0027C:\\MSSQL\\Backup\\Rationalised - DO NOT DELETE\u0027\nPerforms a DBCC CHECKDB on database RideTheLightning on server Fade2Black. If there are no errors, the database is backup to the folder C:\\MSSQL\\Backup\\Rationalised - DO NOT DELETE. Then, an Agent \r\njob to restore the database from that backup is created. The database is then dropped, the Agent job to restore it run, a DBCC CHECKDB run against the restored database, and then it is dropped again.\nAny DBCC errors will be written to your documents folder\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$Database = \u0027DemoNCIndex\u0027,\u0027RemoveTestDatabase\u0027\nPS C:\\\u003e Remove-DbaDatabaseSafely -SqlInstance \u0027Fade2Black\u0027 -Database $Database -BackupFolder \u0027C:\\MSSQL\\Backup\\Rationalised - DO NOT DELETE\u0027\nPerforms a DBCC CHECKDB on two databases, \u0027DemoNCIndex\u0027 and \u0027RemoveTestDatabase\u0027 on server Fade2Black. Then, an Agent job to restore each database from those backups is created. The databases are \r\nthen dropped, the Agent jobs to restore them run, a DBCC CHECKDB run against the restored databases, and then they are dropped again.\nAny DBCC errors will be written to your documents folder\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaDatabaseSafely -SqlInstance \u0027Fade2Black\u0027 -DestinationServer JusticeForAll -Database RideTheLightning -BackupFolder \u0027\\\\BACKUPSERVER\\BACKUPSHARE\\MSSQL\\Rationalised - DO NOT DELETE\u0027\nPerforms a DBCC CHECKDB on database RideTheLightning on server Fade2Black. If there are no errors, the database is backup to the folder \\\\BACKUPSERVER\\BACKUPSHARE\\MSSQL\\Rationalised - DO NOT DELETE . \r\nThen, an Agent job is created on server JusticeForAll to restore the database from that backup is created. The database is then dropped on Fade2Black, the Agent job to restore it on JusticeForAll is \r\nrun, a DBCC CHECKDB run against the restored database, and then it is dropped from JusticeForAll.\nAny DBCC errors will be written to your documents folder\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRemove-DbaDatabaseSafely -SqlInstance IronMaiden -Database $Database -DestinationServer TheWildHearts -BackupFolder Z:\\Backups -NoDbccCheckDb -UseDefaultFilePaths -JobOwner \u0027THEBEARD\\Rob\u0027\nFor the databases $Database on the server IronMaiden a DBCC CHECKDB will not be performed before backing up the databases to the folder Z:\\Backups. Then, an Agent job is created on server \r\nTheWildHearts with a Job Owner of THEBEARD\\Rob to restore each database from that backup using the instance\u0027s default file paths. The database(s) is(are) then dropped on IronMaiden, the Agent job(s) \r\nrun, a DBCC CHECKDB run on the restored database(s), and then the database(s) is(are) dropped.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eRemove-DbaDatabaseSafely -SqlInstance IronMaiden -Database $Database -DestinationServer TheWildHearts -BackupFolder Z:\\Backups -UseDefaultFilePaths -ContinueAfterDbccError\nThe databases $Database on the server IronMaiden will be backed up the to the folder Z:\\Backups. Then, an Agent job is created on server TheWildHearts with a Job Owner of THEBEARD\\Rob to restore each \r\ndatabase from that backup using the instance\u0027s default file paths. The database(s) is(are) then dropped on IronMaiden, the Agent job(s) run, a DBCC CHECKDB run on the restored database(s), and then \r\nthe database(s) is(are) dropped.\nIf there is a DBCC Error, the function will continue to perform rest of the actions and will create an Agent job with \u0027DBCCERROR\u0027 in the name and a Backup file with \u0027DBCCError\u0027 in the name.",
        "Syntax": "Remove-DbaDatabaseSafely [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-Destination] \u003cDbaInstanceParameter\u003e] [[-DestinationCredential] \u003cPSCredential\u003e] [-NoDbccCheckDb] [-BackupFolder] \u003cString\u003e [[-CategoryName] \u003cString\u003e] [[-JobOwner] \u003cString\u003e] [-AllDatabases] [[-BackupCompression] \u003cString\u003e] [-ReuseSourceFolderStructure] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaDbCertificate",
        "Description": "Deletes specified database certificate",
        "Tags": "Certificate",
        "Alias": "Remove-DbaDatabaseCertificate",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Deletes specified database certificate",
        "Name": "Remove-DbaDbCertificate",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaDbCertificate -SqlInstance Server1\nThe certificate in the master database on server1 will be removed if it exists.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaDbCertificate -SqlInstance Server1 -Database db1 -Confirm:$false\nSuppresses all prompts to remove the certificate in the \u0027db1\u0027 database and drops the key.",
        "Syntax": "Remove-DbaDbCertificate [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaDbCertificate -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Database \u003cObject[]\u003e -Certificate \u003cObject[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaDbCertificate [-SqlCredential \u003cPSCredential\u003e] [-InputObject \u003cCertificate[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaDbMasterKey",
        "Description": "Deletes specified database master key.",
        "Tags": "Certificate",
        "Alias": "Remove-DbaDatabaseMasterKey",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Deletes specified database master key",
        "Name": "Remove-DbaDbMasterKey",
        "Links": "https://dbatools.io/Remove-DbaMasterKey",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaDbMasterKey -SqlInstance Server1\nThe master key in the master database on server1 will be removed if it exists.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaDbMasterKey -SqlInstance Server1 -Database db1 -Confirm:$false\nSuppresses all prompts to remove the master key in the \u0027db1\u0027 database and drops the key.",
        "Syntax": "Remove-DbaDbMasterKey [-SqlCredential \u003cPSCredential\u003e] [-Mode {Strict | Lazy | Report}] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaDbMasterKey -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-ExcludeDatabase \u003cObject[]\u003e] -All [-Mode {Strict | Lazy | Report}] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaDbMasterKey -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Database \u003cObject[]\u003e [-Mode {Strict | Lazy | Report}] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaDbMasterKey [-SqlCredential \u003cPSCredential\u003e] [-MasterKeyCollection \u003cMasterKey[]\u003e] [-Mode {Strict | Lazy | Report}] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaDbMirror",
        "Description": "Removes database mirrors. Does not set databases in recovery to recovered.",
        "Tags": [
                     "Mirror",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes database mirrors.",
        "Name": "Remove-DbaDbMirror",
        "Links": "https://dbatools.io/Set-DbaDbMirror",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaDbMirror -SqlInstance localhost\nReturns all Endpoint(s) on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaDbMirror -SqlInstance localhost, sql2016\nReturns all Endpoint(s) for the local and sql2016 SQL Server instances",
        "Syntax": "Remove-DbaDbMirror [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaDbMirrorMonitor",
        "Description": "Stops and deletes the mirroring monitor job for all the databases on the server instance.\n\nBasically executes sp_dbmmonitordropmonitoring.",
        "Tags": [
                     "Mirror",
                     "HA",
                     "Monitor"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Stops and deletes the mirroring monitor job for all the databases on the server instance.",
        "Name": "Remove-DbaDbMirrorMonitor",
        "Links": "https://dbatools.io/Remove-DbaDbMirrorMonitor",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaDbMirrorMonitor -SqlInstance sql2008, sql2012\nStops and deletes the mirroring monitor job for all the databases on sql2008 and sql2012.",
        "Syntax": "Remove-DbaDbMirrorMonitor [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaDbSnapshot",
        "Description": "Removes (drops) database snapshots from the server",
        "Tags": [
                     "Snapshot",
                     "Database"
                 ],
        "Alias": "Remove-DbaDatabaseSnapshot",
        "Author": "Simone Bizzotto (@niphold)",
        "Synopsis": "Removes database snapshots",
        "Name": "Remove-DbaDbSnapshot",
        "Links": "https://dbatools.io/Remove-DbaDbSnapshot",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaDbSnapshot -SqlInstance sql2014 -Snapshot HR_snap_20161201, HR_snap_20161101\nRemoves database snapshots named HR_snap_20161201 and HR_snap_20161101\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaDbSnapshot -SqlInstance sql2014 -Database HR, Accounting\nRemoves all database snapshots having HR and Accounting as base dbs\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbSnapshot -SqlInstance sql2014 -Database HR, Accounting | Remove-DbaDbSnapshot\nRemoves all database snapshots having HR and Accounting as base dbs\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRemove-DbaDbSnapshot -SqlInstance sql2014 -Snapshot HR_snapshot, Accounting_snapshot\nRemoves HR_snapshot and Accounting_snapshot\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaDbSnapshot -SqlInstance sql2016 | Where SnapshotOf -like \u0027*dumpsterfire*\u0027 | Remove-DbaDbSnapshot\nRemoves all snapshots associated with databases that have dumpsterfire in the name\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaDbSnapshot -SqlInstance sql2016 | Out-GridView -Passthru | Remove-DbaDbSnapshot\nAllows the selection of snapshots on sql2016 to remove\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eRemove-DbaDbSnapshot -SqlInstance sql2014 -AllSnapshots\nRemoves all database snapshots from sql2014\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eRemove-DbaDbSnapshot -SqlInstance sql2014 -AllSnapshots -Confirm\nRemoves all database snapshots from sql2014 and prompts for each database",
        "Syntax": "Remove-DbaDbSnapshot [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-ExcludeDatabase] \u003cString[]\u003e] [[-Snapshot] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-AllSnapshots] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaDbUser",
        "Description": "If user is the owner of a schema with the same name and if if the schema does not have any underlying objects the schema will be\ndropped. If user owns more than one schema, the owner of the schemas that does not have the same name as the user, will be\nchanged to \u0027dbo\u0027. If schemas have underlying objects, you must specify the -Force parameter so the user can be dropped.",
        "Tags": [
                     "Database",
                     "User",
                     "Login",
                     "Security"
                 ],
        "Alias": "",
        "Author": "Doug Meyers (@dgmyrs)",
        "Synopsis": "Drop database user",
        "Name": "Remove-DbaDbUser",
        "Links": "https://dbatools.io/Remove-DbaDbUser",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaDbUser -SqlInstance sqlserver2014 -User user1\nDrops user1 from all databases it exists in on server \u0027sqlserver2014\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaDbUser -SqlInstance sqlserver2014 -Database database1 -User user1\nDrops user1 from the database1 database on server \u0027sqlserver2014\u0027.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaDbUser -SqlInstance sqlserver2014 -ExcludeDatabase model -User user1\nDrops user1 from all databases it exists in on server \u0027sqlserver2014\u0027 except for the model database.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbUser sqlserver2014 | Where-Object Name -In \"user1\" | Remove-DbaDbUser\nDrops user1 from all databases it exists in on server \u0027sqlserver2014\u0027.",
        "Syntax": "Remove-DbaDbUser [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] -User \u003cObject[]\u003e [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaDbUser -InputObject \u003cUser[]\u003e [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaEndpoint",
        "Description": "Removes endpoints on a SQL Server instance.",
        "Tags": "Endpoint",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes endpoints on a SQL Server instance.",
        "Name": "Remove-DbaEndpoint",
        "Links": "https://dbatools.io/Remove-DbaEndpoint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaEndpoint -SqlInstance sqlserver2012 -AllEndpoints\nRemoves all endpoints on the sqlserver2014 instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaEndpoint -SqlInstance sqlserver2012 -Endpoint endpoint1,endpoint2\nRemoves the endpoint1 and endpoint2 endpoints.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-Endpoint -SqlInstance sqlserver2012 -Endpoint endpoint1 | Remove-DbaEndpoint\nRemoves the endpoints returned from the Get-Endpoint function.",
        "Syntax": "Remove-DbaEndpoint [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-EndPoint] \u003cString[]\u003e] [-AllEndpoints] [[-InputObject] \u003cEndpoint[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaLogin",
        "Description": "Tries a bunch of different ways to remove a Login or two or more.",
        "Tags": [
                     "Delete",
                     "Login"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Drops a Login",
        "Name": "Remove-DbaLogin",
        "Links": "https://dbatools.io/Remove-DbaLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaLogin -SqlInstance sql2016 -Login mylogin\nPrompts then removes the Login mylogin on SQL Server sql2016\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaLogin -SqlInstance sql2016 -Login mylogin, yourlogin\nPrompts then removes the Logins mylogin and yourlogin on SQL Server sql2016\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaLogin -SqlInstance sql2016 -Login mylogin -Confirm:$false\nDoes not prompt and swiftly removes mylogin on SQL Server sql2016\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance server\\instance -Login yourlogin | Remove-DbaLogin\nRemoves mylogin on SQL Server server\\instance",
        "Syntax": "Remove-DbaLogin [-SqlCredential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaLogin -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Login \u003cString[]\u003e [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaLogin [-SqlCredential \u003cPSCredential\u003e] -InputObject \u003cLogin[]\u003e [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaNetworkCertificate",
        "Description": "Removes the network certificate for SQL Server instance. This setting is found in Configuration Manager.",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes the network certificate for SQL Server instance",
        "Name": "Remove-DbaNetworkCertificate",
        "Links": "https://dbatools.io/Remove-DbaNetworkCertificate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaNetworkCertificate\nRemoves the Network Certificate for the default instance (MSSQLSERVER) on localhost\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaNetworkCertificate -SqlInstance sql1\\SQL2008R2SP2\nRemoves the Network Certificate for the SQL2008R2SP2 instance on sql1\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaNetworkCertificate -SqlInstance localhost\\SQL2008R2SP2 -WhatIf\nShows what would happen if the command were run",
        "Syntax": "Remove-DbaNetworkCertificate [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaOrphanUser",
        "Description": "An orphan user is defined by a user that does not have their matching login. (Login property = \"\").\n\nIf user is the owner of the schema with the same name and if if the schema does not have any underlying objects the schema will be dropped.\n\nIf user owns more than one schema, the owner of the schemas that does not have the same name as the user, will be changed to \u0027dbo\u0027. If schemas have underlying objects, you must specify the -Force parameter so the user can be dropped.\n\nIf exists a login to map the drop will not be performed unless you specify the -Force parameter (only when calling from Repair-DbaOrphanUser.",
        "Tags": [
                     "Orphan",
                     "Database",
                     "Security",
                     "Login"
                 ],
        "Alias": "Remove-SqlOrphanUser",
        "Author": "Claudio Silva (@ClaudioESSilva) | Simone Bizzotto (@niphlod)",
        "Synopsis": "Drop orphan users with no existing login to map",
        "Name": "Remove-DbaOrphanUser",
        "Links": "https://dbatools.io/Remove-DbaOrphanUser",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaOrphanUser -SqlInstance sql2005\nFinds and drops all orphan users without matching Logins in all databases present on server \u0027sql2005\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaOrphanUser -SqlInstance sqlserver2014a -SqlCredential $cred\nFinds and drops all orphan users without matching Logins in all databases present on server \u0027sqlserver2014a\u0027. SQL Server authentication will be used in connecting to the server.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaOrphanUser -SqlInstance sqlserver2014a -Database db1, db2 -Force\nFinds and drops orphan users even if they have a matching Login on both db1 and db2 databases.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRemove-DbaOrphanUser -SqlInstance sqlserver2014a -ExcludeDatabase db1, db2 -Force\nFinds and drops orphan users even if they have a matching Login from all databases except db1 and db2.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eRemove-DbaOrphanUser -SqlInstance sqlserver2014a -User OrphanUser\nRemoves user OrphanUser from all databases only if there is no matching login.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eRemove-DbaOrphanUser -SqlInstance sqlserver2014a -User OrphanUser -Force\nRemoves user OrphanUser from all databases even if they have a matching Login. Any schema that the user owns will change ownership to dbo.",
        "Syntax": "Remove-DbaOrphanUser [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-User] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaPfDataCollectorCounter",
        "Description": "Removes a Performance Data Collector Counter.",
        "Tags": "PerfMon",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes a Performance Data Collector Counter.",
        "Name": "Remove-DbaPfDataCollectorCounter",
        "Links": "https://dbatools.io/Remove-DbaPfDataCollectorCounter",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaPfDataCollectorCounter -ComputerName sql2017 -CollectorSet \u0027System Correlation\u0027 -Collector DataCollector01 -Counter \u0027\\LogicalDisk(*)\\Avg. Disk Queue Length\u0027\nPrompts for confirmation then removes the \u0027\\LogicalDisk(*)\\Avg. Disk Queue Length\u0027 counter within the DataCollector01 collector within the System Correlation collector set on sql2017.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorCounter | Out-GridView -PassThru | Remove-DbaPfDataCollectorCounter -Confirm:$false\nAllows you to select which counters you\u0027d like on localhost and does not prompt for confirmation.",
        "Syntax": "Remove-DbaPfDataCollectorCounter [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-Collector] \u003cString[]\u003e] [-Counter] \u003cObject[]\u003e [[-InputObject] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaPfDataCollectorSet",
        "Description": "Removes a Performance Monitor Data Collector Set. When removing data collector sets from the local instance, Run As Admin is required.",
        "Tags": "PerfMon",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes a Performance Monitor Data Collector Set",
        "Name": "Remove-DbaPfDataCollectorSet",
        "Links": "https://dbatools.io/Remove-DbaPfDataCollectorSet",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaPfDataCollectorSet\nPrompts for confirmation then removes all ready Collectors on localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaPfDataCollectorSet -ComputerName sql2017 -Confirm:$false\nAttempts to remove all ready Collectors on localhost and does not prompt to confirm.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaPfDataCollectorSet -ComputerName sql2017, sql2016 -Credential ad\\sqldba -CollectorSet \u0027System Correlation\u0027\nPrompts for confirmation then removes the \u0027System Correlation\u0027 Collector on sql2017 and sql2016 using alternative credentials.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -CollectorSet \u0027System Correlation\u0027 | Remove-DbaPfDataCollectorSet\nRemoves the \u0027System Correlation\u0027 Collector.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -CollectorSet \u0027System Correlation\u0027 | Stop-DbaPfDataCollectorSet | Remove-DbaPfDataCollectorSet\nStops and removes the \u0027System Correlation\u0027 Collector.",
        "Syntax": "Remove-DbaPfDataCollectorSet [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaSpn",
        "Description": "This function will connect to Active Directory and search for an account. If the account is found, it will attempt to remove the specified SPN. Once the SPN is removed, the function will also remove delegation to that service.\n\nIn order to run this function, the credential you provide must have write access to Active Directory.",
        "Tags": "SPN",
        "Alias": "",
        "Author": "Drew Furgiuele (@pittfurg), http://www.port1433.com",
        "Synopsis": "Removes an SPN for a given service account in active directory and also removes delegation to the same SPN, if found",
        "Name": "Remove-DbaSpn",
        "Links": "https://dbatools.io/Remove-DbaSpn",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaSpn -SPN MSSQLSvc\\SQLSERVERA.domain.something -ServiceAccount domain\\account\nConnects to Active Directory and removes a provided SPN from the given account (and also the relative delegation)\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaSpn -SPN MSSQLSvc\\SQLSERVERA.domain.something -ServiceAccount domain\\account -EnableException\nConnects to Active Directory and removes a provided SPN from the given account, suppressing all error messages and throw exceptions that can be caught instead\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRemove-DbaSpn -SPN MSSQLSvc\\SQLSERVERA.domain.something -ServiceAccount domain\\account -Credential ad\\sqldba\nConnects to Active Directory and removes a provided SPN to the given account. Uses alternative account to connect to AD.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaSpn -ComputerName sql2005 | Where { $_.isSet -eq $true } | Remove-DbaSpn -WhatIf\nShows what would happen trying to remove all set SPNs for sql2005 and the relative delegations\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eTest-DbaSpn -ComputerName sql2005 | Where { $_.isSet -eq $true } | Remove-DbaSpn\nRemoves all set SPNs for sql2005 and the relative delegations",
        "Syntax": "Remove-DbaSpn [-SPN] \u003cString\u003e [-ServiceAccount] \u003cString\u003e [[-Credential] \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaTrace",
        "Description": "Stops and closes the specified trace and deletes its definition from the server.",
        "Tags": [
                     "Security",
                     "Trace"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Stops and closes the specified trace and deletes its definition from the server.",
        "Name": "Remove-DbaTrace",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaTrace -SqlInstance sql2008\nStops and removes all traces on sql2008\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaTrace -SqlInstance sql2008 -Id 1\nStops and removes all trace with ID 1 on sql2008\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2008 | Out-GridView -PassThru | Remove-DbaTrace\nStops and removes selected traces on sql2008",
        "Syntax": "Remove-DbaTrace [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Id] \u003cInt32[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaXESession",
        "Description": "This script removes Extended Events sessions on a SQL Server instance.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes Extended Events sessions.",
        "Name": "Remove-DbaXESession",
        "Links": "https://dbatools.io/Remove-DbaXESession",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaXESession -SqlInstance sql2012 -AllSessions\nRemoves all Extended Event Session on the sqlserver2014 instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRemove-DbaXESession -SqlInstance sql2012 -Session xesession1,xesession2\nRemoves the xesession1 and xesession2 Extended Event sessions.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2017 | Remove-DbaXESession -Confirm:$false\nRemoves all sessions from sql2017, bypassing prompts.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2012 -Session xesession1 | Remove-DbaXESession\nRemoves the sessions returned from the Get-DbaXESession function.",
        "Syntax": "Remove-DbaXESession [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Session \u003cObject[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaXESession [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -AllSessions [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRemove-DbaXESession -InputObject \u003cSession[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Remove-DbaXESmartTarget",
        "Description": "Removes XESmartTarget PowerShell jobs.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "Removes XESmartTarget PowerShell jobs.",
        "Name": "Remove-DbaXESmartTarget",
        "Links": "https://dbatools.io/Remove-DbaXESmartTarget",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaXESmartTarget | Remove-DbaXESmartTarget\nRemoves all XESmartTarget jobs.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaXESmartTarget | Where-Object Id -eq 2 | Remove-DbaXESmartTarget\nRemoves a specific XESmartTarget job.",
        "Syntax": "Remove-DbaXESmartTarget [-InputObject] \u003cObject[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Rename-DbaDatabase",
        "Description": "Can change every database metadata that can be renamed.\nThe ultimate goal is choosing to have a default template to enforce in your environment\nso your naming convention for every bit can be put in place in no time.\nThe process is as follows (it follows the hierarchy of the entities):\n- database name is changed (optionally, forcing users out)\n- filegroup name(s) are changed accordingly\n- logical name(s) are changed accordingly\n- physical file(s) are changed accordingly\n- if Move is specified, the database will be taken offline and the move will initiate, then it will be taken online\n- if Move is not specified, the database remains online (unless SetOffline), and you are in charge of moving files\nIf any of the above fails, the process stops.\nPlease take a backup of your databases BEFORE using this, and remember to backup AFTER (also a FULL backup of master)\n\nIt returns an object for each database with all the renames done, plus hidden properties showing a \"human\" representation of them.\n\nIt\u0027s better you store the resulting object in a variable so you can inspect it in case of issues, e.g. \"$result = Rename-DbaDatabase .....\"\n\nTo get a grasp without worrying of what would happen under the hood, use \"Rename-DbaDatabase .... -Preview | Select-Object *\"",
        "Tags": [
                     "Database",
                     "Rename"
                 ],
        "Alias": "",
        "Author": "Simone Bizzotto (@niphold)",
        "Synopsis": "Changes database name, logical file names, file group names and physical file names (optionally handling the move). BETA VERSION.",
        "Name": "Rename-DbaDatabase",
        "Links": "https://dbatools.io/Rename-DbaDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName HR2 | select *\nShows the detailed result set you\u0027ll get renaming the HR database to HR2 without doing anything\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName HR2\nRenames the HR database to HR2\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sqlserver2014a -Database HR | Rename-DbaDatabase -DatabaseName HR2\nSame as before, but with a piped database (renames the HR database to HR2)\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName \"dbatools_\u003cDBN\u003e\"\nRenames the HR database to dbatools_HR\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName \"dbatools_\u003cDBN\u003e_\u003cDATE\u003e\"\nRenames the HR database to dbatools_HR_20170807 (if today is 07th Aug 2017)\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -FileGroupName \"dbatools_\u003cFGN\u003e\"\nRenames every FileGroup within HR to \"dbatools_[the original FileGroup name]\"\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName \"dbatools_\u003cDBN\u003e\" -FileGroupName \"\u003cDBN\u003e_\u003cFGN\u003e\"\nRenames the HR database to \"dbatools_HR\", then renames every FileGroup within to \"dbatools_HR_[the original FileGroup name]\"\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -FileGroupName \"dbatools_\u003cDBN\u003e_\u003cFGN\u003e\"\nPS C:\\\u003e Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName \"dbatools_\u003cDBN\u003e\"\nRenames the HR database to \"dbatools_HR\", then renames every FileGroup within to \"dbatools_HR_[the original FileGroup name]\"\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName \"dbatools_\u003cDBN\u003e\" -FileName \"\u003cDBN\u003e_\u003cFGN\u003e_\u003cFNN\u003e\"\nRenames the HR database to \"dbatools_HR\" and then all filenames as \"dbatools_HR_[Name of the FileGroup]_[original_filename]\"\r\nThe db stays online (watch out!). You can then proceed manually to move/copy files by hand, set the db offline and then online again to finish the rename process\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName \"dbatools_\u003cDBN\u003e\" -FileName \"\u003cDBN\u003e_\u003cFGN\u003e_\u003cFNN\u003e\" -SetOffline\nRenames the HR database to \"dbatools_HR\" and then all filenames as \"dbatools_HR_[Name of the FileGroup]_[original_filename]\"\r\nThe db is then set offline (watch out!). You can then proceed manually to move/copy files by hand and then set it online again to finish the rename process\n-------------------------- EXAMPLE 11 --------------------------\nPS C:\\\u003eRename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName \"dbatools_\u003cDBN\u003e\" -FileName \"\u003cDBN\u003e_\u003cFGN\u003e_\u003cFNN\u003e\" -Move\nRenames the HR database to \"dbatools_HR\" and then all filenames as \"dbatools_HR_[Name of the FileGroup]_[original_filename]\"\r\nThe db is then set offline (watch out!). The function tries to do a simple rename and then sets the db online again to finish the rename process",
        "Syntax": "Rename-DbaDatabase -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] [-DatabaseName \u003cString\u003e] [-FileGroupName \u003cString\u003e] [-LogicalName \u003cString\u003e] [-FileName \u003cString\u003e] [-ReplaceBefore] [-Force] [-Move] [-SetOffline] [-Preview] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRename-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] [-DatabaseName \u003cString\u003e] [-FileGroupName \u003cString\u003e] [-LogicalName \u003cString\u003e] [-FileName \u003cString\u003e] [-ReplaceBefore] [-Force] [-Move] [-SetOffline] [-Preview] -InputObject \u003cDatabase[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Rename-DbaLogin",
        "Description": "There are times where you might want to rename a login that was copied down, or if the name is not descriptive for what it does.\n\nIt can be a pain to update all of the mappings for a specific user, this does it for you.",
        "Tags": "Login",
        "Alias": "",
        "Author": "Mitchell Hamann (@SirCaptainMitch)",
        "Synopsis": "Rename-DbaLogin will rename login and database mapping for a specified login.",
        "Name": "Rename-DbaLogin",
        "Links": "https://dbatools.io/Rename-DbaLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRename-DbaLogin -SqlInstance localhost -Login DbaToolsUser -NewLogin captain\nSQL Login Example\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRename-DbaLogin -SqlInstance localhost -Login domain\\oldname -NewLogin domain\\newname\nChange the windowsuser login name.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRename-DbaLogin -SqlInstance localhost -Login dbatoolsuser -NewLogin captain -WhatIf\nWhatIf Example",
        "Syntax": "Rename-DbaLogin [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Login] \u003cString\u003e [-NewLogin] \u003cString\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Repair-DbaDbMirror",
        "Description": "Attempts to repair a suspended mirroring database.\n\nRestarts the endpoints then sets the partner to resume. See this article for more info:\n\nhttp://www.sqlservercentral.com/blogs/vivekssqlnotes/2016/09/03/how-to-resume-suspended-database-mirroring-in-sql-server-/",
        "Tags": [
                     "Mirror",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Attempts to repair a suspended or paused mirroring database.",
        "Name": "Repair-DbaDbMirror",
        "Links": "https://dbatools.io/Repair-DbaDbMirror",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRepair-DbaDbMirror -SqlInstance sql2017 -Database pubs\nAttempts to repair the mirrored but suspended pubs database on sql2017.\r\nRestarts the endpoints then sets the partner to resume. Prompts for confirmation.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2017 -Database pubs | Repair-DbaDbMirror -Confirm:$false\nAttempts to repair the mirrored but suspended pubs database on sql2017.\r\nRestarts the endpoints then sets the partner to resume. Does not prompt for confirmation.",
        "Syntax": "Repair-DbaDbMirror [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Repair-DbaOrphanUser",
        "Description": "An orphan user is defined by a user that does not have a matching login (Login property = \"\").\n\nIf the matching login exists it must be:\nEnabled\nNot a system object\nNot locked\nHave the same name that user\n\nYou can drop users that does not have their matching login by specifying the parameter -RemoveNotExisting.",
        "Tags": "Orphan",
        "Alias": "Repair-SqlOrphanUser",
        "Author": "Claudio Silva (@ClaudioESSilva) | Simone Bizzotto (@niphlod)",
        "Synopsis": "Finds orphan users with existing login and remaps them.",
        "Name": "Repair-DbaOrphanUser",
        "Links": "https://dbatools.io/Repair-DbaOrphanUser",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRepair-DbaOrphanUser -SqlInstance sql2005\nFinds and repairs all orphan users of all databases present on server \u0027sql2005\u0027\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRepair-DbaOrphanUser -SqlInstance sqlserver2014a -SqlCredential $cred\nFinds and repair all orphan users in all databases present on server \u0027sqlserver2014a\u0027. SQL credentials are used to authenticate to the server.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRepair-DbaOrphanUser -SqlInstance sqlserver2014a -Database db1, db2\nFinds and repairs all orphan users in both db1 and db2 databases.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRepair-DbaOrphanUser -SqlInstance sqlserver2014a -Database db1 -Users OrphanUser\nFinds and repairs user \u0027OrphanUser\u0027 in \u0027db1\u0027 database.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eRepair-DbaOrphanUser -SqlInstance sqlserver2014a -Users OrphanUser\nFinds and repairs user \u0027OrphanUser\u0027 on all databases\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eRepair-DbaOrphanUser -SqlInstance sqlserver2014a -RemoveNotExisting\nFinds all orphan users of all databases present on server \u0027sqlserver2014a\u0027. Removes all users that do not have matching Logins.",
        "Syntax": "Repair-DbaOrphanUser [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-Users] \u003cObject[]\u003e] [-RemoveNotExisting] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Repair-DbaServerName",
        "Description": "When a SQL Server\u0027s host OS is renamed, the SQL Server should be as well. This helps with Availability Groups and Kerberos.\n\nThis command renames @@SERVERNAME to match with the Windows name. The new name is automatically determined. It does not matter if you use an alias to connect to the SQL instance.\n\nIf the automatically determined new name matches the old name, the command will not run.\n\nhttps://www.mssqltips.com/sqlservertip/2525/steps-to-change-the-server-name-for-a-sql-server-machine/",
        "Tags": "SPN",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Renames @@SERVERNAME to match with the Windows name.",
        "Name": "Repair-DbaServerName",
        "Links": "https://dbatools.io/Repair-DbaServerName",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRepair-DbaServerName -SqlInstance sql2014\nChecks to see if the server name is updatable and changes the name with a number of prompts.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRepair-DbaServerName -SqlInstance sql2014 -AutoFix\nChecks to see if the server name is updatable and automatically performs the change. Replication or mirroring will be broken if necessary.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRepair-DbaServerName -SqlInstance sql2014 -AutoFix -Force\nChecks to see if the server name is updatable and automatically performs the change, bypassing most prompts and confirmations. Replication or mirroring will be broken if necessary.",
        "Syntax": "Repair-DbaServerName [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-AutoFix] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Reset-DbaAdmin",
        "Description": "This function allows administrators to regain access to local or remote SQL Servers by either resetting the sa password, adding the sysadmin role to existing login, or adding a new login (SQL or Windows) and granting it sysadmin privileges.\n\nThis is accomplished by stopping the SQL services or SQL Clustered Resource Group, then restarting SQL via the command-line using the /mReset-DbaAdmin parameter which starts the server in Single-User mode and only allows this script to connect.\n\nOnce the service is restarted, the following tasks are performed:\n- Login is added if it doesn\u0027t exist\n- If login is a Windows User, an attempt is made to ensure it exists\n- If login is a SQL Login, password policy will be set to OFF when creating the login, and SQL Server authentication will be set to Mixed Mode.\n- Login will be enabled and unlocked\n- Login will be added to sysadmin role\n\nIf failures occur at any point, a best attempt is made to restart the SQL Server.\n\nIn order to make this script as portable as possible, System.Data.SqlClient and Get-WmiObject are used (as opposed to requiring the Failover Cluster Admin tools or SMO).\n\nIf using this function against a remote SQL Server, ensure WinRM is configured and accessible. If this is not possible, run the script locally.\n\nTested on Windows XP, 7, 8.1, Server 2012 and Windows Server Technical Preview 2.\nTested on SQL Server 2005 SP4 through 2016 CTP2.",
        "Tags": "WSMan",
        "Alias": "Reset-SqlAdmin",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "This function allows administrators to regain access to SQL Servers in the event that passwords or access was lost.\n\nSupports SQL Server 2005 and above. Windows administrator access is required.",
        "Name": "Reset-DbaAdmin",
        "Links": "https://dbatools.io/Reset-DbaAdmin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eReset-DbaAdmin -SqlInstance sqlcluster\nPrompts for password, then resets the \"sa\" account password on sqlcluster.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eReset-DbaAdmin -SqlInstance sqlserver\\sqlexpress -Login ad\\administrator\nPrompts user to confirm that they understand the SQL Service will be restarted.\nAdds the domain account \"ad\\administrator\" as a sysadmin to the SQL instance.\r\nIf the account already exists, it will be added to the sysadmin role.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eReset-DbaAdmin -SqlInstance sqlserver\\sqlexpress -Login sqladmin -Force\nSkips restart confirmation, prompts for password, then adds a SQL Login \"sqladmin\" with sysadmin privileges.\r\nIf the account already exists, it will be added to the sysadmin role and the password will be reset.",
        "Syntax": "Reset-DbaAdmin [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-Login] \u003cString\u003e] [[-SecurePassword] \u003cSecureString\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Resolve-DbaNetworkName",
        "Description": "Retrieves the IPAddress, ComputerName from one computer.\nThe object can be used to take action against its name or IPAddress.\n\nFirst ICMP is used to test the connection, and get the connected IPAddress.\n\nMultiple protocols (e.g. WMI, CIM, etc) are attempted before giving up.\n\nImportant: Remember that FQDN doesn\u0027t always match \"ComputerName dot Domain\" as AD intends.\nThere are network setup (google \"disjoint domain\") where AD and DNS do not match.\n\"Full computer name\" (as reported by sysdm.cpl) is the only match between the two,\nand it matches the \"DNSHostName\" property of the computer object stored in AD.\nThis means that the notation of FQDN that matches \"ComputerName dot Domain\" is incorrect\nin those scenarios.\nIn other words, the \"suffix\" of the FQDN CAN be different from the AD Domain.\n\nThis cmdlet has been providing good results since its inception but for lack of useful\nnames some doubts may arise.\nLet this clear the doubts:\n- InputName: whatever has been passed in\n- ComputerName: hostname only\n- IPAddress: IP Address\n- DNSHostName: hostname only, coming strictly from DNS (as reported from the calling computer)\n- DNSDomain: domain only, coming strictly from DNS (as reported from the calling computer)\n- Domain: domain only, coming strictly from AD (i.e. the domain the ComputerName is joined to)\n- DNSHostEntry: Fully name as returned by DNS [System.Net.Dns]::GetHostEntry\n- FQDN: \"legacy\" notation of ComputerName \"dot\" Domain (coming from AD)\n- FullComputerName: Full name as configured from within the Computer (i.e. the only secure match between AD and DNS)\n\nSo, if you need to use something, go with FullComputerName, always, as it is the most correct in every scenario.",
        "Tags": [
                     "Network",
                     "Resolve"
                 ],
        "Alias": "",
        "Author": "Klaas Vandenberghe (@PowerDBAKlaas) | Simone Bizzotto (@niphold)",
        "Synopsis": "Returns information about the network connection of the target computer including NetBIOS name, IP Address, domain name and fully qualified domain name (FQDN).",
        "Name": "Resolve-DbaNetworkName",
        "Links": "https://dbatools.io/Resolve-DbaNetworkName",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eResolve-DbaNetworkName -ComputerName ServerA\nReturns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for ServerA\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eResolve-DbaNetworkName -SqlInstance sql2016\\sqlexpress\nReturns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for the SQL instance sql2016\\sqlexpress\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eResolve-DbaNetworkName -SqlInstance sql2016\\sqlexpress, sql2014\nReturns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for the SQL instance sql2016\\sqlexpress and sql2014\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2014 | Resolve-DbaNetworkName\nReturns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, Domain, FQDN for all SQL Servers returned by Get-DbaCmsRegServer",
        "Syntax": "Resolve-DbaNetworkName [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-Turbo] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Restart-DbaService",
        "Description": "Restarts the SQL Server related services on one or more computers. Will follow SQL Server service dependencies.\n\nRequires Local Admin rights on destination computer(s).",
        "Tags": [
                     "Service",
                     "Instance",
                     "Restart"
                 ],
        "Alias": "Restart-DbaSqlService",
        "Author": "Kirill Kravtsov (@nvarscar)",
        "Synopsis": "Restarts SQL Server services on a computer.",
        "Name": "Restart-DbaService",
        "Links": "https://dbatools.io/Restart-DbaService",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRestart-DbaService -ComputerName sqlserver2014a\nRestarts the SQL Server related services on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027| Get-DbaService | Restart-DbaService\nGets the SQL Server related services on computers sql1, sql2 and sql3 and restarts them.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eRestart-DbaService -ComputerName sql1,sql2 -Instance MSSQLSERVER\nRestarts the SQL Server services related to the default instance MSSQLSERVER on computers sql1 and sql2.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eRestart-DbaService -ComputerName $MyServers -Type SSRS\nRestarts the SQL Server related services of type \"SSRS\" (Reporting Services) on computers in the variable MyServers.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eRestart-DbaService -ComputerName sql1 -Type Engine -Force\nRestarts SQL Server database engine services on sql1 forcing dependent SQL Server Agent services to restart as well.",
        "Syntax": "Restart-DbaService [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [-InstanceName \u003cString[]\u003e] [-Type \u003cString[]\u003e] [-Timeout \u003cInt32\u003e] [-Credential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRestart-DbaService [-InstanceName \u003cString[]\u003e] [-Type \u003cString[]\u003e] -InputObject \u003cObject[]\u003e [-Timeout \u003cInt32\u003e] [-Credential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Restore-DbaBackupFromDirectory",
        "Description": "Please use `Get-ChildItem | Restore-DbaDatabase` instead. This command is no longer supported.",
        "Tags": [
                     "DisasterRecovery",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "Restore-SqlBackupFromDirectory",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Please use `Get-ChildItem | Restore-DbaDatabase` instead. This command is no longer supported.",
        "Name": "Restore-DbaBackupFromDirectory",
        "Links": "https://dbatools.io/Restore-SqlBackupFromDirectory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRestore-SqlBackupFromDirectory -SqlInstance sqlcluster -Path \\\\fileserver\\share\\sqlbackups\\SQLSERVER2014A\nAll user databases contained within \\\\fileserver\\share\\sqlbackups\\SQLSERVERA will be restored to sqlcluster, down the most recent full/differential/logs.\nRequires -Version 3.0",
        "Syntax": "Restore-DbaBackupFromDirectory [-SqlInstance] \u003cDbaInstanceParameter\u003e [-Path] \u003cString\u003e [-NoRecovery] [-ReuseSourceFolderStructure] [[-SqlCredential] \u003cPSCredential\u003e] [-Force] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Restore-DbaDatabase",
        "Description": "Upon being passed a list of potential backups files this command will scan the files, select those that contain SQL Server\nbackup sets. It will then filter those files down to a set that can perform the requested restore, checking that we have a\nfull restore chain to the point in time requested by the caller.\n\nThe function defaults to working on a remote instance. This means that all paths passed in must be relative to the remote instance.\nXpDirTree will be used to perform the file scans\n\nVarious means can be used to pass in a list of files to be considered. The default is to non recursively scan the folder\npassed in.",
        "Tags": [
                     "DisasterRecovery",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Restores a SQL Server Database from a set of backup files",
        "Name": "Restore-DbaDatabase",
        "Links": "https://dbatools.io/Restore-DbaDatabase",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRestore-DbaDatabase -SqlInstance server1\\instance1 -Path \\\\server2\\backups\nScans all the backup files in \\\\server2\\backups, filters them and restores the database to server1\\instance1\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRestore-DbaDatabase -SqlInstance server1\\instance1 -Path \\\\server2\\backups -MaintenanceSolutionBackup -DestinationDataDirectory c:\\restores\nScans all the backup files in \\\\server2\\backups$ stored in an Ola Hallengren style folder structure,\r\nfilters them and restores the database to the c:\\restores folder on server1\\instance1\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-ChildItem c:\\SQLbackups1\\, \\\\server\\sqlbackups2 | Restore-DbaDatabase -SqlInstance server1\\instance1\nTakes the provided files from multiple directories and restores them on server1\\instance1\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$RestoreTime = Get-Date(\u002711:19 23/12/2016\u0027)\nPS C:\\\u003e Restore-DbaDatabase -SqlInstance server1\\instance1 -Path \\\\server2\\backups -MaintenanceSolutionBackup -DestinationDataDirectory c:\\restores -RestoreTime $RestoreTime\nScans all the backup files in \\\\server2\\backups stored in an Ola Hallengren style folder structure,\r\nfilters them and restores the database to the c:\\restores folder on server1\\instance1 up to 11:19 23/12/2016\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eRestore-DbaDatabase -SqlInstance server1\\instance1 -Path \\\\server2\\backups -DestinationDataDirectory c:\\restores -OutputScriptOnly | Select-Object -ExpandProperty Tsql | Out-File -Filepath \r\nc:\\scripts\\restore.sql\nScans all the backup files in \\\\server2\\backups stored in an Ola Hallengren style folder structure,\r\nfilters them and generate the T-SQL Scripts to restore the database to the latest point in time,\r\nand then stores the output in a file for later retrieval\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eRestore-DbaDatabase -SqlInstance server1\\instance1 -Path c:\\backups -DestinationDataDirectory c:\\DataFiles -DestinationLogDirectory c:\\LogFile\nScans all the files in c:\\backups and then restores them onto the SQL Server Instance server1\\instance1, placing data files\r\nc:\\DataFiles and all the log files into c:\\LogFiles\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eRestore-DbaDatabase -SqlInstance server1\\instance1 -Path http://demo.blob.core.windows.net/backups/dbbackup.bak -AzureCredential MyAzureCredential\nWill restore the backup held at http://demo.blob.core.windows.net/backups/dbbackup.bak to server1\\instance1. The connection to Azure will be made using the\r\ncredential MyAzureCredential held on instance Server1\\instance1\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e$File = Get-ChildItem c:\\backups, \\\\server1\\backups -recurse\nPS C:\\\u003e $File | Restore-DbaDatabase -SqlInstance Server1\\Instance -useDestinationDefaultDirectories\nThis will take all of the files found under the folders c:\\backups and \\\\server1\\backups, and pipeline them into\r\nRestore-DbaDatabase. Restore-DbaDatabase will then scan all of the files, and restore all of the databases included\r\nto the latest point in time covered by their backups. All data and log files will be moved to the default SQL Server\r\nfolder for those file types as defined on the target instance.\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e$files = Get-ChildItem C:\\dbatools\\db1\nPS C:\\\u003e $files | Restore-DbaDatabase -SqlInstance server\\instance1 `\r\n\u003e\u003e -DestinationFilePrefix prefix -DatabaseName Restored `\r\n\u003e\u003e -RestoreTime (get-date \"14:58:30 22/05/2017\") `\r\n\u003e\u003e -NoRecovery -WithReplace -StandbyDirectory C:\\dbatools\\standby\r\n\u003e\u003e\r\nPS C:\\\u003e #It\u0027s in standby so we can peek at it\r\nPS C:\\\u003e Invoke-Sqlcmd2 -ServerInstance server\\instance1 -Query \"select top 1 * from Restored.dbo.steps order by dt desc\"\r\nPS C:\\\u003e #Not quite there so let\u0027s roll on a bit:\r\nPS C:\\\u003e $files | Restore-DbaDatabase -SqlInstance server\\instance1 `\r\n\u003e\u003e -DestinationFilePrefix prefix -DatabaseName Restored `\r\n\u003e\u003e -continue -WithReplace -RestoreTime (get-date \"15:09:30 22/05/2017\") `\r\n\u003e\u003e -StandbyDirectory C:\\dbatools\\standby\r\n\u003e\u003e\r\nPS C:\\\u003e Invoke-Sqlcmd2 -ServerInstance server\\instance1 -Query \"select top 1 * from restored.dbo.steps order by dt desc\"\r\nPS C:\\\u003e Restore-DbaDatabase -SqlInstance server\\instance1 -DestinationFilePrefix prefix -DatabaseName Restored -Continue -WithReplace\nIn this example we step through the backup files held in c:\\dbatools\\db1 folder.\r\nFirst we restore the database to a point in time in standby mode. This means we can check some details in the databases\r\nWe then roll it on a further 9 minutes to perform some more checks\r\nAnd finally we continue by rolling it all the way forward to the latest point in the backup.\r\nAt each step, only the log files needed to roll the database forward are restored.\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003eRestore-DbaDatabase -SqlInstance server\\instance1 -Path c:\\backups -DatabaseName example1 -WithNoRecovery\nPS C:\\\u003e Restore-DbaDatabase -SqlInstance server\\instance1 -Recover -DatabaseName example1\nIn this example we restore example1 database with no recovery, and then the second call is to set the database to recovery.\n-------------------------- EXAMPLE 11 --------------------------\nPS C:\\\u003e$SuspectPage = Get-DbaSuspectPage -SqlInstance server\\instance1 -Database ProdFinance\nPS C:\\\u003e Get-DbaBackupHistory - SqlInstance server\\instance1 -Database -ProdFinance -Last | Restore-DbaDatabase -PageRestore PS C:\\\u003e $SuspectPage -PageRestoreTailFolder c:\\temp -TrustDbBackupHistory \r\n-AllowContinues\nGets a list of Suspect Pages using Get-DbaSuspectPage. The uses Get-DbaBackupHistory and Restore-DbaDatabase to perform a restore of the suspect pages and bring them up to date\r\nIf server\\instance1 is Enterprise edition this will be done online, if not it will be performed offline\r\nAllowContinue is required to make sure we cope with existing files\n-------------------------- EXAMPLE 12 --------------------------\nPS C:\\\u003e$BackupHistory = Get-DbaBackupInformation -SqlInstance sql2005 -Path \\\\backups\\sql2000\\ProdDb\nPS C:\\\u003e $BackupHistory | Restore-DbaDatabse -SqlInstance sql2000 -TrustDbBackupHistory\nDue to SQL Server 2000 not returning all the backup headers we cannot restore directly. As this is an issues with the SQL engine all we can offer is the following workaround\r\nThis will use a SQL Server instance \u003e 2000 to read the headers, and then pass them in to Restore-DbaDatabase as a BackupHistory object.\n-------------------------- EXAMPLE 13 --------------------------\nPS C:\\\u003eRestore-DbaDatabase -SqlInstance server1\\instance1 -Path \"C:\\Temp\\devops_prod_full.bak\" -DatabaseName \"DevOps_DEV\" -ReplaceDbNameInFile\nPS C:\\\u003e Rename-DbaDatabase -SqlInstance server1\\instance1 -Database \"DevOps_DEV\" -LogicalName \"\u003cDBN\u003e_\u003cFT\u003e\"\nThis will restore the database from the \"C:\\Temp\\devops_prod_full.bak\" file, with the new name \"DevOps_DEV\" and store the different physical files with the new name. It will use the system default \r\nconfigured data and log locations.\r\nAfter the restore the logical names of the database files will be renamed with the \"DevOps_DEV_ROWS\" for MDF/NDF and \"DevOps_DEV_LOG\" for LDF\n-------------------------- EXAMPLE 14 --------------------------\nPS C:\\\u003e$FileStructure = @{\n\u003e\u003e \u0027database_data\u0027 = \u0027C:\\Data\\database_data.mdf\u0027\r\n\u003e\u003e \u0027database_log\u0027 = \u0027C:\\Log\\database_log.ldf\u0027\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e Restore-DbaDatabase -SqlInstance server1 -Path \\\\ServerName\\ShareName\\File -DatabaseName database -FileMapping $FileStructure\nRestores \u0027database\u0027 to \u0027server1\u0027 and moves the files to new locations. The format for the $FileStructure HashTable is the file logical name as the Key, and the new location as the Value.",
        "Syntax": "Restore-DbaDatabase -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] -Path \u003cObject[]\u003e [-DatabaseName \u003cObject[]\u003e] [-DestinationDataDirectory \u003cString\u003e] [-DestinationLogDirectory \u003cString\u003e] [-DestinationFileStreamDirectory \u003cString\u003e] [-RestoreTime \u003cDateTime\u003e] [-NoRecovery] [-WithReplace] [-XpDirTree] [-OutputScriptOnly] [-VerifyOnly] [-MaintenanceSolutionBackup] [-FileMapping \u003cHashtable\u003e] [-IgnoreLogBackup] [-useDestinationDefaultDirectories] [-ReuseSourceFolderStructure] [-DestinationFilePrefix \u003cString\u003e] [-RestoredDatabaseNamePrefix \u003cString\u003e] [-TrustDbBackupHistory] \r\n[-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-DirectoryRecurse] [-EnableException] [-StandbyDirectory \u003cString\u003e] [-Continue] [-AzureCredential \u003cString\u003e] [-ReplaceDbNameInFile] [-DestinationFileSuffix \u003cString\u003e] [-KeepCDC] [-AllowContinue] [-GetBackupInformation \u003cString\u003e] [-StopAfterGetBackupInformation] [-SelectBackupInformation \u003cString\u003e] [-StopAfterSelectBackupInformation] [-FormatBackupInformation \u003cString\u003e] [-StopAfterFormatBackupInformation] [-TestBackupInformation \u003cString\u003e] [-StopAfterTestBackupInformation] [-StatementTimeout \u003cInt32\u003e] [-WhatIf] [-Confirm] \r\n[\u003cCommonParameters\u003e]\nRestore-DbaDatabase -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] -Path \u003cObject[]\u003e [-DatabaseName \u003cObject[]\u003e] [-OutputScriptOnly] [-TrustDbBackupHistory] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-EnableException] [-AzureCredential \u003cString\u003e] [-AllowContinue] [-GetBackupInformation \u003cString\u003e] [-StopAfterGetBackupInformation] [-SelectBackupInformation \u003cString\u003e] [-StopAfterSelectBackupInformation] [-FormatBackupInformation \u003cString\u003e] [-StopAfterFormatBackupInformation] [-TestBackupInformation \u003cString\u003e] [-StopAfterTestBackupInformation] \r\n-PageRestore \u003cObject\u003e -PageRestoreTailFolder \u003cString\u003e [-StatementTimeout \u003cInt32\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nRestore-DbaDatabase -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-DatabaseName \u003cObject[]\u003e] [-OutputScriptOnly] [-EnableException] [-AzureCredential \u003cString\u003e] [-Recover] [-AllowContinue] [-GetBackupInformation \u003cString\u003e] [-StopAfterGetBackupInformation] [-SelectBackupInformation \u003cString\u003e] [-StopAfterSelectBackupInformation] [-FormatBackupInformation \u003cString\u003e] [-StopAfterFormatBackupInformation] [-TestBackupInformation \u003cString\u003e] [-StopAfterTestBackupInformation] [-StatementTimeout \u003cInt32\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Restore-DbaDbCertificate",
        "Description": "Imports certificates from.cer files using SMO.",
        "Tags": [
                     "Migration",
                     "Certificate"
                 ],
        "Alias": "Restore-DbaDatabaseCertificate",
        "Author": "Jess Pomfret (@jpomfret), jesspomfret.com",
        "Synopsis": "Imports certificates from .cer files using SMO.",
        "Name": "Restore-DbaDbCertificate",
        "Links": "https://dbatools.io/Restore-DbaDbCertificate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRestore-DbaDbCertificate -SqlInstance Server1 -Path \\\\Server1\\Certificates -Password (ConvertTo-SecureString -Force -AsPlainText GoodPass1234!!)\nRestores all the certificates in the specified path, password is used to both decrypt and encrypt the private key.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRestore-DbaDbCertificate -SqlInstance Server1 -Path \\\\Server1\\Certificates\\DatabaseTDE.cer -EncryptionType MasterKey -Password (ConvertTo-SecureString -force -AsPlainText GoodPass1234!!)\nRestores the DatabaseTDE certificate to Server1 and uses the MasterKey to encrypt the private key.",
        "Syntax": "Restore-DbaDbCertificate [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Path] \u003cObject[]\u003e [[-EncryptionPassword] \u003cSecureString\u003e] [[-Database] \u003cObject\u003e] [[-Password] \u003cSecureString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Restore-DbaDbSnapshot",
        "Description": "Restores the database from the snapshot, discarding every modification made to the database\nNB: Restoring to a snapshot will result in every other snapshot of the same database to be dropped\nIt also fixes some long-standing bugs in SQL Server when restoring from snapshots",
        "Tags": [
                     "Snapshot",
                     "Backup",
                     "Restore",
                     "Database"
                 ],
        "Alias": "Restore-DbaDatabaseSnapshot",
        "Author": "Simone Bizzotto (@niphold)",
        "Synopsis": "Restores databases from snapshots",
        "Name": "Restore-DbaDbSnapshot",
        "Links": "https://dbatools.io/Restore-DbaDbSnapshot",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRestore-DbaDbSnapshot -SqlInstance sql2014 -Database HR, Accounting\nRestores HR and Accounting databases using the latest snapshot available\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eRestore-DbaDbSnapshot -SqlInstance sql2014 -Database HR -Force\nRestores HR database from latest snapshot and kills any active connections in the database on sql2014.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbSnapshot -SqlInstance sql2016 -Database HR | Restore-DbaDbSnapshot -Force\nRestores HR database from latest snapshot and kills any active connections in the database on sql2016.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDbSnapshot -SqlInstance sql2016 | Out-GridView -PassThru | Restore-DbaDbSnapshot\nAllows the selection of snapshots on sql2016 to restore\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eRestore-DbaDbSnapshot -SqlInstance sql2014 -Snapshot HR_snap_20161201, Accounting_snap_20161101\nRestores databases from snapshots named HR_snap_20161201 and Accounting_snap_20161101",
        "Syntax": "Restore-DbaDbSnapshot [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-Snapshot] \u003cObject[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Save-DbaDiagnosticQueryScript",
        "Description": "The dbatools module will have the diagnostic queries pre-installed. Use this only to update to a more recent version or specific versions.\n\nThis function is mainly used by Invoke-DbaDiagnosticQuery, but can also be used independently to download the Glenn Berry DMV scripts.\n\nUse this function to pre-download the scripts from a device with an Internet connection.\n\nThe function Invoke-DbaDiagnosticQuery will try to download these scripts automatically, but it obviously needs an internet connection to do that.",
        "Tags": [
                     "Diagnostic",
                     "DMV",
                     "Troubleshooting"
                 ],
        "Alias": "",
        "Author": "Andre Kamman (@AndreKamman), http://clouddba.io",
        "Synopsis": "Save-DbaDiagnosticQueryScript downloads the most recent version of all Glenn Berry DMV scripts",
        "Name": "Save-DbaDiagnosticQueryScript",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSave-DbaDiagnosticQueryScript -Path c:\\temp\nDownloads the most recent version of all Glenn Berry DMV scripts to the specified location.\r\nIf Path is not specified, the \"My Documents\" location will be used.",
        "Syntax": "Save-DbaDiagnosticQueryScript [[-Path] \u003cFileInfo\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Select-DbaBackupInformation",
        "Description": "Select-DbaBackupInformation filters out a subset of backups from the dbatools backup history object with parameters supplied.",
        "Tags": [
                     "Backup",
                     "Restore"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Select a subset of backups from a dbatools backup history object",
        "Name": "Select-DbaBackupInformation",
        "Links": "https://dbatools.io/Select-DbaBackupInformation",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\\\server1\\backups$\nPS C:\\\u003e $FilteredBackups = $Backups | Select-DbaBackupInformation -RestoreTime (Get-Date).AddHours(-1)\nReturns all backups needed to restore all the backups in \\\\server1\\backups$ to 1 hour ago\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\\\server1\\backups$\nPS C:\\\u003e $FilteredBackups = $Backups | Select-DbaBackupInformation -RestoreTime (Get-Date).AddHours(-1) -DatabaseName ProdFinance\nReturns all the backups needed to restore Database ProdFinance to an hour ago\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\\\server1\\backups$\nPS C:\\\u003e $FilteredBackups = $Backups | Select-DbaBackupInformation -RestoreTime (Get-Date).AddHours(-1) -IgnoreLogs\nReturns all the backups in \\\\server1\\backups$ to restore to as close prior to 1 hour ago as can be managed with only full and differential backups\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\\\server1\\backups$\nPS C:\\\u003e $FilteredBackups = $Backups | Select-DbaBackupInformation -RestoreTime (Get-Date).AddHours(-1) -IgnoreDiffs\nReturns all the backups in \\\\server1\\backups$ to restore to 1 hour ago using only Full and Diff backups.",
        "Syntax": "Select-DbaBackupInformation [-BackupHistory] \u003cObject\u003e [[-RestoreTime] \u003cDateTime\u003e] [-IgnoreLogs] [-IgnoreDiffs] [[-DatabaseName] \u003cString[]\u003e] [[-ServerName] \u003cString[]\u003e] [[-ContinuePoints] \u003cObject\u003e] [[-LastRestoreType] \u003cObject\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaAgentAlert",
        "Description": "Set-DbaAgentAlert updates an alert in the SQL Server Agent with parameters supplied.",
        "Tags": [
                     "Agent",
                     "Alert"
                 ],
        "Alias": "",
        "Author": "Garry Bargsley (@gbargsley), garrybargsley.com",
        "Synopsis": "Set-DbaAgentAlert updates a the status of a SQL Agent Alert.",
        "Name": "Set-DbaAgentAlert",
        "Links": "https://dbatools.io/Set-DbaAgentAlert",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaAgentAlert -SqlInstance sql1 -Alert \u0027Severity 025: Fatal Error\u0027 -Disabled\nChanges the alert to disabled.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaAgentAlert -SqlInstance sql1 -Alert \u0027Severity 025: Fatal Error\u0027, \u0027Error Number 825\u0027, \u0027Error Number 824\u0027 -Enabled\nChanges multiple alerts to enabled.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaAgentAlert -SqlInstance sql1, sql2, sql3 -Alert \u0027Severity 025: Fatal Error\u0027, \u0027Error Number 825\u0027, \u0027Error Number 824\u0027 -Enabled\nChanges multiple alerts to enabled on multiple servers.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaAgentAlert -SqlInstance sql1 -Alert \u0027Severity 025: Fatal Error\u0027 -Disabled -WhatIf\nDoesn\u0027t Change the alert but shows what would happen.",
        "Syntax": "Set-DbaAgentAlert [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Alert] \u003cObject[]\u003e] [[-NewName] \u003cString\u003e] [-Enabled] [-Disabled] [-Force] [[-InputObject] \u003cAlert[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaAgentJob",
        "Description": "Set-DbaAgentJob updates a job in the SQL Server Agent with parameters supplied.",
        "Tags": [
                     "Agent",
                     "Job"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Set-DbaAgentJob updates a job.",
        "Name": "Set-DbaAgentJob",
        "Links": "https://dbatools.io/Set-DbaAgentJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaAgentJob sql1 -Job Job1 -Disabled\nChanges the job to disabled\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaAgentJob sql1 -Job Job1 -OwnerLogin user1\nChanges the owner of the job\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaAgentJob -SqlInstance sql1 -Job Job1 -EventLogLevel OnSuccess\nChanges the job and sets the notification to write to the Windows Application event log on success\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaAgentJob -SqlInstance sql1 -Job Job1 -EmailLevel OnFailure -EmailOperator dba\nChanges the job and sets the notification to send an e-mail to the e-mail operator\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaAgentJob -SqlInstance sql1 -Job Job1, Job2, Job3 -Enabled\nChanges multiple jobs to enabled\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eSet-DbaAgentJob -SqlInstance sql1, sql2, sql3 -Job Job1, Job2, Job3 -Enabled\nChanges multiple jobs to enabled on multiple servers\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eSet-DbaAgentJob -SqlInstance sql1 -Job Job1 -Description \u0027Just another job\u0027 -Whatif\nDoesn\u0027t Change the job but shows what would happen.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eSet-DbaAgentJob -SqlInstance sql1, sql2, sql3 -Job \u0027Job One\u0027 -Description \u0027Job One\u0027\nChanges a job with the name \"Job1\" on multiple servers to have another description\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003esql1, sql2, sql3 | Set-DbaAgentJob -Job Job1 -Description \u0027Job One\u0027\nChanges a job with the name \"Job1\" on multiple servers to have another description using pipe line",
        "Syntax": "Set-DbaAgentJob [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Job] \u003cObject[]\u003e] [[-Schedule] \u003cObject[]\u003e] [[-ScheduleId] \u003cInt32[]\u003e] [[-NewName] \u003cString\u003e] [-Enabled] [-Disabled] [[-Description] \u003cString\u003e] [[-StartStepId] \u003cInt32\u003e] [[-Category] \u003cString\u003e] [[-OwnerLogin] \u003cString\u003e] [[-EventLogLevel] \u003cObject\u003e] [[-EmailLevel] \u003cObject\u003e] [[-NetsendLevel] \u003cObject\u003e] [[-PageLevel] \u003cObject\u003e] [[-EmailOperator] \u003cString\u003e] [[-NetsendOperator] \u003cString\u003e] [[-PageOperator] \u003cString\u003e] [[-DeleteLevel] \u003cObject\u003e] [-Force] [[-InputObject] \u003cJob[]\u003e] [-EnableException] [-WhatIf] [-Confirm] \r\n[\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaAgentJobCategory",
        "Description": "Set-DbaAgentJobCategory makes it possible to change a job category.",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobCategory"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Set-DbaAgentJobCategory changes a job category.",
        "Name": "Set-DbaAgentJobCategory",
        "Links": "https://dbatools.io/Set-DbaAgentJobCategory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaAgentJobCategory -SqlInstance sql1 -Category \u0027Category 1\u0027 -NewName \u0027Category 2\u0027\nChange the name of the category from \u0027Category 1\u0027 to \u0027Category 2\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaAgentJobCategory -SqlInstance sql1, sql2 -Category Category1, Category2 -NewName cat1, cat2\nRename multiple jobs in one go on multiple servers.",
        "Syntax": "Set-DbaAgentJobCategory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Category] \u003cString[]\u003e] [[-NewName] \u003cString[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaAgentJobOutputFile",
        "Description": "Sets the Output File for a step of an agent job with the Job Names and steps provided dynamically if required",
        "Tags": [
                     "Agent",
                     "Job",
                     "SqlAgent"
                 ],
        "Alias": "",
        "Author": "Rob Sewell, https://sqldbawithabeard.com",
        "Synopsis": "Set the output file for a step within an Agent job.",
        "Name": "Set-DbaAgentJobOutputFile",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaAgentJobOutputFile -SqlInstance SERVERNAME -JobName \u0027The Agent Job\u0027 -OutPutFile E:\\Logs\\AgentJobStepOutput.txt\nSets the Job step for The Agent job on SERVERNAME to E:\\Logs\\AgentJobStepOutput.txt",
        "Syntax": "Set-DbaAgentJobOutputFile [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cObject[]\u003e] [-Step \u003cObject[]\u003e] -OutputFile \u003cString\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaAgentJobStep",
        "Description": "Set-DbaAgentJobStep updates a job step in the SQL Server Agent with parameters supplied.",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobStep"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Set-DbaAgentJobStep updates a job step.",
        "Name": "Set-DbaAgentJobStep",
        "Links": "https://dbatools.io/Set-DbaAgentJobStep",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1 -NewName Step2\nChanges the name of the step in \"Job1\" with the name Step1 to Step2\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1 -Database msdb\nChanges the database of the step in \"Job1\" with the name Step1 to msdb\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaAgentJobStep -SqlInstance sql1 -Job Job1, Job2 -StepName Step1 -Database msdb\nChanges job steps in multiple jobs with the name Step1 to msdb\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1, Job2 -StepName Step1 -Database msdb\nChanges job steps in multiple jobs on multiple servers with the name Step1 to msdb\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1 -StepName Step1 -Database msdb\nChanges the database of the step in \"Job1\" with the name Step1 to msdb for multiple servers\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003esql1, sql2, sql3 | Set-DbaAgentJobStep -Job Job1 -StepName Step1 -Database msdb\nChanges the database of the step in \"Job1\" with the name Step1 to msdb for multiple servers using pipeline",
        "Syntax": "Set-DbaAgentJobStep [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Job] \u003cObject[]\u003e [-StepName] \u003cString\u003e [[-NewName] \u003cString\u003e] [[-Subsystem] \u003cString\u003e] [[-Command] \u003cString\u003e] [[-CmdExecSuccessCode] \u003cInt32\u003e] [[-OnSuccessAction] \u003cString\u003e] [[-OnSuccessStepId] \u003cInt32\u003e] [[-OnFailAction] \u003cString\u003e] [[-OnFailStepId] \u003cInt32\u003e] [[-Database] \u003cString\u003e] [[-DatabaseUser] \u003cString\u003e] [[-RetryAttempts] \u003cInt32\u003e] [[-RetryInterval] \u003cInt32\u003e] [[-OutputFileName] \u003cString\u003e] [[-Flag] \u003cString[]\u003e] [[-ProxyName] \u003cString\u003e] [-EnableException] [-Force] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaAgentSchedule",
        "Description": "Set-DbaAgentSchedule will help update a schedule for a job. It does not attach the schedule to a job.",
        "Tags": [
                     "Agent",
                     "Job",
                     "JobStep"
                 ],
        "Alias": "",
        "Author": "Sander Stad (@sqlstad, sqlstad.nl)",
        "Synopsis": "Set-DbaAgentSchedule updates a schedule in the msdb database.",
        "Name": "Set-DbaAgentSchedule",
        "Links": "https://dbatools.io/Set-DbaAgentSchedule",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaAgentSchedule -SqlInstance sql1 -Job Job1 -ScheduleName daily -Enabled\nChanges the schedule for Job1 with the name \u0027daily\u0027 to enabled\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaAgentSchedule -SqlInstance sql1 -Job Job1 -ScheduleName daily -NewName weekly -FrequencyType Weekly -FrequencyInterval Monday, Wednesday, Friday\nChanges the schedule for Job1 with the name daily to have a new name weekly\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaAgentSchedule -SqlInstance sql1 -Job Job1, Job2, Job3 -ScheduleName daily -StartTime \u0027230000\u0027\nChanges the start time of the schedule for Job1 to 11 PM for multiple jobs\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaAgentSchedule -SqlInstance sql1, sql2, sql3 -Job Job1 -ScheduleName daily -Enabled\nChanges the schedule for Job1 with the name daily to enabled on multiple servers\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003esql1, sql2, sql3 | Set-DbaAgentSchedule -Job Job1 -ScheduleName \u0027daily\u0027 -Enabled\nChanges the schedule for Job1 with the name \u0027daily\u0027 to enabled on multiple servers using pipe line",
        "Syntax": "Set-DbaAgentSchedule [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Job] \u003cObject[]\u003e [-ScheduleName] \u003cString\u003e [[-NewName] \u003cString\u003e] [-Enabled] [-Disabled] [[-FrequencyType] \u003cObject\u003e] [[-FrequencyInterval] \u003cObject[]\u003e] [[-FrequencySubdayType] \u003cObject\u003e] [[-FrequencySubdayInterval] \u003cInt32\u003e] [[-FrequencyRelativeInterval] \u003cObject\u003e] [[-FrequencyRecurrenceFactor] \u003cInt32\u003e] [[-StartDate] \u003cString\u003e] [[-EndDate] \u003cString\u003e] [[-StartTime] \u003cString\u003e] [[-EndTime] \u003cString\u003e] [-EnableException] [-Force] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaCmConnection",
        "Description": "Configures a connection object for use in remote computer management.\nThis function will either create new records for computers that have no connection registered so far, or it will configure existing connections if already present.\n\nAs such it can be handy in making bulk-edits on connections or manually adjusting some settings.",
        "Tags": [
                     "ComputerManagement",
                     "CIM"
                 ],
        "Alias": "",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Configures a connection object for use in remote computer management.",
        "Name": "Set-DbaCmConnection",
        "Links": "https://dbatools.io/set-DbaCmConnection",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaCmConnection sql2014 | Set-DbaCmConnection -ClearBadCredential -UseWindowsCredentials\nRetrieves the already existing connection to sql2014, removes the list of not working credentials and configures it to default to the credentials of the logged on user.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaCmConnection | Set-DbaCmConnection -RemoveBadCredential $cred\nRemoves the credentials stored in $cred from all connections\u0027 list of \"known to not work\" credentials.\r\nHandy to update changes in privilege.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmConnection | Export-Clixml .\\connections.xml\nPS C:\\\u003e Import-Clixml .\\connections.xml | Set-DbaCmConnection -ResetConfiguration\nAt first, the current cached connections are stored in an xml file. At a later time - possibly in the profile when starting the console again - those connections are imported again and applied again \r\nto the connection cache.\nIn this example, the configuration settings will also be reset, since after re-import those will be set to explicit, rather than deriving them from the global settings.\r\nIn many cases, using the default settings is desirable. For specific settings, use New-DbaCmConnection as part of the profile in order to explicitly configure a connection.",
        "Syntax": "Set-DbaCmConnection [-ComputerName \u003cDbaCmConnectionParameter[]\u003e] [-Credential \u003cPSCredential\u003e] [-OverrideExplicitCredential] [-OverrideConnectionPolicy] [-DisabledConnectionTypes {None | CimRM | CimDCOM | Wmi | PowerShellRemoting}] [-DisableBadCredentialCache] [-DisableCimPersistence] [-DisableCredentialAutoRegister] [-EnableCredentialFailover] [-WindowsCredentialsAreBad] [-CimWinRMOptions \u003cWSManSessionOptions\u003e] [-CimDCOMOptions \u003cDComSessionOptions\u003e] [-AddBadCredential \u003cPSCredential[]\u003e] [-RemoveBadCredential \u003cPSCredential[]\u003e] [-ClearBadCredential] [-ClearCredential] [-ResetCredential] \r\n[-ResetConnectionStatus] [-ResetConfiguration] [-EnableException] [\u003cCommonParameters\u003e]\nSet-DbaCmConnection [-ComputerName \u003cDbaCmConnectionParameter[]\u003e] [-UseWindowsCredentials] [-OverrideExplicitCredential] [-OverrideConnectionPolicy] [-DisabledConnectionTypes {None | CimRM | CimDCOM | Wmi | PowerShellRemoting}] [-DisableBadCredentialCache] [-DisableCimPersistence] [-DisableCredentialAutoRegister] [-EnableCredentialFailover] [-CimWinRMOptions \u003cWSManSessionOptions\u003e] [-CimDCOMOptions \u003cDComSessionOptions\u003e] [-AddBadCredential \u003cPSCredential[]\u003e] [-RemoveBadCredential \u003cPSCredential[]\u003e] [-ClearBadCredential] [-ClearCredential] [-ResetCredential] [-ResetConnectionStatus] \r\n[-ResetConfiguration] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaDbCompression",
        "Description": "This function sets the appropriate compression recommendation, determined either by using the Tiger Team\u0027s query or set to the CompressionType parameter.\n\nRemember Uptime is critical for the Tiger Team query, the longer uptime, the more accurate the analysis is.\nYou would probably be best if you utilized Get-DbaUptime first, before running this command.\n\nSet-DbaDbCompression script derived from GitHub and the tigertoolbox\n(https://github.com/Microsoft/tigertoolbox/tree/master/Evaluate-Compression-Gains)",
        "Tags": [
                     "Compression",
                     "Table",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Jason Squires (@js_0505), jstexasdba@gmail.com",
        "Synopsis": "Sets tables and indexes with preferred compression setting.",
        "Name": "Set-DbaDbCompression",
        "Links": "https://dbatools.io/Set-DbaDbCompression",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaDbCompression -SqlInstance localhost -MaxRunTime 60 -PercentCompression 25\nSet the compression run time to 60 minutes and will start the compression of tables/indexes that have a difference of 25% or higher between current and recommended.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaDbCompression -SqlInstance ServerA -Database DBName -CompressionType Page\nUtilizes Page compression for all objects in DBName on ServerA with no time limit.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaDbCompression -SqlInstance ServerA -Database DBName -PercentCompression 25 | Out-GridView\nWill compress tables/indexes within the specified database that would show any % improvement with compression and with no time limit. The results will be piped into a nicely formatted GridView.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$testCompression = Test-DbaDbCompression -SqlInstance ServerA -Database DBName\nPS C:\\\u003e Set-DbaDbCompression -SqlInstance ServerA -Database DBName -InputObject $testCompression\nGets the compression suggestions from Test-DbaDbCompression into a variable, this can then be reviewed and passed into Set-DbaDbCompression.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$cred = Get-Credential sqladmin\nPS C:\\\u003e Set-DbaDbCompression -SqlInstance ServerA -ExcludeDatabase Database -SqlCredential $cred -MaxRunTime 60 -PercentCompression 25\nSet the compression run time to 60 minutes and will start the compression of tables/indexes for all databases except the specified excluded database. Only objects that have a difference of 25% or \r\nhigher between current and recommended will be compressed.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$servers = \u0027Server1\u0027,\u0027Server2\u0027\nPS C:\\\u003e foreach ($svr in $servers) {\r\n\u003e\u003e Set-DbaDbCompression -SqlInstance $svr -MaxRunTime 60 -PercentCompression 25 | Export-Csv -Path C:\\temp\\CompressionAnalysisPAC.csv -Append\r\n\u003e\u003e }\nSet the compression run time to 60 minutes and will start the compression of tables/indexes across all listed servers that have a difference of 25% or higher between current and recommended. Output \r\nof command is exported to a csv.",
        "Syntax": "Set-DbaDbCompression [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-CompressionType] \u003cObject\u003e] [[-MaxRunTime] \u003cInt32\u003e] [[-PercentCompression] \u003cInt32\u003e] [[-InputObject] \u003cObject\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaDbMirror",
        "Description": "Sets properties of database mirrors.",
        "Tags": [
                     "Mirror",
                     "HA"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Sets properties of database mirrors.",
        "Name": "Set-DbaDbMirror",
        "Links": "https://dbatools.io/Set-DbaDbMirror",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaDbMirror -SqlInstance sql2005 -Database dbatools -Partner TCP://SQL2008.ad.local:5374\nPrompts for confirmation then sets the partner to TCP://SQL2008.ad.local:5374 for the database \"dbtools\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaDbMirror -SqlInstance sql2005 -Database dbatools -Witness TCP://SQL2012.ad.local:5502 -Confirm:$false\nDoes not prompt for confirmation and sets the witness to TCP://SQL2012.ad.local:5502 for the database \"dbtools\"\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2005 | Out-GridView -PassThru | Set-DbaDbMirror -SafetyLevel Full -Confirm:$false\nSets the safety level to Full for databases selected from a grid view. Does not prompt for confirmation.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaDbMirror -SqlInstance sql2005 -Database dbatools -State Suspend -Confirm:$false\nDoes not prompt for confirmation and sets the state to suspend for the database \"dbtools\"",
        "Syntax": "Set-DbaDbMirror [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-Partner] \u003cString\u003e] [[-Witness] \u003cString\u003e] [[-SafetyLevel] \u003cString\u003e] [[-State] \u003cString\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaDbOwner",
        "Description": "This function will alter database ownership to match a specified login if their current owner does not match the target login. By default, the target login will be \u0027sa\u0027, but the function will allow the user to specify a different login for ownership. The user can also apply this to all databases or only to a select list of databases (passed as either a comma separated list or a string array).\n\nBest Practice reference: http://weblogs.sqlteam.com/dang/archive/2008/01/13/Database-Owner-Troubles.aspx",
        "Tags": [
                     "Database",
                     "Owner",
                     "DbOwner"
                 ],
        "Alias": "Set-DbaDatabaseOwner",
        "Author": "Michael Fal (@Mike_Fal), http://mikefal.net",
        "Synopsis": "Sets database owners with a desired login if databases do not match that owner.",
        "Name": "Set-DbaDbOwner",
        "Links": "https://dbatools.io/Set-DbaDbOwner",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaDbOwner -SqlInstance localhost\nSets database owner to \u0027sa\u0027 on all databases where the owner does not match \u0027sa\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaDbOwner -SqlInstance localhost -TargetLogin DOMAIN\\account\nSets the database owner to DOMAIN\\account on all databases where the owner does not match DOMAIN\\account.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaDbOwner -SqlInstance sqlserver -Database db1, db2\nSets database owner to \u0027sa\u0027 on the db1 and db2 databases if their current owner does not match \u0027sa\u0027.",
        "Syntax": "Set-DbaDbOwner [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-TargetLogin] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaDbQueryStoreOption",
        "Description": "Configure Query Store settings for a specific or multiple databases.",
        "Tags": "QueryStore",
        "Alias": "Set-DbaDbQueryStoreOptions,Set-DbaQueryStoreConfig",
        "Author": "Enrico van de Laar (@evdlaar)",
        "Synopsis": "Configure Query Store settings for a specific or multiple databases.",
        "Name": "Set-DbaDbQueryStoreOption",
        "Links": "https://dbatools.io/Set-DbaQueryStoreOptions",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaDbQueryStoreOption -SqlInstance ServerA\\SQL -State ReadWrite -FlushInterval 600 -CollectionInterval 10 -MaxSize 100 -CaptureMode All -CleanupMode Auto -StaleQueryThreshold 100 \r\n-AllDatabases\nConfigure the Query Store settings for all user databases in the ServerA\\SQL Instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaDbQueryStoreOption -SqlInstance ServerA\\SQL -FlushInterval 600\nOnly configure the FlushInterval setting for all Query Store databases in the ServerA\\SQL Instance.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaDbQueryStoreOption -SqlInstance ServerA\\SQL -Database AdventureWorks -State ReadWrite -FlushInterval 600 -CollectionInterval 10 -MaxSize 100 -CaptureMode all -CleanupMode Auto \r\n-StaleQueryThreshold 100\nConfigure the Query Store settings for the AdventureWorks database in the ServerA\\SQL Instance.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaDbQueryStoreOption -SqlInstance ServerA\\SQL -Exclude AdventureWorks -State ReadWrite -FlushInterval 600 -CollectionInterval 10 -MaxSize 100 -CaptureMode all -CleanupMode Auto \r\n-StaleQueryThreshold 100\nConfigure the Query Store settings for all user databases except the AdventureWorks database in the ServerA\\SQL Instance.",
        "Syntax": "Set-DbaDbQueryStoreOption [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-AllDatabases] [[-State] \u003cString[]\u003e] [[-FlushInterval] \u003cInt64\u003e] [[-CollectionInterval] \u003cInt64\u003e] [[-MaxSize] \u003cInt64\u003e] [[-CaptureMode] \u003cString[]\u003e] [[-CleanupMode] \u003cString[]\u003e] [[-StaleQueryThreshold] \u003cInt64\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaDbRecoveryModel",
        "Description": "Set-DbaDbRecoveryModel sets the Recovery Model for user databases.",
        "Tags": [
                     "RecoveryModel",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Viorel Ciucu (@viorelciucu), https://www.cviorel.com",
        "Synopsis": "Set-DbaDbRecoveryModel sets the Recovery Model.",
        "Name": "Set-DbaDbRecoveryModel",
        "Links": "https://dbatools.io/Set-DbaDbRecoveryModel",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel BulkLogged -Database model -Confirm:$true -Verbose\nSets the Recovery Model to BulkLogged for database [model] on SQL Server instance sql2014. User is requested to confirm the action.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2014 -Database TestDB | Set-DbaDbRecoveryModel -RecoveryModel Simple -Confirm:$false\nSets the Recovery Model to Simple for database [TestDB] on SQL Server instance sql2014. Confirmation is not required.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel Simple -Database TestDB -Confirm:$false\nSets the Recovery Model to Simple for database [TestDB] on SQL Server instance sql2014. Confirmation is not required.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel Simple -AllDatabases -Confirm:$false\nSets the Recovery Model to Simple for ALL uses databases MODEL database on SQL Server instance sql2014. Runs without asking for confirmation.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel BulkLogged -Database TestDB1, TestDB2 -Confirm:$false -Verbose\nSets the Recovery Model to BulkLogged for [TestDB1] and [TestDB2] databases on SQL Server instance sql2014. Runs without asking for confirmation.",
        "Syntax": "Set-DbaDbRecoveryModel [-SqlCredential \u003cPSCredential\u003e] -RecoveryModel \u003cString\u003e [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nSet-DbaDbRecoveryModel -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -RecoveryModel \u003cString\u003e [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nSet-DbaDbRecoveryModel [-SqlCredential \u003cPSCredential\u003e] -RecoveryModel \u003cString\u003e [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] [-EnableException] -InputObject \u003cDatabase[]\u003e [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaDbState",
        "Description": "Sets some common \"states\" on databases:\n- \"RW\" options (ReadOnly, ReadWrite)\n- \"Status\" options (Online, Offline, Emergency, plus a special \"Detached\")\n- \"Access\" options (SingleUser, RestrictedUser, MultiUser)\n\nReturns an object with SqlInstance, Database, RW, Status, Access, Notes\n\nNotes gets filled when something went wrong setting the state",
        "Tags": [
                     "Database",
                     "State"
                 ],
        "Alias": "Set-DbaDatabaseState",
        "Author": "Simone Bizzotto (@niphold)",
        "Synopsis": "Sets various options for databases, hereby called \"states\"",
        "Name": "Set-DbaDbState",
        "Links": "https://dbatools.io/Set-DbaDbState",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaDbState -SqlInstance sqlserver2014a -Database HR -Offline\nSets the HR database as OFFLINE\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaDbState -SqlInstance sqlserver2014a -AllDatabases -Exclude HR -ReadOnly -Force\nSets all databases of the sqlserver2014a instance, except for HR, as READ_ONLY\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaDbState -SqlInstance sql2016 | Where-Object Status -eq \u0027Offline\u0027 | Set-DbaDbState -Online\nFinds all offline databases and sets them to online\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaDbState -SqlInstance sqlserver2014a -Database HR -SingleUser\nSets the HR database as SINGLE_USER\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaDbState -SqlInstance sqlserver2014a -Database HR -SingleUser -Force\nSets the HR database as SINGLE_USER, dropping all other connections (and rolling back open transactions)\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sqlserver2014a -Database HR | Set-DbaDbState -SingleUser -Force\nGets the databases from Get-DbaDatabase, and sets them as SINGLE_USER, dropping all other connections (and rolling back open transactions)",
        "Syntax": "Set-DbaDbState [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] [-ReadOnly] [-ReadWrite] [-Online] [-Offline] [-Emergency] [-Detached] [-SingleUser] [-RestrictedUser] [-MultiUser] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nSet-DbaDbState -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] [-ReadOnly] [-ReadWrite] [-Online] [-Offline] [-Emergency] [-Detached] [-SingleUser] [-RestrictedUser] [-MultiUser] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nSet-DbaDbState [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-AllDatabases] [-ReadOnly] [-ReadWrite] [-Online] [-Offline] [-Emergency] [-Detached] [-SingleUser] [-RestrictedUser] [-MultiUser] [-Force] [-EnableException] -InputObject \u003cPSObject[]\u003e [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaErrorLogConfig",
        "Description": "Sets the number of log files configured on all versions, and size in KB in SQL Server 2012+ and above.\n\nTo set the Path to the ErrorLog, use Set-DbaStartupParameter -ErrorLog. Note that this command requires\nremote, administrative access to the Windows/WMI server, similar to SQL Configuration Manager.",
        "Tags": [
                     "Instance",
                     "ErrorLog"
                 ],
        "Alias": "",
        "Author": "Shawn Melton (@wsmelton), https://wsmelton.github.com",
        "Synopsis": "Set the configuration for the ErrorLog on a given SQL Server instance",
        "Name": "Set-DbaErrorLogConfig",
        "Links": "https://dbatools.io/Set-DbaErrorLogConfig",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaErrorLogConfig -SqlInstance sql2017,sql2014 -LogCount 25\nSets the number of error log files to 25 on sql2017 and sql2014\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaErrorLogConfig -SqlInstance sql2014 -LogSize 102400\nSets the size of the error log file, before it rolls over, to 102400 KB (100 MB) on sql2014\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaErrorLogConfig -SqlInstance sql2012 -LogCount 25 -LogSize 500\nSets the number of error log files to 25 and size before it will roll over to 500 KB on sql2012",
        "Syntax": "Set-DbaErrorLogConfig [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-LogCount] \u003cInt32\u003e] [[-LogSize] \u003cInt32\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaJobOwner",
        "Description": "This function alters SQL Agent Job ownership to match a specified login if their current owner does not match the target login. By default, the target login will be \u0027sa\u0027, but the the user may specify a different login for ownership. This be applied to all jobs or only to a select collection of jobs.\n\nBest practice reference: http://sqlmag.com/blog/sql-server-tip-assign-ownership-jobs-sysadmin-account",
        "Tags": [
                     "Agent",
                     "Job"
                 ],
        "Alias": "",
        "Author": "Michael Fal (@Mike_Fal), http://mikefal.net",
        "Synopsis": "Sets SQL Agent job owners with a desired login if jobs do not match that owner.",
        "Name": "Set-DbaJobOwner",
        "Links": "https://dbatools.io/Set-DbaJobOwner",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaJobOwner -SqlInstance localhost\nSets SQL Agent Job owner to sa on all jobs where the owner does not match sa.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaJobOwner -SqlInstance localhost -Login DOMAIN\\account\nSets SQL Agent Job owner to sa on all jobs where the owner does not match \u0027DOMAIN\\account\u0027. Note\r\nthat Login must be a valid security principal that exists on the target server.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaJobOwner -SqlInstance localhost -Job job1, job2\nSets SQL Agent Job owner to \u0027sa\u0027 on the job1 and job2 jobs if their current owner does not match \u0027sa\u0027.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e\u0027sqlserver\u0027,\u0027sql2016\u0027 | Set-DbaJobOwner\nSets SQL Agent Job owner to sa on all jobs where the owner does not match sa on both sqlserver and sql2016.",
        "Syntax": "Set-DbaJobOwner [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Job] \u003cObject[]\u003e] [[-ExcludeJob] \u003cObject[]\u003e] [[-Login] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaLogin",
        "Description": "Set-DbaLogin will enable you to change the password, unlock, rename, disable or enable, deny or grant login privileges to the login. It\u0027s also possible to add or remove server roles from the login.",
        "Tags": "Login",
        "Alias": "",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Set-DbaLogin makes it possible to make changes to one or more logins.",
        "Name": "Set-DbaLogin",
        "Links": "https://dbatools.io/Set-DbaLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$password = ConvertTo-SecureString \"PlainTextPassword\" -AsPlainText -Force\nPS C:\\\u003e $cred = New-Object System.Management.Automation.PSCredential (\"username\", $password)\r\nPS C:\\\u003e Set-DbaLogin -SqlInstance sql1 -Login login1 -Password $cred -Unlock -MustChange\nSet the new password for login1 using a credential, unlock the account and set the option\r\nthat the user must change password at next logon.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login login1 -Enable\nEnable the login\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login login1, login2, login3, login4 -Enable\nEnable multiple logins\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1, sql2, sql3 -Login login1, login2, login3, login4 -Enable\nEnable multiple logins on multiple instances\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login login1 -Disable\nDisable the login\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login login1 -DenyLogin\nDeny the login to connect to the instance\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login login1 -GrantLogin\nGrant the login to connect to the instance\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login login1 -PasswordPolicyEnforced\nEnforces the password policy on a login\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login login1 -PasswordPolicyEnforced:$false\nDisables enforcement of the password policy on a login\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login test -AddRole serveradmin\nAdd the server role \"serveradmin\" to the login\n-------------------------- EXAMPLE 11 --------------------------\nPS C:\\\u003eSet-DbaLogin -SqlInstance sql1 -Login test -RemoveRole bulkadmin\nRemove the server role \"bulkadmin\" to the login\n-------------------------- EXAMPLE 12 --------------------------\nPS C:\\\u003e$login = Get-DbaLogin -SqlInstance sql1 -Login test\nPS C:\\\u003e $login | Set-DbaLogin -Disable\nDisable the login from the pipeline",
        "Syntax": "Set-DbaLogin [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Login] \u003cString[]\u003e] [[-Password] \u003cObject\u003e] [-Unlock] [-MustChange] [[-NewName] \u003cString\u003e] [-Disable] [-Enable] [-DenyLogin] [-GrantLogin] [-PasswordPolicyEnforced] [[-AddRole] \u003cString[]\u003e] [[-RemoveRole] \u003cString[]\u003e] [[-InputObject] \u003cLogin[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaMaxDop",
        "Description": "Uses the Test-DbaMaxDop command to get the recommended value if -MaxDop parameter is not specified.\n\nThese are just general recommendations for SQL Server and are a good starting point for setting the \"max degree of parallelism\" option.\n\nYou can set MaxDop database scoped configurations if the server is version 2016 or higher",
        "Tags": [
                     "MaxDop",
                     "SpConfigure"
                 ],
        "Alias": "",
        "Author": "Claudio Silva (@claudioessilva)",
        "Synopsis": "Sets SQL Server maximum degree of parallelism (Max DOP), then displays information relating to SQL Server Max DOP configuration settings. Works on SQL Server 2005 and higher.",
        "Name": "Set-DbaMaxDop",
        "Links": "https://dbatools.io/Set-DbaMaxDop",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaMaxDop -SqlInstance sql2008, sql2012\nSets Max DOP to the recommended value for servers sql2008 and sql2012.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaMaxDop -SqlInstance sql2014 -MaxDop 4\nSets Max DOP to 4 for server sql2014.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaMaxDop -SqlInstance sql2008 | Set-DbaMaxDop\nGets the recommended Max DOP from Test-DbaMaxDop and applies it to to sql2008.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaMaxDop -SqlInstance sql2016 -Database db1\nSet recommended Max DOP for database db1 on server sql2016.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaMaxDop -SqlInstance sql2016 -AllDatabases\nSet recommended Max DOP for all databases on server sql2016.",
        "Syntax": "Set-DbaMaxDop [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-MaxDop \u003cInt32\u003e] [-Collection \u003cObject\u003e] [-AllDatabases] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaMaxMemory",
        "Description": "Sets SQL Server max memory then displays information relating to SQL Server Max Memory configuration settings.\n\nInspired by Jonathan Kehayias\u0027s post about SQL Server Max memory (http://bit.ly/sqlmemcalc), this uses a formula to\ndetermine the default optimum RAM to use, then sets the SQL max value to that number.\n\nJonathan notes that the formula used provides a *general recommendation* that doesn\u0027t account for everything that may\nbe going on in your specific environment.",
        "Tags": [
                     "MaxMemory",
                     "Memory"
                 ],
        "Alias": "Set-SqlMaxMemory",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Sets SQL Server \u0027Max Server Memory\u0027 configuration setting to a new value then displays information this setting.",
        "Name": "Set-DbaMaxMemory",
        "Links": "https://dbatools.io/Set-DbaMaxMemory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaMaxMemory sqlserver1\nSet max memory to the recommended MB on just one server named \"sqlserver1\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaMaxMemory -SqlInstance sqlserver1 -MaxMB 2048\nExplicitly max memory to 2048 MB on just one server, \"sqlserver1\"\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlserver | Test-DbaMaxMemory | Where-Object { $_.SqlMaxMB -gt $_.TotalMB } | Set-DbaMaxMemory\nFind all servers in SQL Server Central Management server that have Max SQL memory set to higher than the total memory\r\nof the server (think 2147483647), then pipe those to Set-DbaMaxMemory and use the default recommendation.",
        "Syntax": "Set-DbaMaxMemory [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [-SqlCredential \u003cPSCredential\u003e] [[-MaxMB] \u003cInt32\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaNetworkCertificate",
        "Description": "Sets the network certificate for SQL Server instance. This setting is found in Configuration Manager.\n\nThis command also grants read permissions for the service account on the certificate\u0027s private key.\n\nReferences:\nhttp://sqlmag.com/sql-server/7-steps-ssl-encryption\nhttps://azurebi.jppp.org/2016/01/23/using-lets-encrypt-certificates-for-secure-sql-server-connections/\nhttps://blogs.msdn.microsoft.com/sqlserverfaq/2016/09/26/creating-and-registering-ssl-certificates/",
        "Tags": "Certificate",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Sets the network certificate for SQL Server instance",
        "Name": "Set-DbaNetworkCertificate",
        "Links": "https://dbatools.io/Set-DbaNetworkCertificate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaComputerCertificate | Set-DbaNetworkCertificate -SqlInstance localhost\\SQL2008R2SP2\nCreates and imports a new certificate signed by an Active Directory CA on localhost then sets the network certificate for the SQL2008R2SP2 to that newly created certificate.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaNetworkCertificate -SqlInstance sql1\\SQL2008R2SP2 -Thumbprint 1223FB1ACBCA44D3EE9640F81B6BA14A92F3D6E2\nSets the network certificate for the SQL2008R2SP2 instance to the certificate with the thumbprint of 1223FB1ACBCA44D3EE9640F81B6BA14A92F3D6E2 in LocalMachine\\My on sql1",
        "Syntax": "Set-DbaNetworkCertificate [-SqlInstance \u003cDbaInstanceParameter[]\u003e] [-Credential \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nSet-DbaNetworkCertificate [-SqlInstance \u003cDbaInstanceParameter[]\u003e] [-Credential \u003cPSCredential\u003e] -Certificate \u003cX509Certificate2\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nSet-DbaNetworkCertificate [-SqlInstance \u003cDbaInstanceParameter[]\u003e] [-Credential \u003cPSCredential\u003e] -Thumbprint \u003cString\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaPowerPlan",
        "Description": "Sets the SQL Server OS\u0027s Power Plan. Defaults to High Performance which is best practice.\n\nIf your organization uses a custom power plan that is considered best practice, specify -CustomPowerPlan.\n\nReferences:\nhttps://support.microsoft.com/en-us/kb/2207548\nhttp://www.sqlskills.com/blogs/glenn/windows-power-plan-effects-on-newer-intel-processors/",
        "Tags": [
                     "PowerPlan",
                     "OS",
                     "Configure"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Sets the SQL Server OS\u0027s Power Plan.",
        "Name": "Set-DbaPowerPlan",
        "Links": "https://dbatools.io/Set-DbaPowerPlan",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaPowerPlan -ComputerName sqlserver2014a\nSets the Power Plan to High Performance. Skips it if its already set.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaPowerPlan -ComputerName sqlcluster -CustomPowerPlan \u0027Maximum Performance\u0027\nSets the Power Plan to the custom power plan called \"Maximum Performance\". Skips it if its already set.",
        "Syntax": "Set-DbaPowerPlan [-ComputerName] \u003cObject[]\u003e [[-PowerPlan] \u003cString\u003e] [[-CustomPowerPlan] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaPrivilege",
        "Description": "Adds the SQL Service account to local privileges \u0027Lock Pages in Memory\u0027, \u0027Instant File Initialization\u0027, \u0027Logon as Batch\u0027 on one or more computers.\n\nRequires Local Admin rights on destination computer(s).",
        "Tags": "Privilege",
        "Alias": "",
        "Author": "Klaas Vandenberghe ( @PowerDBAKlaas )",
        "Synopsis": "Adds the SQL Service account to local privileges on one or more computers.",
        "Name": "Set-DbaPrivilege",
        "Links": "https://dbatools.io/Set-DbaPrivilege",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaPrivilege -ComputerName sqlserver2014a -Type LPIM,IFI\nAdds the SQL Service account(s) on computer sqlserver2014a to the local privileges \u0027SeManageVolumePrivilege\u0027 and \u0027SeLockMemoryPrivilege\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Set-DbaPrivilege -Type IFI\nAdds the SQL Service account(s) on computers sql1, sql2 and sql3 to the local privilege \u0027SeManageVolumePrivilege\u0027.",
        "Syntax": "Set-DbaPrivilege [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-Type] \u003cString[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaSpConfigure",
        "Description": "This function changes the configured value for sp_configure settings. If the setting is dynamic this setting will be used, otherwise the user will be warned that a restart of SQL is required.\nThis is designed to be safe and will not allow for configurations to be set outside of the defined configuration min and max values.\nWhile it is possible to set below the min, or above the max this can cause serious problems with SQL Server (including startup failures), and so is not permitted.",
        "Tags": "SpConfigure",
        "Alias": "",
        "Author": "Nic Cain, https://sirsql.net/",
        "Synopsis": "Changes the server level system configuration (sys.configuration/sp_configure) value for a given configuration",
        "Name": "Set-DbaSpConfigure",
        "Links": "https://dbatools.io/Set-DbaSpConfigure",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaSpConfigure -SqlInstance localhost -Name ScanForStartupProcedures -Value 1\nAdjusts the Scan for startup stored procedures configuration value to 1 and notifies the user that this requires a SQL restart to take effect\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaSpConfigure -SqlInstance sql2017, sql2014 -Name XPCmdShellEnabled, IsSqlClrEnabled | Set-DbaSpConfigure -Value $false\nSets the values for XPCmdShellEnabled and IsSqlClrEnabled on sql2017 and sql2014 to False\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaSpConfigure -SqlInstance localhost -Name XPCmdShellEnabled -Value 1\nAdjusts the xp_cmdshell configuration value to 1.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaSpConfigure -SqlInstance localhost -Name XPCmdShellEnabled -Value 1 -WhatIf\nReturns information on the action that would be performed. No actual change will be made.",
        "Syntax": "Set-DbaSpConfigure [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Value] \u003cInt32\u003e] [[-Name] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaSpn",
        "Description": "This function will connect to Active Directory and search for an account. If the account is found, it will attempt to add an SPN. Once the SPN is added, the function will also set delegation to that service, unless -NoDelegation is specified. In order to run this function, the credential you provide must have write access to Active Directory.\n\nNote: This function supports -WhatIf",
        "Tags": "SPN",
        "Alias": "",
        "Author": "Drew Furgiuele (@pittfurg), http://www.port1433.com",
        "Synopsis": "Sets an SPN for a given service account in active directory (and also enables delegation to the same SPN by default)",
        "Name": "Set-DbaSpn",
        "Links": "https://dbatools.io/Set-DbaSpn",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaSpn -SPN MSSQLSvc\\SQLSERVERA.domain.something -ServiceAccount domain\\account\nPS C:\\\u003e Set-DbaSpn -SPN MSSQLSvc\\SQLSERVERA.domain.something -ServiceAccount domain\\account -EnableException\nConnects to Active Directory and adds a provided SPN to the given account.\r\nConnects to Active Directory and adds a provided SPN to the given account, suppressing all error messages and throw exceptions that can be caught instead\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaSpn -SPN MSSQLSvc\\SQLSERVERA.domain.something -ServiceAccount domain\\account -Credential ad\\sqldba\nConnects to Active Directory and adds a provided SPN to the given account. Uses alternative account to connect to AD.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaSpn -SPN MSSQLSvc\\SQLSERVERA.domain.something -ServiceAccount domain\\account -NoDelegation\nConnects to Active Directory and adds a provided SPN to the given account, without the delegation.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaSpn -ComputerName sql2016 | Where { $_.isSet -eq $false } | Set-DbaSpn\nSets all missing SPNs for sql2016\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eTest-DbaSpn -ComputerName sql2016 | Where { $_.isSet -eq $false } | Set-DbaSpn -WhatIf\nDisplays what would happen trying to set all missing SPNs for sql2016",
        "Syntax": "Set-DbaSpn [-SPN] \u003cString\u003e [-ServiceAccount] \u003cString\u003e [[-Credential] \u003cPSCredential\u003e] [-NoDelegation] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaStartupParameter",
        "Description": "Modifies the startup parameters for a specified SQL Server Instance\n\nFor full details of what each parameter does, please refer to this MSDN article - https://msdn.microsoft.com/en-us/library/ms190737(v=sql.105).aspx",
        "Tags": [
                     "Startup",
                     "Parameter",
                     "Configure"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Sets the Startup Parameters for a SQL Server instance",
        "Name": "Set-DbaStartupParameter",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser\nWill configure the SQL Instance server1\\instance1 to startup up in Single User mode at next startup\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -IncreasedExtents\nWill configure the SQL Instance sql2016 to IncreasedExtents = True (-E)\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -IncreasedExtents:$false -WhatIf\nShows what would happen if you attempted to configure the SQL Instance sql2016 to IncreasedExtents = False (no -E)\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser -TraceFlags 8032,8048\nThis will append Trace Flags 8032 and 8048 to the startup parameters\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -SingleUser:$false -TraceFlagsOverride\nThis will remove all trace flags and set SingleUser to false\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser -TraceFlags 8032,8048 -TraceFlagsOverride\nThis will set Trace Flags 8032 and 8048 to the startup parameters, removing any existing Trace Flags\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -SingleUser:$false -TraceFlagsOverride -Offline\nThis will remove all trace flags and set SingleUser to false from an offline instance\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -ErrorLog c:\\Sql\\ -Offline\nThis will attempt to change the ErrorLog path to c:\\sql\\. However, with the offline switch this will not happen. To force it, use the -Force switch like so:\nSet-DbaStartupParameter -SqlInstance sql2016 -ErrorLog c:\\Sql\\ -Offline -Force\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e$StartupConfig = Get-DbaStartupParameter -SqlInstance server1\\instance1\nPS C:\\\u003e Set-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser -NoLoggingToWinEvents\r\nPS C:\\\u003e #Restart your SQL instance with the tool of choice\r\nPS C:\\\u003e #Do Some work\r\nPS C:\\\u003e Set-DbaStartupParameter -SqlInstance server1\\instance1 -StartUpConfig $StartUpConfig\r\nPS C:\\\u003e #Restart your SQL instance with the tool of choice and you\u0027re back to normal\nIn this example we take a copy of the existing startup configuration of server1\\instance1\nWe then change the startup parameters ahead of some work\nAfter the work has been completed, we can push the original startup parameters back to server1\\instance1 and resume normal operation",
        "Syntax": "Set-DbaStartupParameter [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [[-MasterData] \u003cString\u003e] [[-MasterLog] \u003cString\u003e] [[-ErrorLog] \u003cString\u003e] [[-TraceFlags] \u003cString[]\u003e] [-CommandPromptStart] [-MinimalStart] [[-MemoryToReserve] \u003cInt32\u003e] [-SingleUser] [[-SingleUserDetails] \u003cString\u003e] [-NoLoggingToWinEvents] [-StartAsNamedInstance] [-DisableMonitoring] [-IncreasedExtents] [-TraceFlagsOverride] [[-StartUpConfig] \u003cObject\u003e] [-Offline] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaTcpPort",
        "Description": "This function changes the TCP port used by the specified SQL Server.",
        "Tags": [
                     "Service",
                     "Port",
                     "TCP",
                     "Configure"
                 ],
        "Alias": "",
        "Author": "@H0s0n77",
        "Synopsis": "Changes the TCP port used by the specified SQL Server.",
        "Name": "Set-DbaTcpPort",
        "Links": "https://dbatools.io/Set-DbaTcpPort",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaTcpPort -SqlInstance SqlInstance2014a -Port 1433\nSets the port number 1433 for all IP Addresses on the default instance on SqlInstance2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaTcpPort -SqlInstance winserver\\sqlexpress -IpAddress 192.168.1.22 -Port 1433\nSets the port number 1433 for IP 192.168.1.22 on the sqlexpress instance on winserver\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaTcpPort -SqlInstance \u0027SQLDB2014A\u0027 ,\u0027SQLDB2016B\u0027 -port 1337\nSets the port number 1337 for all IP Addresses on SqlInstance SQLDB2014A and SQLDB2016B",
        "Syntax": "Set-DbaTcpPort [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [-Port] \u003cInt32\u003e [[-IpAddress] \u003cIPAddress[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbaTempdbConfig",
        "Description": "Calculates tempdb size and file configurations based on passed parameters, calculated values, and Microsoft best practices. User must declare SQL Server to be configured and total data file size as mandatory values. Function then calculates the number of data files based on logical cores on the target host and create evenly sized data files based on the total data size declared by the user, with a log file 25% of the total data file size.\n\nOther parameters can adjust the settings as the user desires (such as different file paths, number of data files, and log file size). No functions that shrink or delete data files are performed. If you wish to do this, you will need to resize tempdb so that it is \"smaller\" than what the function will size it to before running the function.",
        "Tags": [
                     "Tempdb",
                     "Space",
                     "Configure",
                     "Configuration"
                 ],
        "Alias": "Set-DbaTempDbConfiguration,Set-SqlTempDbConfiguration",
        "Author": "Michael Fal (@Mike_Fal), http://mikefal.net",
        "Synopsis": "Sets tempdb data and log files according to best practices.",
        "Name": "Set-DbaTempdbConfig",
        "Links": "https://dbatools.io/Set-DbaTempdbConfig",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaTempdbConfig -SqlInstance localhost -DataFileSizeMB 1000\nCreates tempdb with a number of data files equal to the logical cores where each file is equal to 1000MB divided by the number of logical cores, with a log file of 250MB.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaTempdbConfig -SqlInstance localhost -DataFileSizeMB 1000 -DataFileCount 8\nCreates tempdb with 8 data files, each one sized at 125MB, with a log file of 250MB.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaTempdbConfig -SqlInstance localhost -DataFileSizeMB 1000 -OutputScriptOnly\nProvides a SQL script output to configure tempdb according to the passed parameters.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaTempdbConfig -SqlInstance localhost -DataFileSizeMB 1000 -DisableGrowth\nDisables the growth for the data and log files.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaTempdbConfig -SqlInstance localhost -DataFileSizeMB 1000 -OutputScriptOnly\nReturns the T-SQL script representing tempdb configuration.",
        "Syntax": "Set-DbaTempdbConfig [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-DataFileCount] \u003cInt32\u003e] [-DataFileSizeMB] \u003cInt32\u003e [[-LogFileSizeMB] \u003cInt32\u003e] [[-DataFileGrowthMB] \u003cInt32\u003e] [[-LogFileGrowthMB] \u003cInt32\u003e] [[-DataPath] \u003cString\u003e] [[-LogPath] \u003cString\u003e] [[-OutFile] \u003cString\u003e] [-OutputScriptOnly] [-DisableGrowth] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Set-DbatoolsConfig",
        "Description": "This function creates or changes configuration values.\nThese are used in dbatools to provide dynamic configuration information outside the PowerShell variable system.",
        "Tags": [
                     "Config",
                     "Module"
                 ],
        "Alias": "Set-DbaConfig",
        "Author": "Friedrich Weinmann",
        "Synopsis": "Sets configuration entries.",
        "Name": "Set-DbatoolsConfig",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbatoolsConfig -Name \u0027User\u0027 -Value \"Friedrich\" -Description \"The user under which the show must go on.\"\nCreates a configuration entry named \"User\" with the value \"Friedrich\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbatoolsConfig -Name \u0027mymodule.User\u0027 -Value \"Friedrich\" -Description \"The user under which the show must go on.\" -Handler $scriptBlock -Initialize -Validation String\nCreates a configuration entry ...\r\n- Named \"mymodule.user\"\r\n- With the value \"Friedrich\"\r\n- It adds a description as noted\r\n- It registers the scriptblock stored in $scriptBlock as handler\r\n- It initializes the script. This block only executes the first time a it is run like this. Subsequent calls will be ignored.\r\n- It registers the basic string input type validator\r\nThis is the default example for modules using the configuration system.\r\nNote: While the -Handler parameter is optional, it is important to add it at the initial initialize call, if you are planning to add it.\r\nOnly then will the system validate previous settings (such as what a user might have placed in his user profile)\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbatoolsConfig \u0027ConfigLink\u0027 \u0027https://www.example.com/config.xml\u0027 \u0027Company\u0027 -Hidden\nCreates a configuration entry named \"ConfigLink\" in the \"Company\" module with the value \u0027https://www.example.com/config.xml\u0027.\r\nThis entry is hidden from casual discovery using Get-Config.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbatoolsConfig \u0027Network.Firewall\u0027 \u002710.0.0.2\u0027 -Default\nCreates a configuration entry named \"Firewall\" in the \"Network\" module with the value \u002710.0.0.2\u0027\r\nThis is only set, if the setting does not exist yet. If it does, this command will apply no changes.",
        "Syntax": "Set-DbatoolsConfig [-FullName] \u003cString\u003e [[-Value] \u003cObject\u003e] [-Description \u003cString\u003e] [-Validation \u003cString\u003e] [-Handler \u003cScriptBlock\u003e] [-Hidden] [-Default] [-Initialize] [-DisableValidation] [-DisableHandler] [-EnableException] [\u003cCommonParameters\u003e]\nSet-DbatoolsConfig [-Name] \u003cString\u003e [[-Module] \u003cString\u003e] [[-Value] \u003cObject\u003e] [-Description \u003cString\u003e] [-Validation \u003cString\u003e] [-Handler \u003cScriptBlock\u003e] [-Hidden] [-Default] [-Initialize] [-DisableValidation] [-DisableHandler] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Show-DbaDbList",
        "Description": "Shows a list of databases in a GUI. Returns a string holding the name of the selected database. Hitting cancel returns null.",
        "Tags": [
                     "Database",
                     "FileSystem"
                 ],
        "Alias": "Show-DbaDatabaseList,Show-SqlDatabaseList",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Shows a list of databases in a GUI.",
        "Name": "Show-DbaDbList",
        "Links": "https://dbatools.io/Show-DbaDbList",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eShow-DbaDbList -SqlInstance sqlserver2014a\nShows a GUI list of databases using Windows Authentication to connect to the SQL Server. Returns a string of the selected database.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eShow-DbaDbList -Source sqlserver2014a -SqlCredential $cred\nShows a GUI list of databases using SQL credentials to connect to the SQL Server. Returns a string of the selected database.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eShow-DbaDbList -SqlInstance sqlserver2014a -DefaultDb master\nShows a GUI list of databases using Windows Authentication to connect to the SQL Server. The \"master\" database will be selected when the lists shows. Returns a string of the selected database.",
        "Syntax": "Show-DbaDbList [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Title] \u003cString\u003e] [[-Header] \u003cString\u003e] [[-DefaultDb] \u003cString\u003e] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Show-DbaServerFileSystem",
        "Description": "Similar to the remote file system popup you see when browsing a remote SQL Server in SQL Server Management Studio, this function allows you to traverse the remote SQL Server\u0027s file structure.\n\nShow-DbaServerFileSystem uses SQL Management Objects to browse the directories and what you see is limited to the permissions of the account running the command.",
        "Tags": [
                     "Storage",
                     "FileSystem"
                 ],
        "Alias": "Show-SqlServerFileSystem",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Shows file system on remote SQL Server in a local GUI and returns the selected directory name",
        "Name": "Show-DbaServerFileSystem",
        "Links": "https://dbatools.io/Show-DbaServerFileSystem",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eShow-DbaServerFileSystem -SqlInstance sqlserver2014a\nShows a list of databases using Windows Authentication to connect to the SQL Server. Returns a string of the selected path.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eShow-DbaServerFileSystem -Source sqlserver2014a -SqlCredential $cred\nShows a list of databases using SQL credentials to connect to the SQL Server. Returns a string of the selected path.",
        "Syntax": "Show-DbaServerFileSystem [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cObject\u003e] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Start-DbaAgentJob",
        "Description": "This command starts a job then returns connected SMO object for SQL Agent Job information for each instance(s) of SQL Server.",
        "Tags": [
                     "Job",
                     "Agent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Starts a running SQL Server Agent Job.",
        "Name": "Start-DbaAgentJob",
        "Links": "https://dbatools.io/Start-DbaAgentJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStart-DbaAgentJob -SqlInstance localhost\nStarts all running SQL Agent Jobs on the local SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance sql2016 -Job cdc.DBWithCDC_capture | Start-DbaAgentJob\nStarts the cdc.DBWithCDC_capture SQL Agent Job on sql2016\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eStart-DbaAgentJob -SqlInstance sql2016 -Job cdc.DBWithCDC_capture\nStarts the cdc.DBWithCDC_capture SQL Agent Job on sql2016\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$servers | Find-DbaAgentJob -IsFailed | Start-DbaAgentJob\nRestarts all failed jobs on all servers in the $servers collection\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eStart-DbaAgentJob -SqlInstance sql2016 -AllJobs\nStart all the jobs",
        "Syntax": "Start-DbaAgentJob [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cString[]\u003e] [-ExcludeJob \u003cString[]\u003e] [-AllJobs] [-Wait] [-WaitPeriod \u003cInt32\u003e] [-SleepPeriod \u003cInt32\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStart-DbaAgentJob -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cString[]\u003e] [-ExcludeJob \u003cString[]\u003e] [-AllJobs] [-Wait] [-WaitPeriod \u003cInt32\u003e] [-SleepPeriod \u003cInt32\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStart-DbaAgentJob [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cString[]\u003e] [-ExcludeJob \u003cString[]\u003e] -InputObject \u003cJob[]\u003e [-AllJobs] [-Wait] [-WaitPeriod \u003cInt32\u003e] [-SleepPeriod \u003cInt32\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Start-DbaEndpoint",
        "Description": "Starts endpoints on a SQL Server instance.",
        "Tags": "Endpoint",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Starts endpoints on a SQL Server instance.",
        "Name": "Start-DbaEndpoint",
        "Links": "https://dbatools.io/Start-DbaEndpoint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStart-DbaEndpoint -SqlInstance sqlserver2012 -AllEndpoints\nStarts all endpoints on the sqlserver2014 instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStart-DbaEndpoint -SqlInstance sqlserver2012 -Endpoint endpoint1,endpoint2 -SqlCredential sqladmin\nLogs into sqlserver2012 using alternative credentials and starts the endpoint1 and endpoint2 endpoints.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-Endpoint -SqlInstance sqlserver2012 -Endpoint endpoint1 | Start-DbaEndpoint\nStarts the endpoints returned from the Get-Endpoint function.",
        "Syntax": "Start-DbaEndpoint [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-EndPoint] \u003cString[]\u003e] [-AllEndpoints] [[-InputObject] \u003cEndpoint[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Start-DbaMigration",
        "Description": "Start-DbaMigration consolidates most of the migration tools in dbatools into one command. This is useful when you\u0027re looking to migrate entire instances. It less flexible than using the underlying functions. Think of it as an easy button. It migrates:\n\nAll user databases to exclude support databases such as ReportServerTempDB (Use -IncludeSupportDbs for this). Use -NoDatabases to skip.\nAll logins. Use -NoLogins to skip.\nAll database mail objects. Use -NoDatabaseMail\nAll credentials. Use -NoCredentials to skip.\nAll objects within the Job Server (SQL Agent). Use -NoAgentServer to skip.\nAll linked servers. Use -NoLinkedServers to skip.\nAll groups and servers within Central Management Server. Use -NoCentralManagementServer to skip.\nAll SQL Server configuration objects (everything in sp_configure). Use -NoSpConfigure to skip.\nAll user objects in system databases. Use -NoSysDbUserObjects to skip.\nAll system triggers. Use -NoSystemTriggers to skip.\nAll system backup devices. Use -NoBackupDevices to skip.\nAll Audits. Use -NoAudits to skip.\nAll Endpoints. Use -NoEndpoints to skip.\nAll Extended Events. Use -NoExtendedEvents to skip.\nAll Policy Management objects. Use -NoPolicyManagement to skip.\nAll Resource Governor objects. Use -NoResourceGovernor to skip.\nAll Server Audit Specifications. Use -NoServerAuditSpecifications to skip.\nAll Custom Errors (User Defined Messages). Use -NoCustomErrors to skip.\nCopies All Data Collector collection sets. Does not configure the server. Use -NoDataCollector to skip.\n\nThis script provides the ability to migrate databases using detach/copy/attach or backup/restore. SQL Server logins, including passwords, SID and database/server roles can also be migrated. In addition, job server objects can be migrated and server configuration settings can be exported or migrated. This script works with named instances, clusters and SQL Express.\n\nBy default, databases will be migrated to the destination SQL Server\u0027s default data and log directories. You can override this by specifying -ReuseSourceFolderStructure. Filestreams and filegroups are also migrated. Safety is emphasized.",
        "Tags": "Migration",
        "Alias": "Start-SqlMigration",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Migrates SQL Server *ALL* databases, logins, database mail profiles/accounts, credentials, SQL Agent objects, linked servers,\nCentral Management Server objects, server configuration settings (sp_configure), user objects in systems databases,\nsystem triggers and backup devices from one SQL Server to another.\n\nFor more granular control, please use one of the -No parameters and use the other functions available within the dbatools module.",
        "Name": "Start-DbaMigration",
        "Links": "https://dbatools.io/Start-DbaMigration",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStart-DbaMigration -Source sqlserver\\instance -Destination sqlcluster -DetachAttach\nAll databases, logins, job objects and sp_configure options will be migrated from sqlserver\\instance to sqlcluster. Databases will be migrated using the detach/copy files/attach method. Dbowner will \r\nbe updated. User passwords, SIDs, database roles and server roles will be migrated along with the login.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$params = @{\n\u003e\u003e \"Source\" = \"sqlcluster\";\r\n\u003e\u003e \"Destination\" = \"sql2016\";\r\n\u003e\u003e \"SourceSqlCredential\" = $scred;\r\n\u003e\u003e \"DestinationSqlCredential\" = $cred;\r\n\u003e\u003e \"NetworkShare\" = \"\\\\fileserver\\share\\sqlbackups\\Migration\";\r\n\u003e\u003e \"BackupRestore\" = $true;\r\n\u003e\u003e \"ReuseSourceFolderStructure\" = $true;\r\n\u003e\u003e \"Force\" = $true;\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e Start-DbaMigration @params -Verbose\nUtilizes splatting technique to set all the needed parameters. This will migrate databases using the backup/restore method. It will also include migration of the logins, database mail configuration, \r\ncredentials, SQL Agent, Central Management Server, and SQL Server global configuration.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$PSDefaultParameters = @{\n\u003e\u003e \"dbatools:Source\" = \"sqlcluster\"\r\n\u003e\u003e \"dbatools:Destination\" = \"sql2016\"\r\n\u003e\u003e }\r\n\u003e\u003e\r\nPS C:\\\u003e Start-DbaMigration -Verbose -NoDatabases -NoLogins\nUtilizes the PSDefaultParameterValues system variable, and sets the Source and Destination parameters for any function in the module that has those parameter names. This prevents the need from \r\npassing them in constantly.\r\nThe execution of the function will migrate everything but logins and databases.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eStart-DbaMigration -Verbose -Source sqlcluster -Destination sql2016 -DetachAttach -Reattach -SetSourceReadonly\nMigrate databases using detach/copy/attach. Reattach at source and set source databases read-only. Also migrates everything else.",
        "Syntax": "Start-DbaMigration [-Source] \u003cDbaInstanceParameter\u003e [-Destination] \u003cDbaInstanceParameter[]\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [[-DestinationSqlCredential] \u003cPSCredential\u003e] [-NoDatabases] [-NoLogins] [-NoAgentServer] [-NoCredentials] [-NoLinkedServers] [-NoSpConfigure] [-NoCentralManagementServer] [-NoDatabaseMail] [-NoSysDbUserObjects] [-NoSystemTriggers] [-NoBackupDevices] [-NoAudits] [-NoEndpoints] [-NoExtendedEvents] [-NoPolicyManagement] [-NoResourceGovernor] [-NoServerAuditSpecifications] [-NoCustomErrors] [-NoDataCollector] [-DisableJobsOnDestination] [-DisableJobsOnSource] \r\n[-NoSaRename] [-UseLastBackups] [-Continue] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStart-DbaMigration [-Source] \u003cDbaInstanceParameter\u003e [-Destination] \u003cDbaInstanceParameter[]\u003e [-DetachAttach] [[-Reattach]] [[-SetSourceReadOnly]] [[-ReuseSourceFolderStructure]] [[-IncludeSupportDbs]] [[-SourceSqlCredential] \u003cPSCredential\u003e] [[-DestinationSqlCredential] \u003cPSCredential\u003e] [-NoDatabases] [-NoLogins] [-NoAgentServer] [-NoCredentials] [-NoLinkedServers] [-NoSpConfigure] [-NoCentralManagementServer] [-NoDatabaseMail] [-NoSysDbUserObjects] [-NoSystemTriggers] [-NoBackupDevices] [-NoAudits] [-NoEndpoints] [-NoExtendedEvents] [-NoPolicyManagement] [-NoResourceGovernor] \r\n[-NoServerAuditSpecifications] [-NoCustomErrors] [-NoDataCollector] [-DisableJobsOnDestination] [-DisableJobsOnSource] [-NoSaRename] [-UseLastBackups] [-Continue] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStart-DbaMigration [-Source] \u003cDbaInstanceParameter\u003e [-Destination] \u003cDbaInstanceParameter[]\u003e [-BackupRestore] [[-NetworkShare] \u003cString\u003e] [[-WithReplace]] [[-NoRecovery]] [[-SetSourceReadOnly]] [[-ReuseSourceFolderStructure]] [[-IncludeSupportDbs]] [[-SourceSqlCredential] \u003cPSCredential\u003e] [[-DestinationSqlCredential] \u003cPSCredential\u003e] [-NoDatabases] [-NoLogins] [-NoAgentServer] [-NoCredentials] [-NoLinkedServers] [-NoSpConfigure] [-NoCentralManagementServer] [-NoDatabaseMail] [-NoSysDbUserObjects] [-NoSystemTriggers] [-NoBackupDevices] [-NoAudits] [-NoEndpoints] [-NoExtendedEvents] \r\n[-NoPolicyManagement] [-NoResourceGovernor] [-NoServerAuditSpecifications] [-NoCustomErrors] [-NoDataCollector] [-DisableJobsOnDestination] [-DisableJobsOnSource] [-NoSaRename] [-UseLastBackups] [-Continue] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Start-DbaPfDataCollectorSet",
        "Description": "Starts Performance Monitor Data Collector Set.",
        "Tags": "PerfMon",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Starts Performance Monitor Data Collector Set.",
        "Name": "Start-DbaPfDataCollectorSet",
        "Links": "https://dbatools.io/Start-DbaPfDataCollectorSet",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStart-DbaPfDataCollectorSet\nAttempts to start all ready Collectors on localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStart-DbaPfDataCollectorSet -ComputerName sql2017\nAttempts to start all ready Collectors on localhost.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eStart-DbaPfDataCollectorSet -ComputerName sql2017, sql2016 -Credential ad\\sqldba -CollectorSet \u0027System Correlation\u0027\nStarts the \u0027System Correlation\u0027 Collector on sql2017 and sql2016 using alternative credentials.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -CollectorSet \u0027System Correlation\u0027 | Start-DbaPfDataCollectorSet\nStarts the \u0027System Correlation\u0027 Collector.",
        "Syntax": "Start-DbaPfDataCollectorSet [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-NoWait] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Start-DbaService",
        "Description": "Starts the SQL Server related services on one or more computers. Will follow SQL Server service dependencies.\n\nRequires Local Admin rights on destination computer(s).",
        "Tags": [
                     "Service",
                     "SqlServer",
                     "Instance",
                     "Connect"
                 ],
        "Alias": "Start-DbaSqlService",
        "Author": "Kirill Kravtsov (@nvarscar)",
        "Synopsis": "Starts SQL Server services on a computer.",
        "Name": "Start-DbaService",
        "Links": "https://dbatools.io/Start-DbaService",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStart-DbaService -ComputerName sqlserver2014a\nStarts the SQL Server related services on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027| Get-DbaService | Start-DbaService\nGets the SQL Server related services on computers sql1, sql2 and sql3 and starts them.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eStart-DbaService -ComputerName sql1,sql2 -Instance MSSQLSERVER\nStarts the SQL Server services related to the default instance MSSQLSERVER on computers sql1 and sql2.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eStart-DbaService -ComputerName $MyServers -Type SSRS\nStarts the SQL Server related services of type \"SSRS\" (Reporting Services) on computers in the variable MyServers.",
        "Syntax": "Start-DbaService [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [-InstanceName \u003cString[]\u003e] [-Type \u003cString[]\u003e] [-Timeout \u003cInt32\u003e] [-Credential \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStart-DbaService [-InstanceName \u003cString[]\u003e] [-Type \u003cString[]\u003e] -InputObject \u003cObject[]\u003e [-Timeout \u003cInt32\u003e] [-Credential \u003cPSCredential\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Start-DbaTrace",
        "Description": "Starts SQL Server traces",
        "Tags": [
                     "Security",
                     "Trace"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Starts SQL Server traces",
        "Name": "Start-DbaTrace",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStart-DbaTrace -SqlInstance sql2008\nStarts all traces on sql2008\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStart-DbaTrace -SqlInstance sql2008 -Id 1\nStarts all trace with ID 1 on sql2008\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2008 | Out-GridView -PassThru | Start-DbaTrace\nStarts selected traces on sql2008",
        "Syntax": "Start-DbaTrace [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Id] \u003cInt32[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Start-DbaXESession",
        "Description": "This script starts Extended Events sessions on a SQL Server instance.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Doug Meyers",
        "Synopsis": "Starts Extended Events sessions.",
        "Name": "Start-DbaXESession",
        "Links": "https://dbatools.io/Start-DbaXESession",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStart-DbaXESession -SqlInstance sqlserver2012 -AllSessions\nStarts all Extended Event Session on the sqlserver2014 instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStart-DbaXESession -SqlInstance sqlserver2012 -Session xesession1,xesession2\nStarts the xesession1 and xesession2 Extended Event sessions.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eStart-DbaXESession -SqlInstance sqlserver2012 -Session xesession1,xesession2 -StopAt (Get-Date).AddMinutes(30)\nStarts the xesession1 and xesession2 Extended Event sessions and stops them in 30 minutes.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sqlserver2012 -Session xesession1 | Start-DbaXESession\nStarts the sessions returned from the Get-DbaXESession function.",
        "Syntax": "Start-DbaXESession [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Session \u003cObject[]\u003e [-StopAt \u003cDateTime\u003e] [-EnableException] [\u003cCommonParameters\u003e]\nStart-DbaXESession [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-StopAt \u003cDateTime\u003e] -AllSessions [-EnableException] [\u003cCommonParameters\u003e]\nStart-DbaXESession [-StopAt \u003cDateTime\u003e] -InputObject \u003cSession[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Start-DbaXESmartTarget",
        "Description": "XESmartTarget offers the ability to set up complex actions in response to Extended Events captured in sessions, without writing a single line of code.\n\nSee more at https://github.com/spaghettidba/XESmartTarget/wiki",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "XESmartTarget runs as a client application for an Extended Events session running on a SQL Server instance.",
        "Name": "Start-DbaXESmartTarget",
        "Links": "https://dbatools.io/Start-DbaXESmartTarget",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$response = New-DbaXESmartQueryExec -SqlInstance sql2017 -Database dbadb -Query \"update table set whatever = 1\"\nPS C:\\\u003eStart-DbaXESmartTarget -SqlInstance sql2017 -Session deadlock_tracker -Responder $response\nExecutes a T-SQL command against dbadb on sql2017 whenever a deadlock event is recorded.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$response = New-DbaXESmartQueryExec -SqlInstance sql2017 -Database dbadb -Query \"update table set whatever = 1\"\nPS C:\\\u003e$params = @{\r\n\u003e\u003e SmtpServer = \"smtp.ad.local\"\r\n\u003e\u003e To = \"admin@ad.local\"\r\n\u003e\u003e Sender = \"reports@ad.local\"\r\n\u003e\u003e Subject = \"Query executed\"\r\n\u003e\u003e Body = \"Query executed at {collection_time}\"\r\n\u003e\u003e Attachment = \"batch_text\"\r\n\u003e\u003e AttachmentFileName = \"query.sql\"\r\n\u003e\u003e }\r\nPS C:\\\u003e $emailresponse = New-DbaXESmartEmail @params\r\nPS C:\\\u003e Start-DbaXESmartTarget -SqlInstance sql2017 -Session querytracker -Responder $response, $emailresponse\nExecutes a T-SQL command against dbadb on sql2017 and sends an email whenever a querytracker event is recorded.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$columns = \"cpu_time\", \"duration\", \"physical_reads\", \"logical_reads\", \"writes\", \"row_count\", \"batch_text\"\nPS C:\\\u003e $response = New-DbaXESmartTableWriter -SqlInstance sql2017 -Database dbadb -Table deadlocktracker -OutputColumns $columns -Filter \"duration \u003e 10000\"\r\nPS C:\\\u003e Start-DbaXESmartTarget -SqlInstance sql2017 -Session deadlock_tracker -Responder $response\nWrites Extended Events to the deadlocktracker table in dbadb on sql2017.",
        "Syntax": "Start-DbaXESmartTarget [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString\u003e] [-Session] \u003cString\u003e [-FailOnProcessingError] [[-Responder] \u003cObject[]\u003e] [[-Template] \u003cString[]\u003e] [-NotAsJob] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Stop-DbaAgentJob",
        "Description": "This command stops a job then returns connected SMO object for SQL Agent Job information for each instance(s) of SQL Server.",
        "Tags": [
                     "Job",
                     "Agent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Stops a running SQL Server Agent Job.",
        "Name": "Stop-DbaAgentJob",
        "Links": "https://dbatools.io/Stop-DbaAgentJob",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStop-DbaAgentJob -SqlInstance localhost\nStops all running SQL Agent Jobs on the local SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaAgentJob -SqlInstance sql2016 -Job cdc.DBWithCDC_capture | Stop-DbaAgentJob\nStops the cdc.DBWithCDC_capture SQL Agent Job on sql2016\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eStop-DbaAgentJob -SqlInstance sql2016 -Job cdc.DBWithCDC_capture\nStops the cdc.DBWithCDC_capture SQL Agent Job on sql2016",
        "Syntax": "Stop-DbaAgentJob [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cString[]\u003e] [-ExcludeJob \u003cString[]\u003e] [-Wait] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStop-DbaAgentJob -SqlInstance \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cString[]\u003e] [-ExcludeJob \u003cString[]\u003e] [-Wait] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStop-DbaAgentJob [-SqlCredential \u003cPSCredential\u003e] [-Job \u003cString[]\u003e] [-ExcludeJob \u003cString[]\u003e] -InputObject \u003cJob[]\u003e [-Wait] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Stop-DbaEndpoint",
        "Description": "Stops endpoints on a SQL Server instance.",
        "Tags": "Endpoint",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Stops endpoints on a SQL Server instance.",
        "Name": "Stop-DbaEndpoint",
        "Links": "https://dbatools.io/Stop-DbaEndpoint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStop-DbaEndpoint -SqlInstance sqlserver2012 -AllEndpoints\nStops all endpoints on the sqlserver2014 instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStop-DbaEndpoint -SqlInstance sqlserver2012 -Endpoint endpoint1,endpoint2\nStops the endpoint1 and endpoint2 endpoints.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-Endpoint -SqlInstance sqlserver2012 -Endpoint endpoint1 | Stop-DbaEndpoint\nStops the endpoints returned from the Get-Endpoint function.",
        "Syntax": "Stop-DbaEndpoint [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-EndPoint] \u003cString[]\u003e] [-AllEndpoints] [[-InputObject] \u003cEndpoint[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Stop-DbaPfDataCollectorSet",
        "Description": "Stops Performance Monitor Data Collector Set.",
        "Tags": "PerfMon",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Stops Performance Monitor Data Collector Set.",
        "Name": "Stop-DbaPfDataCollectorSet",
        "Links": "https://dbatools.io/Stop-DbaPfDataCollectorSet",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStop-DbaPfDataCollectorSet\nAttempts to stop all ready Collectors on localhost.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStop-DbaPfDataCollectorSet -ComputerName sql2017\nAttempts to stop all ready Collectors on localhost.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eStop-DbaPfDataCollectorSet -ComputerName sql2017, sql2016 -Credential ad\\sqldba -CollectorSet \u0027System Correlation\u0027\nStops the \u0027System Correlation\u0027 Collector on sql2017 and sql2016 using alternative credentials.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaPfDataCollectorSet -CollectorSet \u0027System Correlation\u0027 | Stop-DbaPfDataCollectorSet\nStops the \u0027System Correlation\u0027 Collector.",
        "Syntax": "Stop-DbaPfDataCollectorSet [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CollectorSet] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-NoWait] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Stop-DbaProcess",
        "Description": "This command kills all spids associated with a spid, login, host, program or database.\n\nIf you are attempting to kill your own login sessions, the process performing the kills will be skipped.",
        "Tags": "Processes",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "This command finds and kills SQL Server processes.",
        "Name": "Stop-DbaProcess",
        "Links": "https://dbatools.io/Stop-DbaProcess",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStop-DbaProcess -SqlInstance sqlserver2014a -Login base\\ctrlb, sa\nFinds all processes for base\\ctrlb and sa on sqlserver2014a, then kills them. Uses Windows Authentication to login to sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStop-DbaProcess -SqlInstance sqlserver2014a -SqlCredential $credential -Spids 56, 77\nFinds processes for spid 56 and 57, then kills them. Uses alternative (SQL or Windows) credentials to login to sqlserver2014a.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eStop-DbaProcess -SqlInstance sqlserver2014a -Programs \u0027Microsoft SQL Server Management Studio\u0027\nFinds processes that were created in Microsoft SQL Server Management Studio, then kills them.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eStop-DbaProcess -SqlInstance sqlserver2014a -Hosts workstationx, server100\nFinds processes that were initiated by hosts (computers/clients) workstationx and server 1000, then kills them.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eStop-DbaProcess -SqlInstance sqlserver2014 -Database tempdb -WhatIf\nShows what would happen if the command were executed.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaProcess -SqlInstance sql2016 -Programs \u0027dbatools PowerShell module - dbatools.io\u0027 | Stop-DbaProcess\nFinds processes that were created with dbatools, then kills them.",
        "Syntax": "Stop-DbaProcess [-SqlCredential \u003cPSCredential\u003e] [-Spid \u003cInt32[]\u003e] [-ExcludeSpid \u003cInt32[]\u003e] [-Database \u003cString[]\u003e] [-Login \u003cString[]\u003e] [-Hostname \u003cString[]\u003e] [-Program \u003cString[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStop-DbaProcess -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-Spid \u003cInt32[]\u003e] [-ExcludeSpid \u003cInt32[]\u003e] [-Database \u003cString[]\u003e] [-Login \u003cString[]\u003e] [-Hostname \u003cString[]\u003e] [-Program \u003cString[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStop-DbaProcess [-SqlCredential \u003cPSCredential\u003e] [-Spid \u003cInt32[]\u003e] [-ExcludeSpid \u003cInt32[]\u003e] [-Database \u003cString[]\u003e] [-Login \u003cString[]\u003e] [-Hostname \u003cString[]\u003e] [-Program \u003cString[]\u003e] -InputObject \u003cObject[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Stop-DbaService",
        "Description": "Stops the SQL Server related services on one or more computers. Will follow SQL Server service dependencies.\n\nRequires Local Admin rights on destination computer(s).",
        "Tags": [
                     "Service",
                     "Stop"
                 ],
        "Alias": "Stop-DbaSqlService",
        "Author": "Kirill Kravtsov (@nvarscar)",
        "Synopsis": "Stops SQL Server services on a computer.",
        "Name": "Stop-DbaService",
        "Links": "https://dbatools.io/Stop-DbaService",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStop-DbaService -ComputerName sqlserver2014a\nStops the SQL Server related services on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027| Get-DbaService | Stop-DbaService\nGets the SQL Server related services on computers sql1, sql2 and sql3 and stops them.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eStop-DbaService -ComputerName sql1,sql2 -Instance MSSQLSERVER\nStops the SQL Server services related to the default instance MSSQLSERVER on computers sql1 and sql2.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eStop-DbaService -ComputerName $MyServers -Type SSRS\nStops the SQL Server related services of type \"SSRS\" (Reporting Services) on computers in the variable MyServers.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eStop-DbaService -ComputerName sql1 -Type Engine -Force\nStops SQL Server database engine services on sql1 forcing dependent SQL Server Agent services to stop as well.",
        "Syntax": "Stop-DbaService [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [-InstanceName \u003cString[]\u003e] [-Type \u003cString[]\u003e] [-Timeout \u003cInt32\u003e] [-Credential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nStop-DbaService [-InstanceName \u003cString[]\u003e] [-Type \u003cString[]\u003e] -InputObject \u003cObject[]\u003e [-Timeout \u003cInt32\u003e] [-Credential \u003cPSCredential\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Stop-DbaTrace",
        "Description": "Stops SQL Server traces",
        "Tags": [
                     "Security",
                     "Trace"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Stops SQL Server traces",
        "Name": "Stop-DbaTrace",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStop-DbaTrace -SqlInstance sql2008\nStops all traces on sql2008\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStop-DbaTrace -SqlInstance sql2008 -Id 1\nStops all trace with ID 1 on sql2008\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaTrace -SqlInstance sql2008 | Out-GridView -PassThru | Stop-DbaTrace\nStops selected traces on sql2008",
        "Syntax": "Stop-DbaTrace [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Id] \u003cInt32[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Stop-DbaXESession",
        "Description": "This script stops Extended Events sessions on a SQL Server instance.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Doug Meyers",
        "Synopsis": "Stops Extended Events sessions.",
        "Name": "Stop-DbaXESession",
        "Links": "https://dbatools.io/Stop-DbaXESession",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eStop-DbaXESession -SqlInstance sqlserver2012 -AllSessions\nStops all Extended Event Session on the sqlserver2014 instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eStop-DbaXESession -SqlInstance sqlserver2012 -Session xesession1,xesession2\nStops the xesession1 and xesession2 Extended Event sessions.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sqlserver2012 -Session xesession1 | Stop-DbaXESession\nStops the sessions returned from the Get-DbaXESession function.",
        "Syntax": "Stop-DbaXESession [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -Session \u003cObject[]\u003e [-EnableException] [\u003cCommonParameters\u003e]\nStop-DbaXESession [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] -AllSessions [-EnableException] [\u003cCommonParameters\u003e]\nStop-DbaXESession -InputObject \u003cSession[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Stop-DbaXESmartTarget",
        "Description": "Stops an XESmartTarget PowerShell job. Useful if you want to run a target, but not right now.",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba)",
        "Synopsis": "Stops an XESmartTarget PowerShell job. Useful if you want to run a target, but not right now.",
        "Name": "Stop-DbaXESmartTarget",
        "Links": "https://dbatools.io/Stop-DbaXESmartTarget\nhttps://github.com/spaghettidba/XESmartTarget/wiki",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaXESmartTarget | Stop-DbaXESmartTarget\nStops all XESmartTarget jobs.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaXESmartTarget | Where-Object Id -eq 2 | Stop-DbaXESmartTarget\nStops a specific XESmartTarget job.",
        "Syntax": "Stop-DbaXESmartTarget [-InputObject] \u003cObject[]\u003e [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Sync-DbaLoginPermission",
        "Description": "Syncs only SQL Server login permissions, roles, etc. Does not add or drop logins. If a matching login does not exist on the destination, the login will be skipped. Credential removal is not currently supported for this operation.",
        "Tags": [
                     "Migration",
                     "Login"
                 ],
        "Alias": "Sync-DbaSqlLoginPermission,Sync-SqlLoginPermissions",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Copies SQL login permissions from one server to another.",
        "Name": "Sync-DbaLoginPermission",
        "Links": "https://dbatools.io/Sync-DbaLoginPermission",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSync-DbaLoginPermission -Source sqlserver2014a -Destination sqlcluster\nSyncs only SQL Server login permissions, roles, etc. Does not add or drop logins or users. To copy logins and their permissions, use Copy-SqlLogin.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSync-DbaLoginPermission -Source sqlserver2014a -Destination sqlcluster -Exclude realcajun -SourceSqlCredential $scred -DestinationSqlCredential $dcred\nCopies all login permissions except for realcajun using SQL Authentication to connect to each server. If a login already exists on the destination, the permissions will not be migrated.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSync-DbaLoginPermission -Source sqlserver2014a -Destination sqlcluster -Login realcajun, netnerds\nCopies permissions ONLY for logins netnerds and realcajun.",
        "Syntax": "Sync-DbaLoginPermission [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Login] \u003cObject[]\u003e] [[-ExcludeLogin] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaBackupInformation",
        "Description": "Input is normally from a backup history object generated from Format-DbaBackupInformation. This is then parse to check that it\u0027s valid for restore. Tests performed include:\n - Checking unbroken LSN chain\n - If the target database exists and WithReplace has been provided\n - If any files already exist, but owned by other databases\n - Creates any new folders required\n - That the backup files exists at the location specified, and can be seen by the Sql Instance\n - If no errors are found then the objects for that database will me marked as Verified",
        "Tags": [
                     "Backup",
                     "Restore",
                     "DisasterRecovery"
                 ],
        "Alias": "",
        "Author": "Stuart Moore (@napalmgram), stuart-moore.com",
        "Synopsis": "Tests a dbatools backup history object is correct for restoring",
        "Name": "Test-DbaBackupInformation",
        "Links": "https://dbatools.io/Test-DbaBackupInformation",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$BackupHistory | Test-DbaBackupInformation -SqlInstance MyInstance\nPS C:\\\u003e $PassedDbs = $BackupHistory | Where-Object {$_.IsVerified -eq $True}\r\nPS C:\\\u003e $FailedDbs = $BackupHistory | Where-Object {$_.IsVerified -ne $True}\nPass in a BackupHistory object to be tested against MyInstance.\r\nThose records that pass are marked as verified. We can then use the IsVerified property to divide the failures and successes",
        "Syntax": "Test-DbaBackupInformation [-BackupHistory] \u003cObject[]\u003e [[-SqlInstance] \u003cDbaInstanceParameter\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-WithReplace] [-Continue] [-VerifyOnly] [-OutputScriptOnly] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaBuild",
        "Description": "Returns info about the specific build of a SQL instance, including the SP, the CU and the reference KB, End Of Support, wherever possible. It adds a Compliance property as true/false, and adds details about the \"targeted compliance\"",
        "Tags": [
                     "SqlBuild",
                     "Version"
                 ],
        "Alias": "Test-DbaSqlBuild",
        "Author": "Simone Bizzotto (@niphold) | Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Returns SQL Server Build \"compliance\" level on a build",
        "Name": "Test-DbaBuild",
        "Links": "https://dbatools.io/Test-DbaBuild",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaBuild -Build \"12.0.5540\" -MinimumBuild \"12.0.5557\"\nReturns information about a build identified by \"12.0.5540\" (which is SQL 2014 with SP2 and CU4), which is not compliant as the minimum required\r\nbuild is \"12.0.5557\" (which is SQL 2014 with SP2 and CU8)\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaBuild -Build \"12.0.5540\" -MaxBehind \"1SP\"\nReturns information about a build identified by \"12.0.5540\", making sure it is AT MOST 1 Service Pack \"behind\". For that version,\r\nthat identifies an SP2, means accepting as the lowest compliance version as \"12.0.4110\", that identifies 2014 with SP1\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaBuild -Build \"12.0.5540\" -MaxBehind \"1SP 1CU\"\nReturns information about a build identified by \"12.0.5540\", making sure it is AT MOST 1 Service Pack \"behind\", plus 1 CU \"behind\". For that version,\r\nthat identifies an SP2 and CU, rolling back 1 SP brings you to \"12.0.4110\", but given the latest CU for SP1 is CU13, the target \"compliant\" build\r\nwill be \"12.0.4511\", which is 2014 with SP1 and CU12\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaBuild -Build \"12.0.5540\" -MaxBehind \"0CU\"\nReturns information about a build identified by \"12.0.5540\", making sure it is the latest CU release.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eTest-DbaBuild -Build \"12.0.5540\" -Latest\nSame as previous, returns information about a build identified by \"12.0.5540\", making sure it is the latest build available.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eTest-DbaBuild -Build \"12.00.4502\" -MinimumBuild \"12.0.4511\" -Update\nSame as before, but tries to fetch the most up to date index online. When the online version is newer, the local one gets overwritten\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eTest-DbaBuild -Build \"12.0.4502\",\"10.50.4260\" -MinimumBuild \"12.0.4511\"\nReturns information builds identified by these versions strings\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sqlserver2014a | Test-DbaBuild -MinimumBuild \"12.0.4511\"\nIntegrate with other cmdlets to have builds checked for all your registered servers on sqlserver2014a",
        "Syntax": "Test-DbaBuild [[-Build] \u003cVersion[]\u003e] [[-MinimumBuild] \u003cVersion\u003e] [[-MaxBehind] \u003cString\u003e] [-Latest] [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-Update] [-Quiet] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaCmConnection",
        "Description": "Tests over which paths a computer can be managed.\n\nThis function tries out the connectivity for:\n- Cim over WinRM\n- Cim over DCOM\n- Wmi\n- PowerShellRemoting\nResults will be written to the connectivity cache and will cause Get-DbaCmObject and Invoke-DbaCmMethod to connect using the way most likely to succeed. This way, it is likely the other commands will take less time to execute. These others too cache their results, in order to dynamically update connection statistics.\n\nThis function ignores global configuration settings limiting which protocols may be used.",
        "Tags": [
                     "ComputerManagement",
                     "CIM"
                 ],
        "Alias": "",
        "Author": "Friedrich Weinmann (@FredWeinmann‏)",
        "Synopsis": "Tests over which paths a computer can be managed.",
        "Name": "Test-DbaCmConnection",
        "Links": "https://dbatools.io/Test-DbaCmConnection",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaCmConnection -ComputerName sql2014\nPerforms a full-spectrum connection test against the computer sql2014. The results will be reported and registered. Future calls from Get-DbaCmObject will recognize the results and optimize the query.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaCmConnection -ComputerName sql2014 -Credential $null -Type CimDCOM, CimRM\nThis test will run a connectivity test of CIM over DCOM and CIM over WinRM against the computer sql2014 using Windows Authentication.\nThe results will be reported and registered. Future calls from Get-DbaCmObject will recognize the results and optimize the query.",
        "Syntax": "Test-DbaCmConnection [[-ComputerName] \u003cDbaCmConnectionParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-Type] {None | CimRM | CimDCOM | Wmi | PowerShellRemoting}] [-Force] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaConnection",
        "Description": "Tests the ability to connect to an SQL Server instance outputting information about the server and instance.",
        "Tags": [
                     "CIM",
                     "Test",
                     "Connection"
                 ],
        "Alias": "Test-SqlConnection",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Tests the connection to a single instance.",
        "Name": "Test-DbaConnection",
        "Links": "https://dbatools.io/Test-DbaConnection",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaConnection SQL2016\nComputerName : SQL2016\r\nInstanceName : MSSQLSERVER\r\nSqlInstance : sql2016\r\nSqlVersion : 13.0.4001\r\nConnectingAsUser : BASE\\ctrlb\r\nConnectSuccess : True\r\nAuthType : Windows Authentication\r\nAuthScheme : KERBEROS\r\nTcpPort : 1433\r\nIPAddress : 10.2.1.5\r\nNetBiosName : sql2016.base.local\r\nIsPingable : True\r\nPSRemotingAccessible : True\r\nDomainName : base.local\r\nLocalWindows : 10.0.15063.0\r\nLocalPowerShell : 5.1.15063.502\r\nLocalCLR : 4.0.30319.42000\r\nLocalSMOVersion : 13.0.0.0\r\nLocalDomainUser : True\r\nLocalRunAsAdmin : False\nTest connection to SQL2016 and outputs information collected",
        "Syntax": "Test-DbaConnection [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaConnectionAuthScheme",
        "Description": "By default, this command will return the ConnectName, ServerName, Transport and AuthScheme of the current connection.\n\nConnectName is the name you used to connect. ServerName is the name that the SQL Server reports as its @@SERVERNAME which is used to register its SPN. If you were expecting a Kerberos connection and got NTLM instead, ensure ConnectName and ServerName match.\n\nIf -Kerberos or -Ntlm is specified, the $true/$false results of the test will be returned. Returns $true or $false by default for one server. Returns Server name and Results for more than one server.",
        "Tags": [
                     "SPN",
                     "Kerberos"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns the transport protocol and authentication scheme of the connection. This is useful to determine if your connection is using Kerberos.",
        "Name": "Test-DbaConnectionAuthScheme",
        "Links": "https://dbatools.io/Test-DbaConnectionAuthScheme",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaConnectionAuthScheme -SqlInstance sqlserver2014a, sql2016\nReturns ConnectName, ServerName, Transport and AuthScheme for sqlserver2014a and sql2016.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaConnectionAuthScheme -SqlInstance sqlserver2014a -Kerberos\nReturns $true or $false depending on if the connection is Kerberos or not.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaConnectionAuthScheme -SqlInstance sqlserver2014a | Select-Object *\nReturns the results of \"SELECT * from sys.dm_exec_connections WHERE session_id = @@SPID\"",
        "Syntax": "Test-DbaConnectionAuthScheme [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Kerberos] [-Ntlm] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDbCollation",
        "Description": "Compares Database Collations to Server Collation",
        "Tags": [
                     "Database",
                     "Collation"
                 ],
        "Alias": "Test-DbaDatabaseCollation",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Compares Database Collations to Server Collation",
        "Name": "Test-DbaDbCollation",
        "Links": "https://dbatools.io/Test-DbaDbCollation",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDbCollation -SqlInstance sqlserver2014a\nReturns server name, database name and true/false if the collations match for all databases on sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDbCollation -SqlInstance sqlserver2014a -Database db1, db2\nReturns information for the db1 and db2 databases on sqlserver2014a.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaDbCollation -SqlInstance sqlserver2014a, sql2016 -Exclude db1\nReturns information for database and server collations for all databases except db1 on sqlserver2014a and sql2016.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2016 | Test-DbaDbCollation\nReturns db/server collation information for every database on every server listed in the Central Management Server on sql2016.",
        "Syntax": "Test-DbaDbCollation [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDbCompatibility",
        "Description": "Compares Database Compatibility level to Server Compatibility",
        "Tags": [
                     "Database",
                     "Compatibility"
                 ],
        "Alias": "Test-DbaDatabaseCompatibility",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Compares Database Compatibility level to Server Compatibility",
        "Name": "Test-DbaDbCompatibility",
        "Links": "https://dbatools.io/Test-DbaDbCompatibility",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDbCompatibility -SqlInstance sqlserver2014a\nReturns server name, database name and true/false if the compatibility level match for all databases on sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDbCompatibility -SqlInstance sqlserver2014a -Database db1, db2\nReturns detailed information for database and server compatibility level for the db1 and db2 databases on sqlserver2014a.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaDbCompatibility -SqlInstance sqlserver2014a, sql2016 -Exclude db1\nReturns detailed information for database and server compatibility level for all databases except db1 on sqlserver2014a and sql2016.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaCmsRegServer -SqlInstance sql2014 | Test-DbaDbCompatibility\nReturns db/server compatibility information for every database on every server listed in the Central Management Server on sql2016.",
        "Syntax": "Test-DbaDbCompatibility [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Credential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDbCompression",
        "Description": "This function returns the results of a full table/index compression analysis and the estimated, best option to date for either NONE, Page, or Row Compression.\n\nRemember Uptime is critical, the longer uptime, the more accurate the analysis is, and it would be best if you utilized Get-DbaUptime first, before running this command.\n\nTest-DbaDbCompression script derived from GitHub and the tigertoolbox\n(https://github.com/Microsoft/tigertoolbox/tree/master/Evaluate-Compression-Gains)\nIn the output, you will find the following information:\n- Column Percent_Update shows the percentage of update operations on a specific table, index, or partition, relative to total operations on that object. The lower the percentage of Updates (that is, the table, index, or partition is infrequently updated), the better candidate it is for page compression.\n- Column Percent_Scan shows the percentage of scan operations on a table, index, or partition, relative to total operations on that object. The higher the value of Scan (that is, the table, index, or partition is mostly scanned), the better candidate it is for page compression.\n- Column Compression_Type_Recommendation can have four possible outputs indicating where there is most gain, if any: \u0027PAGE\u0027, \u0027ROW\u0027, \u0027NO_GAIN\u0027 or \u0027?\u0027. When the output is \u0027?\u0027 this approach could not give a recommendation, so as a rule of thumb I would lean to ROW if the object suffers mainly UPDATES, or PAGE if mainly INSERTS, but this is where knowing your workload is essential. When the output is \u0027NO_GAIN\u0027 well, that means that according to sp_estimate_data_compression_savings no space gains will be attained when compressing, as in the above output example, where compressing would grow the affected object.\n\nThis script will execute on the context of the current database.\nAlso be aware that this may take a while to execute on large objects, because if the IS locks taken by the\nsp_estimate_data_compression_savings cannot be honored, the SP will be blocked.\nIt only considers Row or Page Compression (not column compression)\nIt only evaluates User Tables",
        "Tags": [
                     "Compression",
                     "Table",
                     "Database"
                 ],
        "Alias": "",
        "Author": "Jason Squires (@js_0505), jstexasdba@gmail.com",
        "Synopsis": "Returns tables and indexes with preferred compression setting.",
        "Name": "Test-DbaDbCompression",
        "Links": "https://dbatools.io/Test-DbaDbCompression",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDbCompression -SqlInstance localhost\nReturns results of all potential compression options for all databases for the default instance on the local host. Returns a recommendation of either Page, Row or NO_GAIN\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDbCompression -SqlInstance ServerA\nReturns results of all potential compression options for all databases on the instance ServerA\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaDbCompression -SqlInstance ServerA -Database DBName | Out-GridView\nReturns results of all potential compression options for a single database DBName with the recommendation of either Page or Row or NO_GAIN in a nicely formatted GridView\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$cred = Get-Credential sqladmin\nPS C:\\\u003e Test-DbaDbCompression -SqlInstance ServerA -ExcludeDatabase MyDatabase -SqlCredential $cred\nReturns results of all potential compression options for all databases except MyDatabase on instance ServerA using SQL credentials to authentication to ServerA.\r\nReturns the recommendation of either Page, Row or NO_GAIN\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eTest-DbaDbCompression -SqlInstance ServerA -Schema Test -Table MyTable\nReturns results of all potential compression options for the Table Test.MyTable in instance ServerA on ServerA and ServerB.\r\nReturns the recommendation of either Page, Row or NO_GAIN.\r\nReturns a result for each partition of any Heap, Clustered or NonClustered index.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eTest-DbaDbCompression -SqlInstance ServerA, ServerB -ResultSize 10\nReturns results of all potential compression options for all databases on ServerA and ServerB.\r\nReturns the recommendation of either Page, Row or NO_GAIN.\r\nReturns results for the top 10 partitions by TotalPages used per database.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eServerA | Test-DbaDbCompression -Schema Test -ResultSize 10 -Rank UsedPages -FilterBy Table\nReturns results of all potential compression options for all databases on ServerA containing a schema Test\r\nReturns results for the top 10 Tables by Used Pages per database.\r\nResults are split by Table, Index and Partition so more than 10 results may be returned.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e$servers = \u0027Server1\u0027,\u0027Server2\u0027\nPS C:\\\u003e $servers | Test-DbaDbCompression -Database DBName | Out-GridView\nReturns results of all potential compression options for a single database DBName on Server1 or Server2\r\nReturns the recommendation of either Page, Row or NO_GAIN in a nicely formatted GridView\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e$cred = Get-Credential sqladmin\nPS C:\\\u003e Test-DbaDbCompression -SqlInstance ServerA -Database MyDB -SqlCredential $cred -Schema Test -Table Test1, Test2\nReturns results of all potential compression options for objects in Database MyDb on instance ServerA using SQL credentials to authentication to ServerA.\r\nReturns the recommendation of either Page, Row or NO_GAIN for tables with SchemA Test and name in Test1 or Test2\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003e$servers = \u0027Server1\u0027,\u0027Server2\u0027\nPS C:\\\u003e foreach ($svr in $servers) {\r\n\u003e\u003e Test-DbaDbCompression -SqlInstance $svr | Export-Csv -Path C:\\temp\\CompressionAnalysisPAC.csv -Append\r\n\u003e\u003e }\nThis produces a full analysis of all your servers listed and is pushed to a csv for you to analyze.",
        "Syntax": "Test-DbaDbCompression [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-Schema] \u003cString[]\u003e] [[-Table] \u003cString[]\u003e] [[-ResultSize] \u003cInt32\u003e] [[-Rank] \u003cString\u003e] [[-FilterBy] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDbLogShipStatus",
        "Description": "Most of the time your log shipping \"just works\".\nChecking your log shipping status can be done really easy with this function.\n\nMake sure you\u0027re connecting to the monitoring instance of your log shipping infrastructure.\n\nThe function will return the status for a database. This can be one or more messages in a comma separated list.\nIf everything is OK with the database than you should only see the message \"All OK\".",
        "Tags": "LogShipping",
        "Alias": "Test-DbaLogShippingStatus",
        "Author": "Sander Stad (@sqlstad), sqlstad.nl",
        "Synopsis": "Test-DbaDbLogShipStatus returns the status of your log shipping databases",
        "Name": "Test-DbaDbLogShipStatus",
        "Links": "https://dbatools.io/Test-DbaDbLogShipStatus",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDbLogShipStatus -SqlInstance sql1\nRetrieves the log ship information from sql1 and displays all the information present including the status.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDbLogShipStatus -SqlInstance sql1 -Database AdventureWorks2014\nRetrieves the log ship information for just the database AdventureWorks.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaDbLogShipStatus -SqlInstance sql1 -Primary\nRetrieves the log ship information and only returns the information for the databases on the primary instance.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaDbLogShipStatus -SqlInstance sql1 -Secondary\nRetrieves the log ship information and only returns the information for the databases on the secondary instance.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eTest-DbaDbLogShipStatus -SqlInstance sql1 -Simple\nRetrieves the log ship information and only returns the columns SQL Instance, Database, Instance Type and Status",
        "Syntax": "Test-DbaDbLogShipStatus [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-ExcludeDatabase] \u003cString[]\u003e] [-Simple] [-Primary] [-Secondary] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDbOwner",
        "Description": "This function will check all databases on an instance against a SQL login to validate if that\nlogin owns those databases or not. By default, the function will check against \u0027sa\u0027 for\nownership, but the user can pass a specific login if they use something else.\n\nBest Practice reference: http://weblogs.sqlteam.com/dang/archive/2008/01/13/Database-Owner-Troubles.aspx",
        "Tags": [
                     "Database",
                     "Owner",
                     "DbOwner"
                 ],
        "Alias": "Test-DbaDatabaseOwner",
        "Author": "Michael Fal (@Mike_Fal), http://mikefal.net",
        "Synopsis": "Checks database owners against a login to validate which databases do not match that owner.",
        "Name": "Test-DbaDbOwner",
        "Links": "https://dbatools.io/Test-DbaDbOwner",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDbOwner -SqlInstance localhost\nReturns all databases where the owner does not match \u0027sa\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDbOwner -SqlInstance localhost -TargetLogin \u0027DOMAIN\\account\u0027\nReturns all databases where the owner does not match \u0027DOMAIN\\account\u0027.",
        "Syntax": "Test-DbaDbOwner [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-TargetLogin] \u003cString\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDbVirtualLogFile",
        "Description": "Having a transaction log file with too many virtual log files (VLFs) can hurt database performance.\n\nToo many VLFs can cause transaction log backups to slow down and can also slow down database recovery and, in extreme cases, even affect insert/update/delete performance.\n\nReferences:\nhttp://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/\nhttp://blogs.msdn.com/b/saponsqlserver/archive/2012/02/22/too-many-virtual-log-files-vlfs-can-cause-slow-database-recovery.aspx\n\nIf you\u0027ve got a high number of VLFs, you can use Expand-SqlTLogResponsibly to reduce the number.",
        "Tags": [
                     "VLF",
                     "Database"
                 ],
        "Alias": "Test-DbaVirtualLogFile",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Returns calculations on the database virtual log files for database on a SQL instance.",
        "Name": "Test-DbaDbVirtualLogFile",
        "Links": "https://dbatools.io/Test-DbaDbVirtualLogFile",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDbVirtualLogFile -SqlInstance sqlcluster\nReturns all user database virtual log file counts for the sqlcluster instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDbVirtualLogFile -SqlInstance sqlserver | Where-Object {$_.Count -ge 50}\nReturns user databases that have 50 or more VLFs.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e@(\u0027sqlserver\u0027,\u0027sqlcluster\u0027) | Test-DbaDbVirtualLogFile\nReturns all VLF information for the sqlserver and sqlcluster SQL Server instances. Processes data via the pipeline.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaDbVirtualLogFile -SqlInstance sqlcluster -Database db1, db2\nReturns VLF counts for the db1 and db2 databases on sqlcluster.",
        "Syntax": "Test-DbaDbVirtualLogFile [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-IncludeSystemDBs] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDeprecatedFeature",
        "Description": "Displays information relating to deprecated features for SQL Server 2005 and above.",
        "Tags": "Deprecated",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Displays information relating to deprecated features for SQL Server 2005 and above.",
        "Name": "Test-DbaDeprecatedFeature",
        "Links": "https://dbatools.io/Test-DbaDeprecatedFeature",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2008 -Database testdb, db2 | Test-DbaDeprecatedFeature\nCheck deprecated features on server sql2008 for only the testdb and db2 databases\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance sql2008 -Database testdb, db2 | Test-DbaDeprecatedFeature | Select *\nSee the object definition in the output as well\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaDeprecatedFeature -SqlInstance sql2008, sqlserver2012\nCheck deprecated features for all databases on the servers sql2008 and sqlserver2012.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaDeprecatedFeature -SqlInstance sql2008 -Database TestDB\nCheck deprecated features on server sql2008 for only the TestDB database",
        "Syntax": "Test-DbaDeprecatedFeature [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-ExcludeDatabase] \u003cString[]\u003e] [[-InputObject] \u003cDatabase[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDiskAlignment",
        "Description": "Returns $true or $false by default for one server. Returns Server name and IsBestPractice for more than one server.\n\nPlease refer to your storage vendor best practices before following any advice below.\n\nBy default issues with disk alignment should be resolved by a new installation of Windows Server 2008, Windows Vista, or later operating systems, but verifying disk alignment continues to be recommended as a best practice.\nWhile some versions of Windows use different starting alignments, if you are starting anew 1MB is generally the best practice offset for current operating systems (because it ensures that the partition offset % common stripe unit sizes == 0 )\n\nCaveats:\n* Dynamic drives (or those provisioned via third party software) may or may not have accurate results when polled by any of the built in tools, see your vendor for details.\n* Windows does not have a reliable way to determine stripe unit Sizes. These values are obtained from vendor disk management software or from your SAN administrator.\n* System drives in versions previous to Windows Server 2008 cannot be aligned, but it is generally not recommended to place SQL Server databases on system drives.",
        "Tags": "Storage",
        "Alias": "",
        "Author": "Constantine Kokkinos (@mobileck), https://constantinekokkinos.com",
        "Synopsis": "Verifies that your non-dynamic disks are aligned according to physical constraints.",
        "Name": "Test-DbaDiskAlignment",
        "Links": "https://dbatools.io/Test-DbaDiskAlignment",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDiskAlignment -ComputerName sqlserver2014a\nTests the disk alignment of a single server named sqlserver2014a\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDiskAlignment -ComputerName sqlserver2014a, sqlserver2014b, sqlserver2014c\nTests the disk alignment of multiple servers",
        "Syntax": "Test-DbaDiskAlignment [-ComputerName] \u003cObject[]\u003e [-Detailed] [[-Credential] \u003cPSCredential\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [-NoSqlCheck] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDiskAllocation",
        "Description": "Checks all disks on a computer for disk allocation units that match best practice recommendations. If one server is checked, only $true or $false is returned. If multiple servers are checked, each server\u0027s name and an IsBestPractice field are returned.\n\nReferences:\nhttps://technet.microsoft.com/en-us/library/dd758814(v=sql.100).aspx - \"The performance question here is usually not one of correlation per the formula, but whether the cluster size has been explicitly defined at 64 KB, which is a best practice for SQL Server.\"",
        "Tags": [
                     "CIM",
                     "Storage"
                 ],
        "Alias": "Test-SqlDiskAllocation",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Checks all disks on a computer to see if they are formatted with allocation units of 64KB.",
        "Name": "Test-DbaDiskAllocation",
        "Links": "https://dbatools.io/Test-DbaDiskAllocation",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDiskAllocation -ComputerName sqlserver2014a\nScans all disks on server sqlserver2014a for best practice allocation unit size.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDiskAllocation -ComputerName sqlserver2014 | Select-Output *\nScans all disks on server sqlserver2014a for allocation unit size and returns detailed results for each.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaDiskAllocation -ComputerName sqlserver2014a -NoSqlCheck\nScans all disks not hosting SQL Server data or log files on server sqlserver2014a for best practice allocation unit size.",
        "Syntax": "Test-DbaDiskAllocation [-ComputerName] \u003cObject[]\u003e [-NoSqlCheck] [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [-Detailed] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaDiskSpeed",
        "Description": "Tests how disks are performing.\n\nThis command uses a query from Rich Benner which was adapted from David Pless\u0027s article:\nhttps://blogs.msdn.microsoft.com/dpless/2010/12/01/leveraging-sys-dm_io_virtual_file_stats/\nhttps://github.com/RichBenner/PersonalCode/blob/master/Disk_Speed_Check.sql",
        "Tags": "Performance",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Tests how disks are performing.",
        "Name": "Test-DbaDiskSpeed",
        "Links": "https://dbatools.io/Test-DbaDiskSpeed",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaDiskSpeed -SqlInstance sql2008, sqlserver2012\nTests how disks are performing on sql2008 and sqlserver2012.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaDiskSpeed -SqlInstance sql2008 -Database tempdb\nTests how disks storing tempdb files on sql2008 are performing.",
        "Syntax": "Test-DbaDiskSpeed [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaEndpoint",
        "Description": "Tests connectivity for TCP enabled endpoints.\n\nNote that if an endpoint does not have a tcp listener port, it will be skipped.",
        "Tags": "Endpoint",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Tests connectivity for TCP enabled endpoints.",
        "Name": "Test-DbaEndpoint",
        "Links": "https://dbatools.io/Test-DbaEndpoint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaEndpoint -SqlInstance localhost\nTests all endpoints on the local default SQL Server instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaEndpoint -SqlInstance localhost, sql2016 -Endpoint Mirror | Test-DbaEndpoint\nTests all endpoints named Mirroring on sql2016 and localhost.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaEndpoint -SqlInstance localhost, sql2016 -Endpoint Mirror\nTests all endpoints named Mirroring on sql2016 and localhost.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaEndpoint -SqlInstance localhost -Verbose\nTests all endpoints on the local default SQL Server instance.\r\nSee all endpoints that were skipped due to not having a tcp listener port.",
        "Syntax": "Test-DbaEndpoint [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Endpoint] \u003cString[]\u003e] [[-InputObject] \u003cEndpoint[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaIdentityUsage",
        "Description": "IDENTITY seeds have max values based off of their data type. This module will locate identity columns and report the seed usage.",
        "Tags": [
                     "Identity",
                     "Table",
                     "Column"
                 ],
        "Alias": "",
        "Author": "Brandon Abshire, netnerds.net",
        "Synopsis": "Displays information relating to IDENTITY seed usage. Works on SQL Server 2008 and above.",
        "Name": "Test-DbaIdentityUsage",
        "Links": "https://dbatools.io/Test-DbaIdentityUsage",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaIdentityUsage -SqlInstance sql2008, sqlserver2012\nCheck identity seeds for servers sql2008 and sqlserver2012.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaIdentityUsage -SqlInstance sql2008 -Database TestDB\nCheck identity seeds on server sql2008 for only the TestDB database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaIdentityUsage -SqlInstance sql2008 -Database TestDB -Threshold 20\nCheck identity seeds on server sql2008 for only the TestDB database, limiting results to 20% utilization of seed range or higher",
        "Syntax": "Test-DbaIdentityUsage [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [[-Threshold] \u003cInt32\u003e] [[-ExcludeSystemDb]] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaJobOwner",
        "Description": "This function checks all SQL Agent Jobs on an instance against a SQL login to validate if that login owns those SQL Agent Jobs or not. By default, the function checks against \u0027sa\u0027 for ownership, but the user can pass a specific login if they use something else.\n\nOnly SQL Agent Jobs that do not match this ownership will be displayed.\nBest practice reference: http://sqlmag.com/blog/sql-server-tip-assign-ownership-jobs-sysadmin-account",
        "Tags": [
                     "Agent",
                     "Job",
                     "Owner"
                 ],
        "Alias": "",
        "Author": "Michael Fal (@Mike_Fal), http://mikefal.net",
        "Synopsis": "Checks SQL Agent Job owners against a login to validate which jobs do not match that owner.",
        "Name": "Test-DbaJobOwner",
        "Links": "https://dbatools.io/Test-DbaJobOwner",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaJobOwner -SqlInstance localhost\nReturns all SQL Agent Jobs where the owner does not match \u0027sa\u0027.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaJobOwner -SqlInstance localhost -ExcludeJob \u0027syspolicy_purge_history\u0027\nReturns SQL Agent Jobs except for the syspolicy_purge_history job\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaJobOwner -SqlInstance localhost -Login DOMAIN\\account\nReturns all SQL Agent Jobs where the owner does not match DOMAIN\\account. Note\r\nthat Login must be a valid security principal that exists on the target server.",
        "Syntax": "Test-DbaJobOwner [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Job] \u003cObject[]\u003e] [[-ExcludeJob] \u003cObject[]\u003e] [[-Login] \u003cString\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaLastBackup",
        "Description": "Restores all or some of the latest backups and performs a DBCC CHECKDB.\n\n1. Gathers information about the last full backups\n2. Restores the backups to the Destination with a new name. If no Destination is specified, the originating SqlServer wil be used.\n3. The database is restored as \"dbatools-testrestore-$databaseName\" by default, but you can change dbatools-testrestore to whatever you would like using -Prefix\n4. The internal file names are also renamed to prevent conflicts with original database\n5. A DBCC CHECKDB is then performed\n6. And the test database is finally dropped",
        "Tags": [
                     "DisasterRecovery",
                     "Backup",
                     "Restore"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Quickly and easily tests the last set of full backups for a server.",
        "Name": "Test-DbaLastBackup",
        "Links": "https://dbatools.io/Test-DbaLastBackup",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaLastBackup -SqlInstance sql2016\nDetermines the last full backup for ALL databases, attempts to restore all databases (with a different name and file structure), then performs a DBCC CHECKDB. Once the test is complete, the test \r\nrestore will be dropped.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaLastBackup -SqlInstance sql2016 -Database master\nDetermines the last full backup for master, attempts to restore it, then performs a DBCC CHECKDB.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaLastBackup -SqlInstance sql2016 -Database model, master -VerifyOnly\nSkips performing an action restore of the database and simply verifies the backup using VERIFYONLY option of the restore.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaLastBackup -SqlInstance sql2016 -NoCheck -NoDrop\nSkips the DBCC CHECKDB check. This can help speed up the tests but makes it less tested. The test restores will remain on the server.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eTest-DbaLastBackup -SqlInstance sql2016 -DataDirectory E:\\bigdrive -LogDirectory L:\\bigdrive -MaxMB 10240\nRestores data and log files to alternative locations and only restores databases that are smaller than 10 GB.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eTest-DbaLastBackup -SqlInstance sql2014 -Destination sql2016 -CopyFile\nCopies the backup files for sql2014 databases to sql2016 default backup locations and then attempts restore from there.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eTest-DbaLastBackup -SqlInstance sql2014 -Destination sql2016 -CopyFile -CopyPath \"\\\\BackupShare\\TestRestore\\\"\nCopies the backup files for sql2014 databases to sql2016 default backup locations and then attempts restore from there.",
        "Syntax": "Test-DbaLastBackup [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-Destination] \u003cDbaInstanceParameter\u003e] [[-DestinationCredential] \u003cObject\u003e] [[-DataDirectory] \u003cString\u003e] [[-LogDirectory] \u003cString\u003e] [[-Prefix] \u003cString\u003e] [-VerifyOnly] [-NoCheck] [-NoDrop] [-CopyFile] [[-CopyPath] \u003cString\u003e] [[-MaxMB] \u003cInt32\u003e] [-IncludeCopyOnly] [-IgnoreLogBackup] [[-AzureCredential] \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaLinkedServerConnection",
        "Description": "Test each linked server on the instance",
        "Tags": "LinkedServer",
        "Alias": "",
        "Author": "Thomas LaRock ( https://thomaslarock.com )",
        "Synopsis": "Test all linked servers from the sql servers passed",
        "Name": "Test-DbaLinkedServerConnection",
        "Links": "https://dbatools.io/Test-DbaLinkedServerConnection",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaLinkedServerConnection -SqlInstance DEV01\nTest all Linked Servers for the SQL Server instance DEV01\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaLinkedServerConnection -SqlInstance sql2016 | Out-File C:\\temp\\results.txt\nTest all Linked Servers for the SQL Server instance sql2016 and output results to file\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaLinkedServerConnection -SqlInstance sql2016, sql2014, sql2012\nTest all Linked Servers for the SQL Server instances sql2016, sql2014 and sql2012\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$servers = \"sql2016\",\"sql2014\",\"sql2012\"\nPS C:\\\u003e $servers | Test-DbaLinkedServerConnection -SqlCredential sqladmin\nTest all Linked Servers for the SQL Server instances sql2016, sql2014 and sql2012 using SQL login credentials\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$servers | Get-DbaLinkedServer | Test-DbaLinkedServerConnection\nTest all Linked Servers for the SQL Server instances sql2016, sql2014 and sql2012",
        "Syntax": "Test-DbaLinkedServerConnection [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaLoginPassword",
        "Description": "The purpose of this function is to find SQL Server logins that have no password or the same password as login. You can add your own password to check for or add them to a csv file.\nBy default it will test for empty password and the same password as username.",
        "Tags": [
                     "Login",
                     "Security"
                 ],
        "Alias": "",
        "Author": "Peter Samuelsson",
        "Synopsis": "Test-DbaLoginPassword finds any logins on SQL instance that are SQL Logins and have a password that is either null or same as the login",
        "Name": "Test-DbaLoginPassword",
        "Links": "https://dbatools.io/Test-DbaLoginPassword",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaLoginPassword -SqlInstance Dev01\nTest all SQL logins that the password is null or same as username on SQL server instance Dev01\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaLoginPassword -SqlInstance Dev01 -Login sqladmin\nTest the \u0027sqladmin\u0027 SQL login that the password is null or same as username on SQL server instance Dev01\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaLoginPassword -SqlInstance Dev01 -Dictionary Test1,test2\nTest all SQL logins that the password is null, same as username or Test1,Test2 on SQL server instance Dev0\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaLogin -SqlInstance \"sql2017\",\"sql2016\" | Test-DbaLoginPassword\nTest all logins on sql2017 and sql2016\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$servers | Get-DbaLogin | Out-GridView -PassThru | Test-DbaLoginPassword\nTest selected logins on all servers in the $servers variable",
        "Syntax": "Test-DbaLoginPassword [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Login] \u003cString[]\u003e] [[-Dictionary] \u003cString[]\u003e] [[-InputObject] \u003cLogin[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaManagementObject",
        "Description": "The Test-DbaManagementObject returns True if the Version is on the computer, and False if it does not exist.",
        "Tags": "SMO",
        "Alias": "Test-DbaSqlManagementObject",
        "Author": "Ben Miller (@DBAduck), http://dbaduck.com",
        "Synopsis": "Tests to see if the SMO version specified exists on the computer.",
        "Name": "Test-DbaManagementObject",
        "Links": "https://dbatools.io/Test-DbaManagementObject",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaManagementObject -VersionNumber 13\nReturns True if the version exists, if it does not exist it will return False",
        "Syntax": "Test-DbaManagementObject [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-VersionNumber] \u003cInt32[]\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaMaxDop",
        "Description": "Inspired by Sakthivel Chidambaram\u0027s post about SQL Server MAXDOP Calculator (https://blogs.msdn.microsoft.com/sqlsakthi/p/maxdop-calculator-SqlInstance/),\nthis script displays a SQL Server\u0027s: max dop configured, and the calculated recommendation.\n\nFor SQL Server 2016 shows:\n- Instance max dop configured and the calculated recommendation\n- max dop configured per database (new feature)\n\nMore info:\nhttps://support.microsoft.com/en-us/kb/2806535\nhttps://blogs.msdn.microsoft.com/sqlsakthi/2012/05/23/wow-we-have-maxdop-calculator-for-sql-server-it-makes-my-job-easier/\n\nThese are just general recommendations for SQL Server and are a good starting point for setting the \"max degree of parallelism\" option.",
        "Tags": [
                     "MaxDop",
                     "SpConfigure"
                 ],
        "Alias": "",
        "Author": "Claudio Silva (@claudioessilva)",
        "Synopsis": "Displays information relating to SQL Server Max Degree of Parallelism setting. Works on SQL Server 2005-2016.",
        "Name": "Test-DbaMaxDop",
        "Links": "https://dbatools.io/Test-DbaMaxDop",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaMaxDop -SqlInstance sql2008, sqlserver2012\nGet Max DOP setting for servers sql2008 and sqlserver2012 and also the recommended one.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaMaxDop -SqlInstance sql2014 | Select-Object *\nShows Max DOP setting for server sql2014 with the recommended value. Piping the output to Select-Object * will also show the \u0027NUMANodes\u0027 and \u0027NumberOfCores\u0027 of each instance\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaMaxDop -SqlInstance sqlserver2016 | Select-Object *\nGet Max DOP setting for servers sql2016 with the recommended value. Piping the output to Select-Object * will also show the \u0027NUMANodes\u0027 and \u0027NumberOfCores\u0027 of each instance. Because it is an 2016 \r\ninstance will be shown \u0027InstanceVersion\u0027, \u0027Database\u0027 and \u0027DatabaseMaxDop\u0027 columns.",
        "Syntax": "Test-DbaMaxDop [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaMaxMemory",
        "Description": "Inspired by Jonathan Kehayias\u0027s post about SQL Server Max memory (http://bit.ly/sqlmemcalc), this script displays a SQL Server\u0027s: total memory, currently configured SQL max memory, and the calculated recommendation.\n\nJonathan notes that the formula used provides a *general recommendation* that doesn\u0027t account for everything that may be going on in your specific environment.",
        "Tags": [
                     "MaxMemory",
                     "Memory"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Calculates the recommended value for SQL Server \u0027Max Server Memory\u0027 configuration setting. Works on SQL Server 2000-2014.",
        "Name": "Test-DbaMaxMemory",
        "Links": "https://dbatools.io/Test-DbaMaxMemory",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaMaxMemory -SqlInstance sqlcluster,sqlserver2012\nCalculate the \u0027Max Server Memory\u0027 settings for all servers within the SQL Server Central Management Server \"sqlcluster\"\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaMaxMemory -SqlInstance sqlcluster | Where-Object { $_.SqlMaxMB -gt $_.TotalMB } | Set-DbaMaxMemory\nFind all servers in CMS that have Max SQL memory set to higher than the total memory of the server (think 2147483647) and set it to recommended value.",
        "Syntax": "Test-DbaMaxMemory [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Credential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaMigrationConstraint",
        "Description": "When you want to migrate from a higher edition to a lower one there are some features that can\u0027t be used.\nThis function will validate if you have any of this features in use and will report to you.\nThe validation will be made ONLY on on SQL Server 2008 or higher using the \u0027sys.dm_db_persisted_sku_features\u0027 dmv.\n\nThis function only validate SQL Server 2008 versions or higher.\nThe editions supported by this function are:\n- Enterprise\n- Developer\n- Evaluation\n- Standard\n- Express\n\nTake into account the new features introduced on SQL Server 2016 SP1 for all versions. More information at https://blogs.msdn.microsoft.com/sqlreleaseservices/sql-server-2016-service-pack-1-sp1-released/\n\nThe -Database parameter is auto-populated for command-line completion.",
        "Tags": "Migration",
        "Alias": "Test-SqlMigrationConstraint",
        "Author": "Claudio Silva (@ClaudioESSilva)",
        "Synopsis": "Show if you can migrate the database(s) between the servers.",
        "Name": "Test-DbaMigrationConstraint",
        "Links": "https://dbatools.io/Test-DbaMigrationConstraint",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaMigrationConstraint -Source sqlserver2014a -Destination sqlcluster\nAll databases on sqlserver2014a will be verified for features in use that can\u0027t be supported on sqlcluster.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaMigrationConstraint -Source sqlserver2014a -Destination sqlcluster -SqlCredential $cred\nAll databases will be verified for features in use that can\u0027t be supported on the destination server. SQL credentials are used to authenticate against sqlserver2014 and Windows Authentication is used \r\nfor sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaMigrationConstraint -Source sqlserver2014a -Destination sqlcluster -Database db1\nOnly db1 database will be verified for features in use that can\u0027t be supported on the destination server.",
        "Syntax": "Test-DbaMigrationConstraint [-Source] \u003cDbaInstanceParameter\u003e [[-SourceSqlCredential] \u003cPSCredential\u003e] [-Destination] \u003cDbaInstanceParameter\u003e [[-DestinationSqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaNetworkLatency",
        "Description": "This function is intended to help measure SQL Server network latency by establishing a connection and executing a simple query. This is a better than a simple ping because it actually creates the connection to the SQL Server and measures the time required for only the entire routine, but the duration of the query as well how long it takes for the results to be returned.\n\nBy default, this command will execute \"SELECT TOP 100 * FROM INFORMATION_SCHEMA.TABLES\" three times. It will then output how long the entire connection and command took, as well as how long *only* the execution of the command took.\n\nThis allows you to see if the issue is with the connection or the SQL Server itself.",
        "Tags": [
                     "Performance",
                     "Network"
                 ],
        "Alias": "Test-SqlNetworkLatency",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Tests how long a query takes to return from SQL Server",
        "Name": "Test-DbaNetworkLatency",
        "Links": "https://dbatools.io/Test-DbaNetworkLatency",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaNetworkLatency -SqlInstance sqlserver2014a, sqlcluster\nTests the round trip return of \"SELECT TOP 100 * FROM INFORMATION_SCHEMA.TABLES\" on sqlserver2014a and sqlcluster using Windows credentials.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaNetworkLatency -SqlInstance sqlserver2014a -SqlCredential $cred\nTests the execution results return of \"SELECT TOP 100 * FROM INFORMATION_SCHEMA.TABLES\" on sqlserver2014a using SQL credentials.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaNetworkLatency -SqlInstance sqlserver2014a, sqlcluster, sqlserver -Query \"select top 10 * from otherdb.dbo.table\" -Count 10\nTests the execution results return of \"select top 10 * from otherdb.dbo.table\" 10 times on sqlserver2014a, sqlcluster, and sqlserver using Windows credentials.",
        "Syntax": "Test-DbaNetworkLatency [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Query] \u003cString\u003e] [[-Count] \u003cInt32\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaOptimizeForAdHoc",
        "Description": "When this option is set, plan cache size is further reduced for single-use ad hoc OLTP workload.\n\nMore info: https://msdn.microsoft.com/en-us/library/cc645587.aspx\nhttp://www.sqlservercentral.com/blogs/glennberry/2011/02/25/some-suggested-sql-server-2008-r2-instance-configuration-settings/\n\nThese are just general recommendations for SQL Server and are a good starting point for setting the \"optimize for ad-hoc workloads\" option.",
        "Tags": [
                     "Configure",
                     "SPConfigure"
                 ],
        "Alias": "",
        "Author": "Brandon Abshire, netnerds.net",
        "Synopsis": "Displays information relating to SQL Server Optimize for AdHoc Workloads setting. Works on SQL Server 2008-2016.",
        "Name": "Test-DbaOptimizeForAdHoc",
        "Links": "https://dbatools.io/Test-DbaOptimizeForAdHoc",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaOptimizeForAdHoc -SqlInstance sql2008, sqlserver2012\nValidates whether Optimize for AdHoc Workloads setting is enabled for servers sql2008 and sqlserver2012.",
        "Syntax": "Test-DbaOptimizeForAdHoc [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaPath",
        "Description": "Uses master.dbo.xp_fileexist to determine if a file or directory exists.",
        "Tags": [
                     "Path",
                     "ServiceAccount"
                 ],
        "Alias": "Test-DbaSqlPath,Test-SqlPath",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Tests if file or directory exists from the perspective of the SQL Server service account.",
        "Name": "Test-DbaPath",
        "Links": "https://dbatools.io/Test-DbaPath",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaPath -SqlInstance sqlcluster -Path L:\\MSAS12.MSSQLSERVER\\OLAP\nTests whether the service account running the \"sqlcluster\" SQL Server instance can access L:\\MSAS12.MSSQLSERVER\\OLAP. Logs into sqlcluster using Windows credentials.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$credential = Get-Credential\nPS C:\\\u003e Test-DbaPath -SqlInstance sqlcluster -SqlCredential $credential -Path L:\\MSAS12.MSSQLSERVER\\OLAP\nTests whether the service account running the \"sqlcluster\" SQL Server instance can access L:\\MSAS12.MSSQLSERVER\\OLAP. Logs into sqlcluster using SQL authentication.",
        "Syntax": "Test-DbaPath [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Path] \u003cObject\u003e [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaPowerPlan",
        "Description": "Checks the Power Plan settings on a computer against best practices recommendations. If one server is checked, only $true or $false is returned. If multiple servers are checked, each server\u0027s name and an isBestPractice field are returned.\n\nReferences:\nhttps://support.microsoft.com/en-us/kb/2207548\nhttp://www.sqlskills.com/blogs/glenn/windows-power-plan-effects-on-newer-intel-processors/",
        "Tags": "PowerPlan",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Checks the Power Plan settings for compliance with best practices, which recommend High Performance for SQL Server.",
        "Name": "Test-DbaPowerPlan",
        "Links": "https://dbatools.io/Test-DbaPowerPlan",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaPowerPlan -ComputerName sqlserver2014a\nChecks the Power Plan settings for sqlserver2014a and indicates whether or not it complies with best practices.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaPowerPlan -ComputerName sqlserver2014a -CustomPowerPlan \u0027Maximum Performance\u0027\nChecks the Power Plan settings for sqlserver2014a and indicates whether or not it is set to the custom plan \"Maximum Performance\".",
        "Syntax": "Test-DbaPowerPlan [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [[-CustomPowerPlan] \u003cString\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaRecoveryModel",
        "Description": "When you switch a database into FULL recovery model, it will behave like a SIMPLE recovery model until a full backup is taken in order to begin a log backup chain.\n\nHowever, you may also desire to validate if a database is SIMPLE or BULK LOGGED on an instance.\n\nInspired by Paul Randal\u0027s post (http://www.sqlskills.com/blogs/paul/new-script-is-that-database-really-in-the-full-recovery-mode/)",
        "Tags": [
                     "DisasterRecovery",
                     "Backup"
                 ],
        "Alias": "Test-DbaFullRecoveryModel",
        "Author": "Claudio Silva (@ClaudioESSilva)",
        "Synopsis": "Find if database is really a specific recovery model or not.",
        "Name": "Test-DbaRecoveryModel",
        "Links": "https://dbatools.io/Test-DbaRecoveryModel",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaRecoveryModel -SqlInstance sql2005\nShows all databases where the configured recovery model is FULL and indicates whether or not they are really in FULL recovery model.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaRecoveryModel -SqlInstance . | Where-Object {$_.ActualRecoveryModel -ne \"FULL\"}\nOnly shows the databases that are functionally in \u0027simple\u0027 mode.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaRecoveryModel -SqlInstance sql2008 -RecoveryModel Bulk_Logged | Sort-Object Server -Descending\nShows all databases where the configured recovery model is BULK_LOGGED and sort them by server name descending\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaRecoveryModel -SqlInstance localhost | Select-Object -Property *\nShows all of the properties for the databases that have Full Recovery Model",
        "Syntax": "Test-DbaRecoveryModel [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Database] \u003cObject[]\u003e] [[-ExcludeDatabase] \u003cObject[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-RecoveryModel] \u003cObject\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaRepLatency",
        "Description": "Creates tracer tokens to determine latency between the publisher/distributor and the distributor/subscriber\nfor all transactional publications for a server, database, or publication.",
        "Tags": "Replication",
        "Alias": "",
        "Author": "Colin Douglas",
        "Synopsis": "Displays replication latency for all transactional publications for a server or database.",
        "Name": "Test-DbaRepLatency",
        "Links": "https://dbatools.io/Test-DbaRepLatency",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaRepLatency -SqlInstance sql2008, sqlserver2012\nReturn replication latency for all transactional publications for servers sql2008 and sqlserver2012.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaRepLatency -SqlInstance sql2008 -Database TestDB\nReturn replication latency for all transactional publications on server sql2008 for only the TestDB database\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaRepLatency -SqlInstance sql2008 -Database TestDB -PublicationName TestDB_Pub\nReturn replication latency for the TestDB_Pub publication for the TestDB database located on the server sql2008.",
        "Syntax": "Test-DbaRepLatency [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-Database] \u003cObject[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-PublicationName] \u003cObject[]\u003e] [[-TimeToLive] \u003cInt32\u003e] [-RetainToken] [-DisplayTokenHistory] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaServerName",
        "Description": "When a SQL Server\u0027s host OS is renamed, the SQL Server should be as well. This helps with Availability Groups and Kerberos.\n\nThis command helps determine if your OS and SQL Server names match, and whether a rename is required.\n\nIt then checks conditions that would prevent a rename, such as database mirroring and replication.\n\nhttps://www.mssqltips.com/sqlservertip/2525/steps-to-change-the-server-name-for-a-sql-server-machine/",
        "Tags": [
                     "SPN",
                     "ServerName"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Tests to see if it\u0027s possible to easily rename the server at the SQL Server instance level, or if it even needs to be changed.",
        "Name": "Test-DbaServerName",
        "Links": "https://dbatools.io/Test-DbaServerName",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaServerName -SqlInstance sqlserver2014a\nReturns ServerInstanceName, SqlServerName, IsEqual and RenameRequired for sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaServerName -SqlInstance sqlserver2014a, sql2016\nReturns ServerInstanceName, SqlServerName, IsEqual and RenameRequired for sqlserver2014a and sql2016.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaServerName -SqlInstance sqlserver2014a, sql2016 -ExcludeSsrs\nReturns ServerInstanceName, SqlServerName, IsEqual and RenameRequired for sqlserver2014a and sql2016, but skips validating if SSRS is installed on both instances.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eTest-DbaServerName -SqlInstance sqlserver2014a, sql2016 | Select-Object *\nReturns ServerInstanceName, SqlServerName, IsEqual and RenameRequired for sqlserver2014a and sql2016.\r\nIf a Rename is required, it will also show Updatable, and Reasons if the server name is not updatable.",
        "Syntax": "Test-DbaServerName [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Detailed] [-ExcludeSsrs] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaSpn",
        "Description": "This function is designed to take in a server name(s) and attempt to determine required SPNs. It was initially written to mimic the (previously) broken functionality of the Microsoft Kerberos Configuration manager and SQL Server 2016.\n\n- For any instances with TCP/IP enabled, the script will determine which port(s) the instances are listening on and generate the required SPNs.\n- For named instances NOT using dynamic ports, the script will generate a port-based SPN for those instances as well.\n- At a minimum, the script will test a base, port-less SPN for each instance discovered.\n\nOnce the required SPNs are generated, the script will connect to Active Directory and search for any of the SPNs (if any) that are already set. The function will return a custom object(s) that contains the server name checked, the instance name discovered, the account the service is running under, and what the \"required\" SPN should be. It will also return a boolean property indicating if the SPN is set in Active Directory or not.",
        "Tags": "SPN",
        "Alias": "",
        "Author": "Drew Furgiuele (@pittfurg), http://www.port1433.com | niphlod",
        "Synopsis": "Test-DbaSpn will determine what SPNs *should* be set for a given server (and any instances of SQL running on it) and return\nwhether the SPNs are set or not.",
        "Name": "Test-DbaSpn",
        "Links": "https://dbatools.io/Test-DbaSpn",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaSpn -ComputerName SQLSERVERA -Credential ad\\sqldba\nConnects to a computer (SQLSERVERA) and queries WMI for all SQL instances and return \"required\" SPNs. It will then take each SPN it generates\r\nand query Active Directory to make sure the SPNs are set.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaSpn -ComputerName SQLSERVERA,SQLSERVERB -Credential ad\\sqldba\nConnects to multiple computers (SQLSERVERA, SQLSERVERB) and queries WMI for all SQL instances and return \"required\" SPNs.\r\nIt will then take each SPN it generates and query Active Directory to make sure the SPNs are set.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaSpn -ComputerName SQLSERVERC -Credential ad\\sqldba\nConnects to a computer (SQLSERVERC) on a specified and queries WMI for all SQL instances and return \"required\" SPNs.\r\nIt will then take each SPN it generates and query Active Directory to make sure the SPNs are set. Note that the credential you pass must have be a valid login with appropriate rights on the domain",
        "Syntax": "Test-DbaSpn [-ComputerName] \u003cDbaInstanceParameter[]\u003e [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaTempdbConfig",
        "Description": "Evaluates tempdb against a set of rules to match best practices. The rules are:\n\n* TF 1118 enabled - Is Trace Flag 1118 enabled (See KB328551).\n* File Count - Does the count of data files in tempdb match the number of logical cores, up to 8?\n* File Growth - Are any files set to have percentage growth? Best practice is all files have an explicit growth value.\n* File Location - Is tempdb located on the C:\\? Best practice says to locate it elsewhere.\n* File MaxSize Set (optional) - Do any files have a max size value? Max size could cause tempdb problems if it isn\u0027t allowed to grow.\n\nOther rules can be added at a future date.",
        "Tags": [
                     "tempdb",
                     "configuration"
                 ],
        "Alias": "Test-DbaTempDbConfiguration,Test-SqlTempDbConfiguration",
        "Author": "Michael Fal (@Mike_Fal), http://mikefal.net",
        "Synopsis": "Evaluates tempdb against several rules to match best practices.",
        "Name": "Test-DbaTempdbConfig",
        "Links": "https://dbatools.io/Test-DbaTempdbConfig",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaTempdbConfig -SqlInstance localhost\nChecks tempdb on the localhost machine.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaTempdbConfig -SqlInstance localhost | Select-Object *\nChecks tempdb on the localhost machine. All rest results are shown.",
        "Syntax": "Test-DbaTempdbConfig [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [[-SqlCredential] \u003cPSCredential\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Test-DbaWindowsLogin",
        "Description": "The purpose of this function is to find SQL Server logins that are used by active directory users that are either disabled or removed from the domain. It allows you to keep your logins accurate and up to date by removing accounts that are no longer needed.",
        "Tags": [
                     "Login",
                     "Security"
                 ],
        "Alias": "Test-DbaValidLogin",
        "Author": "Stephen Bennett, https://sqlnotesfromtheunderground.wordpress.com/ | Chrissy LeMaire (@cl)",
        "Synopsis": "Test-DbaWindowsLogin finds any logins on SQL instance that are AD logins with either disabled AD user accounts or ones that no longer exist",
        "Name": "Test-DbaWindowsLogin",
        "Links": "https://dbatools.io/Test-DbaWindowsLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eTest-DbaWindowsLogin -SqlInstance Dev01\nTests all logins in the current Active Directory domain that are either disabled or do not exist on the SQL Server instance Dev01\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eTest-DbaWindowsLogin -SqlInstance Dev01 -FilterBy GroupsOnly | Select-Object -Property *\nTests all Active Directory groups that have logins on Dev01, and shows all information for those logins\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eTest-DbaWindowsLogin -SqlInstance Dev01 -IgnoreDomains testdomain\nTests all Domain logins excluding any that are from the testdomain",
        "Syntax": "Test-DbaWindowsLogin [-SqlInstance] \u003cDbaInstanceParameter[]\u003e [-SqlCredential \u003cPSCredential\u003e] [-Login \u003cObject[]\u003e] [-ExcludeLogin \u003cObject[]\u003e] [-FilterBy \u003cString\u003e] [-IgnoreDomains \u003cString[]\u003e] [-Detailed] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Uninstall-DbaWatchUpdate",
        "Description": "Removes the scheduled task created for Watch-DbaUpdate by Install-DbaWatchUpdate so that notifications no longer pop up.",
        "Tags": [
                     "JustForFun",
                     "Module"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Removes the scheduled task created for Watch-DbaUpdate by Install-DbaWatchUpdate so that notifications no longer pop up.",
        "Name": "Uninstall-DbaWatchUpdate",
        "Links": "https://dbatools.io/Uninstall-DbaWatchUpdate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eUninstall-DbaWatchUpdate\nRemoves the scheduled task created by Install-DbaWatchUpdate.",
        "Syntax": "Uninstall-DbaWatchUpdate [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Update-DbaServiceAccount",
        "Description": "Reconfigure the service account or update the password of the specified SQL Server service. The service will be restarted in the event of changing the account.",
        "Tags": [
                     "Service",
                     "SqlServer",
                     "Instance",
                     "Connect"
                 ],
        "Alias": "Update-DbaSqlServiceAccount",
        "Author": "Kirill Kravtsov (@nvarscar)",
        "Synopsis": "Changes service account (or just its password) of the SQL Server service.",
        "Name": "Update-DbaServiceAccount",
        "Links": null,
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$NewPassword = ConvertTo-SecureString \u0027Qwerty1234\u0027 -AsPlainText -Force\nUpdate-DbaServiceAccount -ComputerName sql1 -ServiceName \u0027MSSQL$MYINSTANCE\u0027 -Password $NewPassword\nChanges the current service account\u0027s password of the service MSSQL$MYINSTANCE to \u0027Qwerty1234\u0027\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$cred = Get-Credential\nPS C:\\\u003e Get-DbaService sql1 -Type Engine,Agent -Instance MYINSTANCE | Update-DbaServiceAccount -ServiceCredential $cred\nRequests credentials from the user and configures them as a service account for the SQL Server engine and agent services of the instance sql1\\MYINSTANCE\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eUpdate-DbaServiceAccount -ComputerName sql1,sql2 -ServiceName \u0027MSSQLSERVER\u0027,\u0027SQLSERVERAGENT\u0027 -Username NETWORKSERVICE\nConfigures SQL Server engine and agent services on the machines sql1 and sql2 to run under Network Service system user.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaService sql1 -Type Engine -Instance MSSQLSERVER | Update-DbaServiceAccount -Username \u0027MyDomain\\sqluser1\u0027\nConfigures SQL Server engine service on the machine sql1 to run under MyDomain\\sqluser1. Will request user to input the account password.",
        "Syntax": "Update-DbaServiceAccount [-ComputerName \u003cDbaInstanceParameter[]\u003e] [-Credential \u003cPSCredential\u003e] [-ServiceName] \u003cString[]\u003e [-Username \u003cString\u003e] [-ServiceCredential \u003cPSCredential\u003e] [-OldPassword \u003cSecureString\u003e] [-NewPassword \u003cSecureString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nUpdate-DbaServiceAccount [-Credential \u003cPSCredential\u003e] -InputObject \u003cObject[]\u003e [-Username \u003cString\u003e] [-ServiceCredential \u003cPSCredential\u003e] [-OldPassword \u003cSecureString\u003e] [-NewPassword \u003cSecureString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Update-Dbatools",
        "Description": "Exported function. Updates dbatools. Deletes current copy and replaces it with freshest copy.",
        "Tags": "Module",
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Exported function. Updates dbatools. Deletes current copy and replaces it with freshest copy.",
        "Name": "Update-Dbatools",
        "Links": "https://dbatools.io/Update-DbaTools",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eUpdate-Dbatools\nUpdates dbatools. Deletes current copy and replaces it with freshest copy.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eUpdate-Dbatools -dev\nUpdates dbatools to the current development branch. Deletes current copy and replaces it with latest from github.",
        "Syntax": "Update-Dbatools [-Development] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Watch-DbaDbLogin",
        "Description": "Watch-DbaDbLogin uses SQL Server DMV\u0027s to track logins into a SQL Server table. This is helpful when you need to migrate a SQL Server and update connection strings, but have inadequate documentation on which servers/applications are logging into your SQL instance.\n\nRunning this script every 5 minutes for a week should give you a sufficient idea about database and login usage.",
        "Tags": "Login",
        "Alias": "Watch-SqlDbLogin",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Tracks SQL Server logins: which host they came from, what database they\u0027re using, and what program is being used to log in.",
        "Name": "Watch-DbaDbLogin",
        "Links": "https://dbatools.io/Watch-DbaDbLogin",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eWatch-DbaDbLogin -SqlInstance sqlserver -SqlCms SqlCms1\nA list of all database instances within the Central Management Server SqlCms1 is generated. Using this list, the script enumerates all the processes and gathers login information and saves it to the \r\ntable Dblogins in the DatabaseLogins database on SQL Server sqlserver.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eWatch-DbaDbLogin -SqlInstance sqlcluster -Database CentralAudit -ServersFromFile .\\sqlservers.txt\nA list of servers is gathered from the file sqlservers.txt in the current directory. Using this list, the script enumerates all the processes and gathers login information and saves it to the table \r\nDblogins in the CentralAudit database on SQL Server sqlcluster.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eWatch-DbaDbLogin -SqlInstance sqlserver -SqlCms SqlCms1 -SqlCredential $cred\nA list of servers is generated using database instance names within the SQL2014Clusters group on the Central Management Server SqlCms1. Using this list, the script enumerates all the processes and \r\ngathers login information and saves it to the table Dblogins in the DatabaseLogins database on sqlserver.",
        "Syntax": "Watch-DbaDbLogin [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-Database] \u003cObject\u003e] [[-Table] \u003cString\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-SqlCms] \u003cString\u003e] [[-ServersFromFile] \u003cString\u003e] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Watch-DbaUpdate",
        "Description": "Just for fun - checks the PowerShell Gallery every 1 hour for updates to dbatools. Notifies once max per release.\n\nAnyone know how to make it clickable so that it opens an URL?",
        "Tags": [
                     "JustForFun",
                     "Module"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Just for fun - checks the PowerShell Gallery every 1 hour for updates to dbatools. Notifies once per release.",
        "Name": "Watch-DbaUpdate",
        "Links": "https://dbatools.io/Watch-DbaUpdate",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eWatch-DbaUpdate\nWatches the gallery for updates to dbatools.",
        "Syntax": "Watch-DbaUpdate [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Watch-DbaXESession",
        "Description": "Watch live XEvent Data as it happens. This command runs until you stop the session, kill the PowerShell session, or Ctrl-C.\n\nThanks to Dave Mason (@BeginTry) for some straightforward code samples https://itsalljustelectrons.blogspot.be/2017/01/SQL-Server-Extended-Event-Handling-Via-Powershell.html",
        "Tags": [
                     "ExtendedEvent",
                     "XE",
                     "XEvent"
                 ],
        "Alias": "Watch-DbaXEventSession",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Watch live XEvent Data as it happens",
        "Name": "Watch-DbaXESession",
        "Links": "https://dbatools.io/Watch-DbaXESession",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eWatch-DbaXESession -SqlInstance sql2017 -Session system_health\nShows events for the system_health session as it happens.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eWatch-DbaXESession -SqlInstance sql2017 -Session system_health | Export-Csv -NoTypeInformation -Path C:\\temp\\system_health.csv\nExports live events to CSV. Ctrl-C may not not cancel out of it - fastest way is to stop the session.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eGet-DbaXESession -SqlInstance sql2017 -Session system_health | Start-DbaXESession | Watch-DbaXESession | Export-Csv -NoTypeInformation -Path C:\\temp\\system_health.csv\nExports live events to CSV. Ctrl-C may not not cancel out of this. The fastest way to do so is to stop the session.",
        "Syntax": "Watch-DbaXESession [-SqlCredential \u003cPSCredential\u003e] [-Session \u003cString\u003e] [-Raw] [-EnableException] [\u003cCommonParameters\u003e]\nWatch-DbaXESession -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-Session \u003cString\u003e] [-Raw] [-EnableException] [\u003cCommonParameters\u003e]\nWatch-DbaXESession [-SqlCredential \u003cPSCredential\u003e] [-Session \u003cString\u003e] -InputObject \u003cSession\u003e [-Raw] [-EnableException] [\u003cCommonParameters\u003e]"
    },
    {
        "CommandName": "Write-DbaDataTable",
        "Description": "Writes a .NET DataTable to a SQL Server table using SQL Bulk Copy.",
        "Tags": [
                     "DataTable",
                     "Insert"
                 ],
        "Alias": "",
        "Author": "Chrissy LeMaire (@cl), netnerds.net",
        "Synopsis": "Writes data to a SQL Server Table.",
        "Name": "Write-DbaDataTable",
        "Links": "https://dbatools.io/Write-DbaDataTable",
        "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003e$DataTable = Import-Csv C:\\temp\\customers.csv | ConvertTo-DbaDataTable\nPS C:\\\u003e Write-DbaDataTable -SqlInstance sql2014 -InputObject $DataTable -Table mydb.dbo.customers\nPerforms a bulk insert of all the data in customers.csv into database mydb, schema dbo, table customers. A progress bar will be shown as rows are inserted. If the destination table does not exist, \r\nthe import will be halted.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$DataTable = Import-Csv C:\\temp\\customers.csv | ConvertTo-DbaDataTable\nPS C:\\\u003e $DataTable | Write-DbaDataTable -SqlInstance sql2014 -Table mydb.dbo.customers\nPerforms a row by row insert of the data in customers.csv. This is significantly slower than a bulk insert and will not show a progress bar.\r\nThis method is not recommended. Use -InputObject instead.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$DataTable = Import-Csv C:\\temp\\customers.csv | ConvertTo-DbaDataTable\nPS C:\\\u003e Write-DbaDataTable -SqlInstance sql2014 -InputObject $DataTable -Table mydb.dbo.customers -AutoCreateTable\nPerforms a bulk insert of all the data in customers.csv. If mydb.dbo.customers does not exist, it will be created with inefficient but forgiving DataTypes.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$DataTable = Import-Csv C:\\temp\\customers.csv | ConvertTo-DbaDataTable\nPS C:\\\u003e Write-DbaDataTable -SqlInstance sql2014 -InputObject $DataTable -Table mydb.dbo.customers -Truncate\nPerforms a bulk insert of all the data in customers.csv. Prior to importing into mydb.dbo.customers, the user is informed that the table will be truncated and asks for confirmation. The user is \r\nprompted again to perform the import.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003e$DataTable = Import-Csv C:\\temp\\customers.csv | ConvertTo-DbaDataTable\nPS C:\\\u003e Write-DbaDataTable -SqlInstance sql2014 -InputObject $DataTable -Database mydb -Table customers -KeepNulls\nPerforms a bulk insert of all the data in customers.csv into mydb.dbo.customers. Because Schema was not specified, dbo was used. NULL values in the destination table will be preserved.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$passwd = ConvertTo-SecureString \"P@ssw0rd\" -AsPlainText -Force\nPS C:\\\u003e $AzureCredential = New-Object System.Management.Automation.PSCredential(\"AzureAccount\"),$passwd)\r\nPS C:\\\u003e $DataTable = Import-Csv C:\\temp\\customers.csv | ConvertTo-DbaDataTable\r\nPS C:\\\u003e Write-DbaDataTable -SqlInstance AzureDB.database.windows.net -InputObject $DataTable -Database mydb -Table customers -KeepNulls -Credential $AzureCredential -BulkCopyTimeOut 300\nThis performs the same operation as the previous example, but against a SQL Azure Database instance using the required credentials.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$process = Get-Process | ConvertTo-DbaDataTable\nPS C:\\\u003e Write-DbaDataTable -InputObject $process -SqlInstance sql2014 -Database mydb -Table myprocesses -AutoCreateTable\nCreates a table based on the Process object with over 60 columns, converted from PowerShell data types to SQL Server data types. After the table is created a bulk insert is performed to add process \r\ninformation into the table.\nThis is an example of the type conversion in action. All process properties are converted, including special types like TimeSpan. Script properties are resolved before the type conversion starts \r\nthanks to ConvertTo-DbaDataTable.",
        "Syntax": "Write-DbaDataTable [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cObject\u003e] -InputObject \u003cObject\u003e [-Table] \u003cString\u003e [[-Schema] \u003cString\u003e] [-BatchSize \u003cInt32\u003e] [-NotifyAfter \u003cInt32\u003e] [-AutoCreateTable] [-NoTableLock] [-CheckConstraints] [-FireTriggers] [-KeepIdentity] [-KeepNulls] [-Truncate] [-bulkCopyTimeOut \u003cInt32\u003e] [-RegularUser] [-EnableException] [-UseDynamicStringLength] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
    }
]